Log in

View Full Version : VLC Transcoding from the command line


JonE
11th October 2010, 21:34
Has anyone managed to get vlc to transcode a video file from one format to another using VLC ?

I have an example file (paddy4.flv) which vlc can play and if I use the vlc gui it will convert to, say, mp4 which plays back just fine. However I can not find any way of achieving the same from the command line.

For example (from http://wiki.videolan.org/Transcode):-
vlc -vvv "paddy4.flv" --sout=#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:standard{access=file,mux=ts,dst="C:\delme.mpg"}
Does not work under Vista (V1.0.1 or V1.1.0 rc - simply plays the video in realtime without transcoding), goes through the motions of working under XP (Vlc v1.1.6) but after a few seconds of playing the converted video it degenerates into garbage.

From http://lifehacker.com/397573/master-your-digital-media-with-vlc
vlc.exe "paddy4.flv" :sout=#transcode{vcodec=mp4v,vb=1024,scale=1,height=240,width=320,acodec=mp4a,ab=128,channels=2}:duplicate{dst=std{access=file,mux=mp4,dst="C:\delme.mp4"}}
Fails on XP - vlc seems to hang.

From http://en.flossmanuals.net/TheoraCookbook/VLCEncoding
vlc -vvv "paddy4.flv" --sout="#transcode{vcodec=theo,vb=800,scale=1,deinterlace=0,acodec=vorb,ab=128,channels=2,samplerate=44100}:standard{access=file,mux=ogg,dst='my_theora_video.ogv'}"
Seems to go through the motions of encoding, albeit slowley. However the output file is garbage (it plays the ~4min video in a few seconds whilst audio plays at normal rate).

From http://research.m1stereo.tv/wiki/index.php/Build_video_enc
vlc "paddy4.flv" vlc:quit --sout '#transcode{vcodec=mp4v,vb=168,width=176,height=144,deinterlace,acodec=mp4a,ab=32,channels=2,samplerate=22100}:std{access=file,mux=mp4,dst="c:\delme3.mp4"}'
Vlc player runs up - and nothing happens.

So two questions, 1) has transcoding support been removed from vlc, else 2) has anyone got a working command line I can use (mpeg4)?

Sure, I can use ffmpeg, but the idea was to be able to view the video prior to transcoding (maybe specifying a bit to trim off the start/end) and by using the same component to both view and transcode I could be sure that if a file were viewable then it would also be transcodable (at least that was the plan).

TTFN,
Jon

The Scientist
11th October 2010, 23:30
Not that I'm going to be of much help but I just tried your first command line example from the WiKi, with just changing the "*.flv" file and it worked fine, I'm on Windows 7.