Skip to content

Instantly share code, notes, and snippets.

@tranthamp
Created June 29, 2012 20:49
Show Gist options
  • Save tranthamp/3020557 to your computer and use it in GitHub Desktop.
Save tranthamp/3020557 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