wsygzyr / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

libjingle + linphone : whether video call is possible? #178

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I have built the libjingle(am using the latest version) with linphone enabled 
on my Ubuntu pc.

I can make voice call from my linjingle to GTalk. However I am not able to make 
video call from the libjingle. 

Whether making video call(video taken from camera) is possible in 
libjingle(built with linphone)?

thanks you

Original issue reported on code.google.com by krishna....@gmail.com on 20 Jun 2011 at 12:00

GoogleCodeExporter commented 9 years ago
Any idea?

thanks

Original comment by krishna....@gmail.com on 21 Jun 2011 at 12:20

GoogleCodeExporter commented 9 years ago
I went through the code. linphonemediaengine.cc supports only audio!! I wasn't 
expecting this!

Original comment by krishna....@gmail.com on 22 Jun 2011 at 6:18

GoogleCodeExporter commented 9 years ago
I'd tried to modify codes for making video call by the file 
"linphonemediaengine.cc".
It's ok for video call communication.
There are some "video decoder" problems when communicating with official 
web-gtalk.
Linphone uses ffmpeg library for decoding, and maybe it's not compatible with 
web-gtalk in video-decoding.

Original comment by chenanji...@gmail.com on 23 Jun 2011 at 10:43

GoogleCodeExporter commented 9 years ago
Thank you very much for update.
Even I am trying to modify the "linphonemediaengine.cc" to interface video part 
of the mediastreamer. Currently I am facing some issues in getting the camera 
images.
If possible, could you please the changes you made in linphonemediaengine?

Original comment by krishna....@gmail.com on 24 Jun 2011 at 1:17

GoogleCodeExporter commented 9 years ago
Thank you very much for update.
Even I am trying to modify the "linphonemediaengine.cc" to interface video part 
of the mediastreamer. Currently I am facing some issues in getting the camera 
images.

If possible, could you please share the changes you made in linphonemediaengine?
thank you

Original comment by krishna....@gmail.com on 24 Jun 2011 at 1:23

GoogleCodeExporter commented 9 years ago
How do you get linphonemediaengine.cc to compile against 0.5.6? Did you have to 
make changes to avoid the compilation errors I posted in issue #179?

Original comment by dbl...@alumni.lehigh.edu on 24 Jun 2011 at 1:23

GoogleCodeExporter commented 9 years ago
Yes,even I had faced these compilation errors(as mentioned in the issue #179). 
I had to make little changes in the code to avoid these errors.

I am able to make voice call. Currently, I am facing issues with video. I 
suspect some mistake in the changes I made to linphonemediaengine.cc to 
interface the camera.

If possible, anyone please share the code required in linphonemediaengine.cc 
for making the video call..

thank you.

Original comment by krishna....@gmail.com on 24 Jun 2011 at 1:45

GoogleCodeExporter commented 9 years ago
Any update on this? thank you

Original comment by krishna....@gmail.com on 27 Jun 2011 at 12:42

GoogleCodeExporter commented 9 years ago
If you install Gmail plugin for video communication, default camera may be 
"Google Camera Adapter ..".
Solution 1:choose a camera by name
Solution 2:skip "Google Camera Adapter .." camera, use other cameras

Here is Solution2
===============================================
MSWebCam *cam;
MSWebCamManager *m = ms_web_cam_manager_get();
MSList *elem;
    for (elem=m->cams;elem!=NULL;elem=elem->next)
    {   
    cam=(MSWebCam*)elem->data;
    if(_strnicmp(ms_web_cam_get_name(cam), "Google Camera Adapter", 21))
            break;
    }
===============================================
I hope this can help you 

Original comment by chenanji...@gmail.com on 27 Jun 2011 at 1:08

GoogleCodeExporter commented 9 years ago
Thank you.
I am getting the default camera, name of the default camera is '/dev/video00'.
Still, I am facing the same issue. I am suspecting that there may be some 
mistake in other places of the code..
I have attached the changes in linphonemediaengine. If possible, could you 
please have look on this.. and point me if I am missing something
I don't want to display the video.. I just want to send the video to other side.
thank you

Original comment by krishna....@gmail.com on 27 Jun 2011 at 2:21

Attachments:

GoogleCodeExporter commented 9 years ago
Any update on this? thank you

Original comment by krishna....@gmail.com on 28 Jun 2011 at 11:44

GoogleCodeExporter commented 9 years ago
change
MSVideoSize vs;
vs.height = 288;
vs.width = 352;

I can't log in using libjingle now(google problem?), so I can't test your codes.
You can reference Linphone source code "mediastream.c", and it works.

Original comment by chenanji...@gmail.com on 29 Jun 2011 at 5:59

GoogleCodeExporter commented 9 years ago
By the way Linphone that uses H264 encoder needs plugin, so I use H263.
add
video_codecs.push_back(cricket::VideoCodec(98, "H263", 352, 288, 15, 0));

in 
bool LinphoneVideoChannel::SetSend(bool send)
add
rtp_profile_set_payload(&av_profile,98,&payload_type_h263_1998);

Original comment by chenanji...@gmail.com on 29 Jun 2011 at 7:13

GoogleCodeExporter commented 9 years ago
Thank you very much. With this, I am able to get the video and see it on the 
gtalk.

I will have to make it work with H264 encoder.
I think below is the encode settings for the same 
video_codecs_.push_back(VideoCodec(97, "H264", 320, 240, 30, 0));
rtp_profile_set_payload(&av_profile,97,&payload_type_theora) 
(I am not sure about 
this:rtp_profile_set_payload(&av_profile,102,&payload_type_h264); )

If possible, could you please point me to the H264 encoder plugin which I can 
download..?
Thank you

Original comment by krishna2...@gmail.com on 29 Jun 2011 at 1:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
97=>H264 should be defined by google, and 102=>H264 should be defined by 
linphone.

because you set
video_codecs_.push_back(VideoCodec(97, "H264", 320, 240, 30, 0));
I think you should set
rtp_profile_set_payload(&av_profile,97,&payload_type_h264);

H264 plugin can be download in linphone official website.

Original comment by chenanji...@gmail.com on 30 Jun 2011 at 6:07

GoogleCodeExporter commented 9 years ago
HI,any of you guys were able to make it work with h264 plugin..
the moment i put

video_codecs_.push_back(VideoCodec(97, "H264", 320, 240, 30, 0));
&
rtp_profile_set_payload(&av_profile,97,&payload_type_h264)
in the code i get the following error
"ortp-error-videostream.c:undefined payload type"

any ideas regarding this??

Original comment by aniruddh...@gmail.com on 2 Sep 2011 at 6:48

GoogleCodeExporter commented 9 years ago
I also had succeed to have audio/video calls using speex/PCMU8000 for Audio and 
H264 for Video. The GTalk web client interpret correctly the video/audio stream 
send from my call application. My problem is that I cannot succeed to see 
something into my call application and also to hear something. Seems that 
mediaengine doesn't decode correctly the received stream (audio or video). and 
also it not throw any error (I'm sure that I'm doing something wrong but I 
don't know yet what).

Original comment by silviu.cpp@gmail.com on 3 Sep 2011 at 12:50

GoogleCodeExporter commented 9 years ago
Fixed. It works now.

Original comment by silviu.cpp@gmail.com on 3 Sep 2011 at 3:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hey dude can u point out the steps that makes ur code work with H264 encoder?? 
if possible can u share ur linphonemediaengine.cpp??
thanks

Original comment by aniruddh...@gmail.com on 5 Sep 2011 at 4:06

GoogleCodeExporter commented 9 years ago

Original comment by juberti@google.com on 9 Sep 2011 at 7:44

GoogleCodeExporter commented 9 years ago
Let video call can work, Only need to modify two files (linphonemediaengine.cpp 
& linphonemediaengine.h)?  

Original comment by 77ya...@gmail.com on 10 Nov 2011 at 9:04

GoogleCodeExporter commented 9 years ago
Yes. you are right.

Original comment by krishna....@gmail.com on 10 Nov 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Thank you for your reply.

I tried to modify two files,but it can't work. The video channel can't send 
and receive any video data. I don't know which step I miss. If possible, can 
you see my code and point the problem?

Thank you.

Original comment by 77ya...@gmail.com on 14 Nov 2011 at 8:50

Attachments:

GoogleCodeExporter commented 9 years ago
Any tips? This problem has been annoying me for a month, someone can help me?

Original comment by 77ya...@gmail.com on 15 Nov 2011 at 9:14

GoogleCodeExporter commented 9 years ago
I am giving some code snippets below, it may help you. It worked for me for 
h263 codec type. I haven't tried the receiving and play the video, I think it 
will work if you run FFMPEG player on specific port numbers.

Are you trying to test with GTalk?What is is your test setup? I think you can 
debug to know whether you are able to receive data from camera or not or the 
other side is not playing the video.

In bool LinphoneMediaEngine::Init():
video_codecs_.push_back(VideoCodec(98, "H263", 352, 288, 15, 0));

bool LinphoneVideoChannel::SetSend(bool send){
    LOG(LS_INFO)<<"send="<<send<<LOG_PLACE;         video_stream_=video_stream_new(VIDEO_PORT_STRM_START_LOCAL,ms_is_ipv6("127.0.0.1"));
    MSVideoSize vs;
    vs.height = 288;
    vs.width = 352;
    video_stream_set_sent_video_size(video_stream_,vs);
    video_stream_use_preview_video_window(video_stream_,false);
    //USB 2.0 PC Camera
    cam=ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get());

    rtp_profile_set_payload(&av_profile,98,&payload_type_h263_1998);
    profile = rtp_profile_clone_full(&av_profile);

    /*MS2_PUBLIC int video_stream_start(VideoStream * stream, RtpProfile *profile, const char *remip, int remport, int rem_rtcp_port,
        int payload, int jitt_comp, MSWebCam *device);*/
    payload = 98;
    int jitt_comp = 0;
    video_stream_->dir =VideoStreamSendOnly;
    video_stream_start(video_stream_,profile,   "127.0.0.1",3000,3001,
                    payload,
                    jitt_comp,cam
                    );

    return true;
}

Original comment by krishna....@gmail.com on 16 Nov 2011 at 2:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks. I will try it. 

I use web-gtalk for testing, because talkmm is not support video call.

What is your test program? The other side can see you send video data.

Original comment by 77ya...@gmail.com on 16 Nov 2011 at 9:41

GoogleCodeExporter commented 9 years ago
Running the program, I got the information in debug mode.

It looks like the call program can't understand session(from gtalk-web send). 

But it seems work, because it print the information 
"ortp-message-Captured mean fps=16.880613, expected=17.000000"

I don't know how to confirm the video data is right.

Any suggest?   

------------------------------------------------------------------------------
RECV <<<<<<<<<<<<<<<< : Fri Nov 18 10:59:01 2011
   <iq to="testiris76@gmail.com/call54BC9293" type="set" id="11" from="77yahan@gmail.com/callC8EBA0D3">
     <jingle action="transport-info" sid="1756852156" xmlns="urn:xmpp:jingle:1">
       <content name="video" creator="initiator">
         <transport xmlns="http://www.google.com/transport/p2p">
           <candidate name="video_rtcp" address="192.168.1.3" port="41863" preference="1" username="6ZILCLQRR3GDBb78" protocol="udp" generation="0" password="KgIEnqPC0tDtbCrE" type="local" network="wlan0"/>
           <candidate name="video_rtp" address="192.168.1.3" port="51362" preference="1" username="b3rrGRM1a9QNlgbV" protocol="udp" generation="0" password="UEaXUyE94DfEbzFu" type="local" network="wlan0"/>
           <candidate name="video_rtcp" address="140.123.106.44" port="60446" preference="0.9" username="v6j/YyjFxnDfuM/t" protocol="udp" generation="0" password="Ca4XAo8HA7HVEfKD" type="stun" network="wlan0"/>
RECV <<<<<<<<<<<<<<<< : Fri Nov 18 10:59:01 2011
   <candidate name="video_rtp" address="140.123.106.44" port="34738" preference="0.9" username="G3o3URULTh02u+Yc" protocol="udp" generation="0" password="JF1qtxtMlsRhnlls" type="stun" network="wlan0"/>
 </transport>
 </content>
 </jingle>
 </iq>
SEND >>>>>>>>>>>>>>>> : Fri Nov 18 10:59:01 2011
   <iq to="77yahan@gmail.com/callC8EBA0D3" id="11" type="error">
     <jingle action="transport-info" sid="1756852156" xmlns="urn:xmpp:jingle:1">
       <content name="video" creator="initiator">
         <transport xmlns="http://www.google.com/transport/p2p">
           <candidate name="video_rtcp" address="192.168.1.3" port="41863" preference="1" username="6ZILCLQRR3GDBb78" protocol="udp" generation="0" password="KgIEnqPC0tDtbCrE" type="local" network="wlan0"/>
           <candidate name="video_rtp" address="192.168.1.3" port="51362" preference="1" username="b3rrGRM1a9QNlgbV" protocol="udp" generation="0" password="UEaXUyE94DfEbzFu" type="local" network="wlan0"/>
           <candidate name="video_rtcp" address="140.123.106.44" port="60446" preference="0.9" username="v6j/YyjFxnDfuM/t" protocol="udp" generation="0" password="Ca4XAo8HA7HVEfKD" type="stun" network="wlan0"/>
           <candidate name="video_rtp" address="140.123.106.44" port="34738" preference="0.9" username="G3o3URULTh02u+Yc" protocol="udp" generation="0" password="JF1qtxtMlsRhnlls" type="stun" network="wlan0"/>
         </transport>
       </content>
     </jingle>
     <error type="modify">
       <sta:bad-request xmlns:sta="urn:ietf:params:xml:ns:xmpp-stanzas"/>
       <sta:text xml:lang="en" xmlns:sta="urn:ietf:params:xml:ns:xmpp-stanzas">
         unknown session
       </sta:text>
     </error>
   </iq>
ortp-message-Emitting I-frame
ortp-message-Captured mean fps=16.831587, expected=17.000000
ortp-message-Emitting I-frame
ortp-message-Captured mean fps=16.880613, expected=17.000000
ortp-message-Captured mean fps=16.934961, expected=17.000000
ortp-message-Captured mean fps=17.003390, expected=17.000000

Original comment by 77ya...@gmail.com on 18 Nov 2011 at 3:13

GoogleCodeExporter commented 9 years ago
I think you are able to capture the video properly. 
But there seems to be issue in session establishment with other side. I think 
you should have session accept and p2p connection establishment for sending the 
captured video.  

Original comment by krishna....@gmail.com on 18 Nov 2011 at 5:20

GoogleCodeExporter commented 9 years ago
Addition to the web version of gmail.

What program can use for testing ?
  (other side)        (call sample)

ortp-message-Captured <-- captured the video from remote port?
The other side not sent video data(web-gmail was hangup automatically).
But the console still pirnt the same message(ortp-message-Captured mean 
fps=17.003390, expected=17.000000). 

Original comment by 77ya...@gmail.com on 18 Nov 2011 at 9:38

GoogleCodeExporter commented 9 years ago
May be same 'call sample' on other side.

Original comment by krishna....@gmail.com on 18 Nov 2011 at 9:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I will keep to try it.

Original comment by 77ya...@gmail.com on 19 Nov 2011 at 11:19

GoogleCodeExporter commented 9 years ago
How to accepted call from gmail?

Even the incoming call(only audio), "call sample" also print "unknown session".

Who can accpet incoming call from gmail?

Original comment by testiri...@gmail.com on 23 Nov 2011 at 3:46

GoogleCodeExporter commented 9 years ago
I make a call from my call app to my call app,ths call do not receive any rtp 
data.
but call from my call app to gtalk,call app can receive data.
and call from gtalk to call app,call capp can receive data too.

why?

thanks!

Original comment by 350097...@qq.com on 18 Feb 2012 at 5:20

GoogleCodeExporter commented 9 years ago
Dear Krishna,

I applied your changes to linphonemediaengine.cc/.h, but still cannot send 
video to gtalk on the other side. My error is 
"ortp-warning-Error receiving RTCP packet: Error code : 10040."
which means my sent packages are too large. I don't know what I have done 
wrong. I attached the logs. Would you plz help me and take a look? 

Original comment by tangketa...@gmail.com on 6 Apr 2012 at 8:40

Attachments: