VLC HowTo/Transcode multiple videos

From VideoLAN Wiki
Revision as of 00:00, 31 May 2007 by Tonsofpcs (talk | contribs) (→‎Unix / Linux: added destination selection, ./$a to be sure its checking path run from)
Jump to navigation Jump to search

Idea

The idea is to use VLC to do some batch work to encode or transcode multiple files one after each other, without having to care about it.

You may want to transcode all your videotheque to another format to play them on an IPod, a Zune, a PS3 or a Xbox.

Codecs / Muxers

You have to choose the correct codecs for the device you want to transcode for.

We choose here H.264 with AAC in a MPEG-2/TS muxer as an example.

Command Lines

Windows

for %%a in (*.VOB) do "C:\Program Files\VideoLAN\VLC\vlc" -I dummy -vvv %%a --sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=%%a.mpg} vlc:quit

Unix / Linux

vcodec="h264"
acodec="mp4a"
bitrate="1024"
arate="192"
ext="mpg"
mux="ts"
vlc="/usr/bin/vlc"
fmt="VOB"
dst="/home/user/"

for a in *$fmt; do
$vlc -I dummy -vvv "./$a" --sout "#transcode{vcodec=$vcodec,vb=$bitrate,acodec=$acodec,ab=$arate,channels=6}:standard{mux=$mux,dst=\"$dst$a.$ext\",access=file}" vlc:quit
done