Skip to content

Instantly share code, notes, and snippets.

@endymuhardin
Created June 27, 2011 10:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save endymuhardin/1048657 to your computer and use it in GitHub Desktop.
Save endymuhardin/1048657 to your computer and use it in GitHub Desktop.
Convert ogv to mp4 with H264 encoding, create poster, upload to server
ffmpeg -r 1 -t 1 -vframes 1 -i input-file.mp4 output-file.png
ffmpeg -vcodec libx264 -vpre lossless_medium -i file-input.ogv file-output.mp4
ffmpeg -pass 1 -passlogfile file-input.ogv -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i file-input.ogv -vcodec libvpx -b 614400 -s 640x480 -aspect 4:3 -an -y tmp.webm
rm tmp.webm
ffmpeg -pass 2 -passlogfile file-input.ogv -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i file-input.ogv -vcodec libvpx -b 614400 -s 640x480 -aspect 4:3 -an -y file-output.webm
rsync -avz /path/to/video/folder user@example.com:/home/user/public_html/videos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment