Skip to content

Instantly share code, notes, and snippets.

@5310
Created December 4, 2012 13:20
Show Gist options
  • Save 5310/4203806 to your computer and use it in GitHub Desktop.
Save 5310/4203806 to your computer and use it in GitHub Desktop.
Commands for converting video files with FFMPEG into web-capable formats. For Windows, unfortunately, but can be trivially altered. #script
:: H.264
ffmpeg -i "%1" -b:v 1M -vcodec libx264 -pix_fmt yuv420p "%~dpn1.mp4" -y
:: WebM
ffmpeg -i "%1" -b 1M -f webm "%~dpn1.webm" -y
@5310
Copy link
Author

5310 commented Dec 4, 2012

Learnt that on the Windows command prompt, one can easily get the file argument's drive, path, and raw name:
http://stackoverflow.com/questions/1472191/getting-the-file-name-without-extension-in-a-windows-batch-script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment