Page 1 of 1

Fail to use duplicate and transcode at the same time

Posted: 18 Jun 2011 05:24
by johnnyauyeung
I've a problem in using duplicate and transcode at the same time with vlc 1.1.5, 1.1.9 and 1.1.10.
I think there may be something wrong with my command. I tried those example I found from Internet
but none of them worked.

I can duplicate a stream to two different multicast stream by using this command line:
vlc input_stream :sout=#duplicate{dst=udp{dst=239.1.1.1:1234},dst=udp{dst=239.1.1.2:1234}} :ttl=2 :sout-keep

I can transcode a stream to half side multicast stream by using this command line:
vlc input_stream :sout=#transcode{vcodec=h264,vb=0,scale=0.5}:udp{dst=239.1.1.1:1234} :ttl=2 :sout-keep

However, when I try to send a stream with originial size and have a transcoded stream at the same time by using the
following command, it will not work.
vlc input_stream :sout=#duplicate{dst=transcode{vcodec=h264,vb=0,scale=0.5}:udp{dst=239.1.1.1:1234},dst=udp{dst=239.1.1.2:1234}} :ttl=2 :sout-keep

Re: Fail to use duplicate and transcode at the same time

Posted: 23 Oct 2011 07:29
by bartfartagain
I've been fighting with this as well. I've tried two methods:
:sout=#rtp{sdp=rtsp://:8554/800}:duplicate{dst=transcode{vcodec=h264,vb=300,fps=12,scale=0.5,acodec=mp4a,ab=64,channels=2,samplerate=22050}:rtp{sdp=rtsp://:8554/300}}
With this method I get the first rtsp stream just fine but the message output shows:
stream_out_duplicate debug: creating 'duplicate'
stream_out_duplicate debug: * adding `transcode{vcodec=h264,vb=300,fps=12,scale=0.5,acodec=mp4a,ab=64,channels=2,samplerate=22050}'
main debug: stream=`transcode'
main debug: looking for sout stream module: 1 candidate
stream_out_transcode error: cannot create chain
main debug: no sout stream module matching "transcode" could be loaded
main debug: TIMER module_need() : 0.381 ms - Total 0.381 ms / 1 intvls (Avg 0.381 ms)
main debug: destroying chain... (name=(null))
main debug: destroying chain done
stream_out_duplicate error: * ignore unknown option `rtp'
stream_out_duplicate error: no destination given
main debug: no sout stream module matching "duplicate" could be loaded

:sout=#duplicate{dst=rtp{sdp=rtsp://:8554/800},dst=transcode{vcodec=h264,vb=300,fps=12,scale=0.5,acodec=mp4a,ab=64,channels=2,samplerate=22050}:rtp{sdp=rtsp://:8554/300}}
With this method the first rtsp stream is duplicated and streamed just fine but there is no message output at all about the other destination. Any idea what I'm doing wrong?
It seems that the transcode module doesn't work when called as a destination of the duplicate module. I can successfully duplicate to multiple rtp destinations but I need to transcode the second, third and so on to lower resolution, fps and data rate before streaming. The documentation indicates this is possible and even provides examples, but none of them work for 1.1.5, 1.1.9, 1.1.10, 1.1.11 or even the nightly builds. Seems broke to me based on the other comments.

Re: Fail to use duplicate and transcode at the same time

Posted: 09 Jan 2012 14:21
by beminoz
Try like this, it worked.. { } ;)

:sout=#duplicate{dst=rtp{sdp=rtsp://:8554/800},dst={transcode{vcodec=h264,vb=300,fps=12,scale=0.5,acodec=mp4a,ab=64,channels=2,samplerate=22050}:rtp{sdp=rtsp://:8554/300}}}

Re: Fail to use duplicate and transcode at the same time

Posted: 29 Mar 2012 10:25
by mirzaaaamir
Hi, beminoz

Could you please help me, How could I achieve 2 different transcoded sdp from one single INPUT ?

BR