Skip to content

Instantly share code, notes, and snippets.

@owenandrews
Last active September 6, 2019 00:13
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 owenandrews/eb2acde176ec51dbf2d3766b06391f60 to your computer and use it in GitHub Desktop.
Save owenandrews/eb2acde176ec51dbf2d3766b06391f60 to your computer and use it in GitHub Desktop.
Handy ffmpeg commands

Handy ffmpeg commands

Extract frame from video (replace x with desired frame number)
ffmpeg -i <input> -vf "select=eq(n\,x)" -vframes 1 poster.png

Recompress MP4 (replace x with desired bytes/s e.g. 10000)
ffmpeg -i <input>.mp4 -b x <output>.mp4

Convert PNG sequence to Prores 422 (expects file names incrementing from 0000000.png)
ffmpeg -r 25 -f image2 -i %07d.png -c:v prores_aw -profile:v 1 -pix_fmt yuv422p10 -r 25 <output>.mov

Convert WebM to Prores 422
ffmpeg -i <input>.webm -c:v prores_aw -profile:v 1 -pix_fmt yuv422p10 -r 25 <output>.mov

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