I am working on a project where I need to broadcast live streams to multiple clients when requested. On the client side, the available codecs are g.711 and h.264 for audio and video respectively. Now, I can stream both audio and media using "mp4a" codec for audio however, after transcoding it, it becomes MPEG-2 format which the client side doesn't support this function (for MPEG-2 formats, it can only decode video parts properly but audio is lost in the process). Here's my sample code (btw I am working on VC 2008):
Code: Select all
CString path1 = "mms://95.0.159.138/TV1";
CString str="#transcode{vcodec=h264,vb=800,vfilter=canvas{width=320,height=240,aspect=4:3},scale=1,acodec=mp4a,ab=16,channels=2,samplerate=8000}:duplicate{dst=rtp{dst=192.168.128.154,port=5060,mux=ts},dst=display}";
libvlc_vlm_add_broadcast(vlcInstance,
"test",
path1,
str,
0,
NULL,
TRUE,
0);
libvlc_vlm_play_media(vlcInstance, "test");
P.S: On the client side, I listen to 5060 rtp port, do I need to listen to two different ports for audio and video streams?