Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to take Screenshots from an AVI file I get the above message with an empty jpg/png file. But Screenshots from MP4 files works with any problems.

My OS is Debian.

MP4 Command:

ffmpeg  -itsoffset -4  -i test.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

AVI Command:

ffmpeg  -itsoffset -4  -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg
share|improve this question

migrated from Oct 3 '11 at 6:04

This question came from our site for professional and enthusiast programmers.

I think you want -f image2 instead of -f rawvideo. This tells ffmpeg to write an image, rather than an uncompressed video stream. An uncompressed video stream obviously cannot be saved in a still image file.

Also, since you're saving to JPEG, you should use -vcodec copy to avoid applying lossy JPEG compression unnecessarily.

share|improve this answer

You must log in to answer this question.