Skip to content

Instantly share code, notes, and snippets.

@kfitfk
Last active September 22, 2021 02:59
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 kfitfk/9666bd6ecbd080e08c243e544c794c62 to your computer and use it in GitHub Desktop.
Save kfitfk/9666bd6ecbd080e08c243e544c794c62 to your computer and use it in GitHub Desktop.
extract a frame with transparency from a webm file using ffmpeg
# Replace 34 from select=eq(n\,34) with any frame number. Frame starts from 0.
ffmpeg -vcodec libvpx-vp9 -i input_file.webm -pix_fmt rgba -vf "select=eq(n\,34)" -vframes 1 output_file.png
# To generate a png file for each frame, use something like "frames/%04d.png" as the output file name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment