Skip to content

Instantly share code, notes, and snippets.

@jasonwmiller
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save jasonwmiller/4372a762bf89ac8fe52d to your computer and use it in GitHub Desktop.

Select an option

Save jasonwmiller/4372a762bf89ac8fe52d to your computer and use it in GitHub Desktop.
ffmpeg for website videos
first install ffmpeg
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
copy your source file to input.mp4
to process to mp4 run:
ffmpeg -i input.mp4 -vcodec libx264 -crf 31 -an -vf scale=1280:720 output.mp4
to process to webm run:
ffmpeg -i input.mp4 -c:v libvpx -an -vf scale=1280:720 output.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment