Skip to content

Instantly share code, notes, and snippets.

@Moriarty16
Forked from tranthamp/video conversion
Created August 30, 2018 07:34
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 Moriarty16/1b519c2ffe85ac23b5410a2f19e39c9e to your computer and use it in GitHub Desktop.
Save Moriarty16/1b519c2ffe85ac23b5410a2f19e39c9e to your computer and use it in GitHub Desktop.
Some video / image conversion commands
// List available formats for ffmpeg
ffmpeg -pix_fmts
// Convert a 720x480 nv12 (yuv 420 semi-planar) image to png
ffmpeg -s 720x480 -pix_fmt nv12 -i captdump-nv12.yuv -f image2 -pix_fmt rgb24 captdump.png
// Convert a 640x480 uyvy422 image to png
ffmpeg -s 640x480 -pix_fmt uyvy422 -i frame-000003.yuv -f image2 -pix_fmt rgb24 captdump.png
// Display a 640x480 grayscale raw rgb file
display -size 640x480 -depth 8 captdump-nv12.rgb
// Convert a 640x480 grayscale raw rgb file to png
convert -size 640x480 -depth 8 captdump-nv12.rgb image.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment