chaining transcode modules

About encoding, codec settings, muxers and filter usage
sharbatgula
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2012 11:57

chaining transcode modules

Postby sharbatgula » 02 Nov 2013 10:18

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: chaining transcode modules

Postby Jean-Baptiste Kempf » 05 Nov 2013 20:52

Why are you transcoding twice?

Try to put the duplicate just after the sout.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

sharbatgula
Blank Cone
Blank Cone
Posts: 15
Joined: 24 Jul 2012 11:57

Re: chaining transcode modules

Postby sharbatgula » 06 Nov 2013 08:30

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.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests