Skip to content

Instantly share code, notes, and snippets.

@admalledd
Created December 7, 2012 01:09
Show Gist options
  • Save admalledd/4229911 to your computer and use it in GitHub Desktop.
Save admalledd/4229911 to your computer and use it in GitHub Desktop.
vlc convert
@echo off
rem save this file somewhere on your computer with the file name "ts_to_mp4.bat" (or anything so long as it ends in .bat
set output=%1
set output='%output:~1,-4%.mp4'
echo about to convert %1 to %output% with vlc. continue?
pause
rem below the @echo on line is the VLC transcode command. the first part that is in quotes is the path to
rem vlc.exe, note that there are quotes around it, and it is the full path. If you used the default
rem instilation, you should be either of the next two comment lines:
rem "C:\Program Files\VideoLAN\VLC\vlc.exe"
rem "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
rem If you did not do the default instilation, find and use that path instead.
rem this converts $video.ts into $video.mp4 with max quality settings
@echo on
"C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy -vvv %1 --sout "#transcode{vcodec=h264,vb=0,scale=0,acodec=mpga,ab=192,channels=2,samplerate=44100}:standard{mux=mp4,dst=%output%,access=file}" vlc://quit
@echo off
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment