Difference between revisions of "VLC HowTo/Transcode multiple videos"

From VideoLAN Wiki
Jump to navigation Jump to search
 
Line 12: Line 12:
 
=== Windows ===
 
=== 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 ===
 
=== Unix / Linux ===
Line 27: Line 27:
 
  for a in *$fmt; do
 
  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=\"$a.$ext\",access=file}" vlc:quit
 
  $vlc -I dummy -vvv "$a" --sout "#transcode{vcodec=$vcodec,vb=$bitrate,acodec=$acodec,ab=$arate,channels=6}:standard{mux=$mux,dst=\"$a.$ext\",access=file}" vlc:quit
 +
done

Revision as of 08:29, 30 May 2007

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.

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"
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=\"$a.$ext\",access=file}" vlc:quit
done