Skip to content

Instantly share code, notes, and snippets.

@florentroques
Last active July 16, 2018 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save florentroques/63196cfe9e24dbf0c49f5b0a5dd0e9bb to your computer and use it in GitHub Desktop.
Save florentroques/63196cfe9e24dbf0c49f5b0a5dd0e9bb to your computer and use it in GitHub Desktop.

install ffmpeg with all options on MacOS

brew install ffmpeg $(brew options ffmpeg | grep -vE '\s' | grep -- '--with-' | tr '\n' ' ')

source:https://gist.github.com/Piasy/b5dfd5c048eb69d1b91719988c0325d8#gistcomment-2571754

mov to mp4

ffmpeg -y -i video.mov -c:v libx264 -crf 23 -profile:v baseline \
-c:a aac -strict experimental video.mp4

ffmpeg -an -i video.mov -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 video.mp4

mp4 to webm

ffmpeg -i video.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis video.webm

get first frame of video

ffmpeg -ss 00:00:00 -i video.mov -vframes 1 -q:v 2 video_first_frame.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment