[Asterisk-video] Videomixing in MeetMe

Lorenzo Miniero lorenzo.miniero at unina.it
Tue Jun 19 03:55:00 CDT 2007


Hi Klaus,

the videoswitch command only works for normal MeetMe conferences. It is 
used for mixing too, as you noted: with it you activate a video source; 
I was just too lazy to create a new console command, so I used the one I 
already created for basic videoswitching. When no source is active, 
however, each client should receive a video with a static logo image in 
it. There's no limitation in how many video sources there can be: the 
only limitation is on the layout at the moment: that is, you can0t have 
more than 8 people together on the screen.

Which codecs did you enable in Eyebeam and X-Lite?

Here's all the required steps to test (hopefully with success) the 
videomixer:


	1) launch the videomixer;

	2) launch Asterisk (at this point both should report the connection);

	3) have a client call the number associated to a MeetMe conference 
(I'll assume that the number 8600 is associated to the conference 1234);

	4) when the client calls, many notifications appear in Asterisk, as:
		* the messages exchanged with the videomixer (in green), where you can 
see if the session has been established, and the peer created successfully;
		* the video codec negotiated by the client;
		* the notifications regarding the created RTP channels to bridge the 
video;

	5) notifications appear in the mixer too, and you can get info on the 
sessions by typing 'show sessions' (you'll probably have to look for the 
output, since ffmpeg "steals" the console with its debug output);

	6) even with no source active yet, the client should already see some 
video, in this case a static logo image;

	7) to enable a source, you use the videoswitch command; so, assuming 
Eyebeam is user 2 in the conference (you can get the list of users by 
typing 'meetme list 1234'), type:

		videoswitch 1234 2

	if the source has been successfully enabled, you'll see a "Peer X 
enabled in session Y", where X and Y are the related videomixer 
identifiers; the source should then be included in the mix, and the 
layout updated;

	8) you can repeat the step 7 for each source you want to enable; to 
disable a source, use the same command, since the videoswitch command is 
an on/off trigger.


With these steps all should work, assuming the codecs are supported, and 
QCIF resolutions are exploited (CIF and others are not supported yet).

In case it still doesn't work, could you paste me the output of Asterisk 
when you have your clients join the conference?


Thanks again for the feedback, hope to hear you soon,
Lorenzo



Klaus Darilion ha scritto:
> Hi Lorenzo!
> 
> I still have no success. I tried it with 2 clients - one eyebeam with 
> webcam (send and receive video) and one xlite (no webcam, thus receive 
> video only).
> 
> I saw video RTP packets to Asterisk, but no video packets from Asterisk 
> to the SIp phones.
> 
> I played around with the the videoswitch command. I thought that 
> switching the video source to the eyebeam client with camera should give 
> me this video streamed to both clients - but there was no video at all.
> 
> Thus, are there some requirements - e.g. a minimum of x clients with 
> webcam which send video to Asterisk?
> 
> When using standard Meetme conferences (no B option, thus no BCP) - is 
> it possible to use the videomixer too or do I only can use videoswitch 
> to activate a certain video source?
> 
> regards
> klaus
> 
> Lorenzo Miniero wrote:
>> Hi Klaus,
>>
>> the prefix you see there is for XCON-compliant conferences, i.e. for 
>> conferences with BFCP support, and they are created and configured in 
>> another configuration file (xcon.conf).
>>
>> However, if you are using a softphone which is not our enhanced Minisip, 
>> you should use normal MeetMe conferences instead, since otherwise you 
>> wouldn't be able to exploit the new protocols anyway. Normal MeetMe 
>> conferences are added as usual in meetme.conf.
>>
>> So, just enable a voice in the dialplan for the default meetme conference:
>>
>> 	exten => 8600,1,MeetMe(1234)
>>
>> and have your clients call that number to test the videomixer. To enable 
>> and disable users' video use the videoswitch command:
>>
>> 	videoswitch conf user (e.g. videoswitch 1234 1)
>>
>> Let me know what you think of it, regards!
>> Lorenzo
>>
>>
>>
>>> Hi Lorenzo!
>>>
>>> using "./configure --enable-libogg --enable-libvorbis --enable-gpl 
>>> --enable-shared --enable-swscaler" worked for then. Then I only had to 
>>> uncomment -lswscale in the make and linking was fine. Starting was also 
>>> fine and when Asterisk started it connected to the videomixer:
>>>
>>> CVM_CLI*> New client connected (127.0.0.1:36218)
>>>
>>> Also the status in Asterisk looks fine:
>>> samuel*CLI> xcon info
>>> samuel*CXCON prefix 867xxxx
>>>          BFCP Server listening on port 2345 (TCP/BFCP)
>>>          BFCP Server List active with max 10 conferences allowed (0 active).
>>>          XconScheduler Server listening on port 2346
>>>          Remote Confiance VideoMixer listening on 127.0.0.1:7000
>>>
>>>
>>> I added the extensions:
>>> [xcon]
>>> ; XCON through MeetMe: example of wildcards to add flexibility
>>> ;       - First 7 numbers = conference
>>> ;       - Next (1-4) numbers = PIN (Phone PIN, not Admin's password)
>>> ;
>>> ; the 'B' flag tells MeetMe this is an XCON conference (B => BFCP)
>>> ;
>>> exten => _867.,1,Meetme(${EXTEN:0:7}|B|${EXTEN:7})
>>> exten => _867.,2,Hangup
>>> ;
>>> ; XconScheduler
>>> ;
>>> exten => 868,1,Answer
>>> exten => 868,2,XconScheduler()
>>> exten => 868,3,Hangup
>>> ;
>>>
>>>
>>> But if I call a conference room (e.g. 8671234) I only get "That is not a 
>>> valid conference number":
>>>
>>> -- Executing [8671234 at from_sipphones:1] MeetMe("SIP/201-0823cf88", 
>>> "8671234|B|") in new stack
>>> == Parsing '/etc/asterisk/xcon.conf': Found
>>>    -- <SIP/201-0823cf88> Playing 'conf-invalid' (language 'en')
>>>
>>>
>>> I also tried adding the conference room to meetme.conf:
>>> conf => 8671234
>>> conf => 1234
>>>
>>> But the same result: "That is not a vlaid conference number"
>>>
>>>
>>> any hints?
>>>
>>> thanks
>>> klaus
>>>
>>> Lorenzo Miniero wrote:
>>>> PS: if it can be of help, these are the settings I configured FFmpeg 
>>>> with, and which surely work:
>>>>
>>>> FFmpeg version SVN-r8380, Copyright (c) 2000-2007 Fabrice Bellard, et al.
>>>>    configuration: --prefix=/usr --enable-libfaac --enable-libgsm 
>>>> --enable-libmp3lame --enable-xvid --enable-x264 --enable-libogg 
>>>> --enable-libvorbis --enable-libtheora --enable-gpl --enable-shared 
>>>> --enable-libfaad --enable-swscaler --cross-prefix=/usr/bin/
>>>>    libavutil version: 49.4.0
>>>>    libavcodec version: 51.40.4
>>>>    libavformat version: 51.12.1
>>>>    built on May 29 2007 10:54:40, gcc: 4.1.1 20070105 (Red Hat 4.1.1-51)
>>>>
>>>> Cheers,
>>>> Lorenzo
>>>>
>>>>
>>>> Klaus Darilion ha scritto:
>>>>> Hi Lorenzo!
>>>>>
>>>>> Now with ortp 0.13.1 and adding -lavutil:
>>>>>
>>>>> darilion at samuel:/export/darilion/confiance/confiance_videomixer-0.1$ make
>>>>> gcc  -ggdb -o cvm.o -c cvm.c -Wall -Wstrict-prototypes 
>>>>> -Wmissing-prototypes -Wmissing-declarations -O2
>>>>> gcc  -ggdb -o cvm_protocol.o -c cvm_protocol.c -Wall -Wstrict-prototypes 
>>>>> -Wmissing-prototypes -Wmissing-declarations -O2
>>>>> gcc  -ggdb -o cvm_session.o -c cvm_session.c -Wall -Wstrict-prototypes 
>>>>> -Wmissing-prototypes -Wmissing-declarations -O2
>>>>> gcc  -ggdb -o confiance_vm cvm.o cvm_protocol.o cvm_session.o -Wall 
>>>>> -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -O2 
>>>>> -lortp -lavcodec -lavformat -lavutil -lpthread
>>>>> /usr/local/lib/libavformat.a(utils.o)(.text+0x2947): In function 
>>>>> `av_find_stream_info':
>>>>> /export/darilion/confiance/ffmpeg/libavformat/utils.c:1908: undefined 
>>>>> reference to `avcodec_pix_fmt_to_codec_tag'
>>>>> /usr/local/lib/libavformat.a(allformats.o)(.text+0x21): In function 
>>>>> `av_register_all':
>>>>> /export/darilion/confiance/ffmpeg/libavformat/allformats.c:47: undefined 
>>>>> reference to `avcodec_register_all'
>>>>> /usr/local/lib/libavformat.a(raw.o)(.text+0xb3c): In function `ac3_probe':
>>>>> /export/darilion/confiance/ffmpeg/libavformat/raw.c:435: undefined 
>>>>> reference to `ff_ac3_parse_header'
>>>>> /usr/local/lib/libavformat.a(mov.o)(.text+0x213b): In function 
>>>>> `mov_read_cmov':
>>>>> /export/darilion/confiance/ffmpeg/libavformat/mov.c:1136: undefined 
>>>>> reference to `uncompress'
>>>>> /usr/local/lib/libavformat.a(mp3.o)(.text+0x92): In function 
>>>>> `mp3_read_probe':
>>>>> /export/darilion/confiance/ffmpeg/libavformat/mp3.c:410: undefined 
>>>>> reference to `ff_mpa_decode_header'
>>>>> collect2: ld returned 1 exit status
>>>>>
>>>>>
>>>>> I tried to change the order of the ffmpeg libraries during linking, but 
>>>>> then other errors occour.
>>>>>
>>>>>
>>>>> regards
>>>>> kalus
>>>>>
>>>>> Lorenzo Miniero wrote:
>>>>>> Hi Klaus,
>>>>>>
>>>>>> first of all thanks for giving the videomixer a try!
>>>>>>
>>>>>> libortp4 must be really updated, since the latest version of oRTP is 
>>>>>> 0.13.1, which is the one I'm using. In case you don't find a deb 
>>>>>> package, you can get the source here:
>>>>>>
>>>>>> 	http://download.savannah.nongnu.org/releases/linphone/ortp/sources/
>>>>>>
>>>>>> About FFmpeg, the LIBS variable is probably missing a -lavutil. Try 
>>>>>> adding it after -lavformat. Let me know if it fixes the problem and I'll 
>>>>>> correct it in the package too.
>>>>>>
>>>>>> Cheers,
>>>>>> Lorenzo
>>>>>>
>>>>>>
>>>>>> Klaus Darilion ha scritto:
>>>>>>> Hi Lorenzo!
>>>>>>>
>>>>>>> I have problems when linking the videomixer:
>>>>>>>
>>>>>>> cvm_session.o(.text+0x93b): In function `cvm_peer_new':
>>>>>>> /export/darilion/confiance/confiance_videomixer-0.1/cvm_session.c:315: 
>>>>>>> undefined reference to `rtp_session_set_connected_mode'
>>>>>>> /usr/local/lib/libavformat.a(utils.o)(.text+0x2947): In function 
>>>>>>> `av_find_stream_info':
>>>>>>> /export/darilion/confiance/confiance_videomixer-0.1/ffmpeg/libavformat/utils.c:1908: 
>>>>>>> undefined reference to `avcodec_pix_fmt_to_codec_tag'
>>>>>>> /usr/local/lib/libavformat.a(allformats.o)(.text+0x21): In function 
>>>>>>> `av_register_all':
>>>>>>>
>>>>>>> I use libort4 (from backports.org for debian woody) and
>>>>>>> ffmpeg self-installed from todays SVN trunk.
>>>>>>>
>>>>>>> Which version of ortp do you use.
>>>>>>>
>>>>>>> regards
>>>>>>> klaus
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Lorenzo Miniero wrote:
>>>>>>>> Klaus Darilion ha scritto:
>>>>>>>>> Hi Lorenzo!
>>>>>>>>>
>>>>>>>>> How can the VideoMixer be used with Asterisk?
>>>>>>>>>
>>>>>>>>> regards
>>>>>>>>> klaus
>>>>>>>> Hi Klaus,
>>>>>>>>
>>>>>>>> both the videomixers are external elements, which receive commands 
>>>>>>>> through dedicated protocols. The patch which you can get on 
>>>>>>>> http://confiance.sf.net/ enables MeetMe to talk this protocols, and to 
>>>>>>>> bridge the video RTP connections between the users and the active 
>>>>>>>> videomixer.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Lorenzo
>>>>>>>>
>>>>>>>>
>>>>>>>>> Lorenzo Miniero wrote:
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> I just uploaded on the CONFIANCE webpage, http://confiance.sf.net/, 
>>>>>>>>>> the patch to enable videomixing and continuous presence in MeetMe. 
>>>>>>>>>> The patch enables such functionality both for our enhanced MeetMe 
>>>>>>>>>> (i.e. video sources are enabled/disabled through BFCP moderation) and 
>>>>>>>>>> for basic MeetMe rooms (the videoswitch console command I uploaded 
>>>>>>>>>> some time ago is used to enable/disable video sources). All the 
>>>>>>>>>> instructions needed to build and configure it are attached with the 
>>>>>>>>>> patch.
>>>>>>>>>>
>>>>>>>>>> To provide such a feature MeetMe can make use of two videomixers:
>>>>>>>>>>
>>>>>>>>>>     * the CONFIANCE VideoMixer we're writing (available on 
>>>>>>>>>> http://confiance.sf.net/);
>>>>>>>>>>     * the VideoMixer Sergio Garcia Murillo is writing (available via 
>>>>>>>>>> svn, svn co http://sip.fontventa.com/svn/mcu, needs xmlrpc-c 1.1).
>>>>>>>>>>
>>>>>>>>>> You can choose which one to use by setting a value in the 
>>>>>>>>>> configuration file. You can even disable them both and still rely on 
>>>>>>>>>> basic videoswitching, if you're not interested in videomixing...
>>>>>>>>>>
>>>>>>>>>> All is work in progress, so both Sergio and I would really appreciate 
>>>>>>>>>> any kind of feedback you'll be able to provide us.
>>>>>>>>>>
>>>>>>>>>> I'll spend two words on my work, and I'll let Sergio speak of his own 
>>>>>>>>>> since I couldn't do it better than him. The CONFIANCE VideoMixer 
>>>>>>>>>> currently provides:
>>>>>>>>>>
>>>>>>>>>>     * adaptive layouts according to how many active video sources are 
>>>>>>>>>> feeding the mix;
>>>>>>>>>>     * continuous presence for up to 8 users (this can be easily 
>>>>>>>>>> enhanced by adding new layouts in the code; if you look at the code, 
>>>>>>>>>> you'll see that creating and modifying layouts is really simple);
>>>>>>>>>>     * a static logo when no video sources are active;
>>>>>>>>>>     * support for H.261, H.263 and H.263+ (QCIF only for the moment).
>>>>>>>>>>
>>>>>>>>>> Currently, only one global layout is available for all users in the 
>>>>>>>>>> same conference, but this will be changed in the future.
>>>>>>>>>>
>>>>>>>>>> We tested it with many softphones, as:
>>>>>>>>>>
>>>>>>>>>>     * Minisip, one the softphone we're enhancing to add XCON support, 
>>>>>>>>>> and which makes use of H.263+ as codec;
>>>>>>>>>>     * another custom client we're writing, making use of H.263 (JMF);
>>>>>>>>>>     * X-Lite 3.0, H.263;
>>>>>>>>>>     * Ekiga stable 2.0.x (H.261).
>>>>>>>>>>
>>>>>>>>>> All work quite fine except Ekiga, since H.261 support in our 
>>>>>>>>>> videomixer is still quite buggy (probaby related to how we handle the 
>>>>>>>>>> H,261 payload header), and sometimes makes Ekiga crash. Any feedback 
>>>>>>>>>> upon this will be more than welcome!
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> If you're interested in knowing something more about the 
>>>>>>>>>> implementation details and/or how the videomixers have been 
>>>>>>>>>> integrated in MeetMe, feel absolutely free to ask.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hope to hear you soon, regards,
>>>>>>>>>> Lorenzo
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> --Bandwidth and Colocation provided by Easynews.com --
>>>>>>>>>
>>>>>>>>> asterisk-video mailing list
>>>>>>>>> To UNSUBSCRIBE or update options visit:
>>>>>>>>>   http://lists.digium.com/mailman/listinfo/asterisk-video
>>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> --Bandwidth and Colocation provided by Easynews.com --
>>>>>>>
>>>>>>> asterisk-video mailing list
>>>>>>> To UNSUBSCRIBE or update options visit:
>>>>>>>    http://lists.digium.com/mailman/listinfo/asterisk-video
>>>>>>>
>>>>> _______________________________________________
>>>>> --Bandwidth and Colocation provided by Easynews.com --
>>>>>
>>>>> asterisk-video mailing list
>>>>> To UNSUBSCRIBE or update options visit:
>>>>>    http://lists.digium.com/mailman/listinfo/asterisk-video
>>>>>
>>> _______________________________________________
>>> --Bandwidth and Colocation provided by Easynews.com --
>>>
>>> asterisk-video mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>    http://lists.digium.com/mailman/listinfo/asterisk-video
>>>
>>
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video
> 


-- 
Lorenzo Miniero, Junior Researcher
Dipartimento di Informatica e Sistemistica
Università degli Studi di Napoli "Federico II"
Via Claudio 21 -- 80125 Napoli (Italy)
Phone: +390817683821 - Fax: +390817683816
Email: lorenzo.miniero at unina.it



More information about the asterisk-video mailing list