Page 1 of 1

chaining transcode modules

Posted: 02 Nov 2013 10:18
by sharbatgula
Hi,

I'm trying to build a syntax that will provide coherent multiple bitrate streams so that switching among bitrates will be seamles. I'm afraid that if I separate the streams to sperate vlc instances or separate vlm items, the coherence is not ideal. Also, I want to optimize CPU utilization by cascading the output of the first transcoding module to the next one, instead of always feeding the full resolution full bitrate.
I'm trying with the following syntax but it works only to the second dst instance. The chunks for the first bitrate are being produced but it looks that VLC stops right before the second transcode instance. Is my syntax wrong or?

:sout=#transcode{vcodec=h264,venc=x264{aud,profile=baseline,keyint=100,ref=1,level=13,vbv-maxrate=800,vbv-bufsize=1000,slice-max-mbs=6000},ab=64k,channels=2,samplerate=44100,audio-sync,deinterlace{deinterlace=linear},fps=25,width=640,height=480,acodec=mp4a,aenc=ffmpeg{strict=-2}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=S:\vlchls03\high\mtv31.m3u8,index-url=mtv3-1#######.ts},mux=ts{use-key-frames},dst=S:\vlchls03\visoko\mtv3-1#######.ts},dst=transcode{vcodec=h264,venc=x264{aud,profile=baseline,keyint=100,ref=1,level=13,vbv-maxrate=250,vbv-bufsize=1000,slice-max-mbs=6000},audio-sync,fps=25,width=320,height=240,ab=64,acodec=copy,aenc=ffmpeg{strict=-2}}:std{access=livehttp{seglen=10,delsegs=true,numsegs=10,index=S:\vlchls03\low\mtv30.m3u8,index-url=mtv3-0#######.ts},mux=ts{use-key-frames},dst=S:\vlchls03\nisko\mtv3-0#######.ts}} :sout-keep

Re: chaining transcode modules

Posted: 05 Nov 2013 20:52
by Jean-Baptiste Kempf
Why are you transcoding twice?

Try to put the duplicate just after the sout.

Re: chaining transcode modules

Posted: 06 Nov 2013 08:30
by sharbatgula
Well, my idea behind transcoding twice is that VLC has already used some muscle to transcode the high bitrate input to something more suitable for the highest bitrate output in my HLS setup. Now, just before muxing that, I duplicate, then mux the first branch and in the second branch I feed the second instance of transcode with the lower bitrate/resolution output of the first instance. I just wanted to see if by doing that, the second instance of transcode will consume less CPU. But it looks that duplicate module doesn't like the combination of transcode and std in its branches. I tried both branches with transcode and it works but both outputs stutter and picture is broken as if duplicate struggles to deliver to both instances.
I will check sout:#duplicate syntax in combination with the my example, if that is what you imply.

Thanks.