Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

migrated from stackoverflow.com Oct 3 '11 at 6:04

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

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.