@echo off
rem To use, simply drag and drop a video onto this .bat file, and it will
rem be transcoded to a file with the same filename with .m2v appended.
rem Some files will not be successfully transcoded. This is due to the
rem fact that mpeg2 video only allows several specific framerates.
rem If your source file frame rate doesn't comply, try adding fps=25
rem or fps=29.97 in #transcode{...,<add it here>}:es{...}
rem Set width and height below to match your player and the file
set WIDTH=176
set HEIGHT=128
rem Recommended sizes for various players and video aspects:
rem Players LCD Size 4:3 Video 16:9 Video
rem iriver H300 & ipod Color/Photo 220x176 224x176 224x128
rem ipod Nano 176x132 176x128 176x96
rem ipod Video 320x240 320x240 320x176
rem iaudio X5 160x128 160x128 160x96
rem You may want to change the path to vlc.exe below if it is not installed
rem in this location
"C:\Progra~1\VideoLAN\VLC\vlc.exe" %1 --sout=#transcode{vcodec=mp2v,acodec=mp3,vb=256,fps=25,ab=128,samplerate=44100,width=%WIDTH%,height=%HEIGHT%}:std{access=file,mux=ps,dst=%1.mpg}