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.

I've an .avi video (divx) that's at 25fps and it has mp3 audio at 64kbit/s. This video has just one image throughout the entire video.

I'm trying to convert this video to mp4 but to make it as small as possible (as there is just 1 frame really!)

I'm currently trying this:

ffmpeg -i video.avi -vcodec libx264 -acodec aac \
-ar 32000 -ab 64k -ac 2 -strict -2 -y video.mp4

But this makes an mp4 video that's similar size to .avi.

Next I tried changing frame-rate to 1fps:

ffmpeg -i video.avi -vcodec libx264 -acodec aac \
-ar 32000 -ab 64k -ac 2 -strict -2 -y -r 1 video.mp4

This made the video file much smaller (10x smaller) but it has an issue that the key-frame doesn't appear at 1st frame of the video. So the only frame in the video appears like 8 or 10 seconds in the video (!).

It looks like the problem here is that ffmpeg keeps dropping frames from video.avi and it doesn't write them to video.mp4 as keyframes. When it does write a keyframe it's late in the video.

It tried using -force_key_frames argument but that didn't help either. I did -force_key_frames 0 and -force_key_frames 1.

Does anyone know how I could create a really small mp4 video with just 1 static frame?

share|improve this question
Whether it's AVI or MP4 doesn't matter, these are just containers and may include different video codecs (which determine the size). Do you have a sample of that video, maybe? Which FFmpeg version are you using? –  slhck Oct 3 '12 at 18:42
By definition, 64kb/s MP3 and 64kb/s AAC audio will both give you the same filesize - and transcoding such low-bitrate MP3 to any lossy codec will probably lose you noticeable quality. Just use -c:a copy for the audio, or -acodec copy for older versions of ffmpeg. –  evilsoup Feb 1 '13 at 3:25
Why not also just rip out the audio, make a standalone image file and re-compile it using the image file as the video input, so its not transcoding anything? –  EkriirkE May 8 at 5:57

2 Answers 2

You should check if the video-part is really a factor by separating the A/V-components

with ffmpeg this works with

#retrieve audio-only
ffmpeg -i <<VideoName>> -vn -acodec copy -f <<AudioCodec>> output.audio
#retrieve video-only
ffmpeg -i <<VideoName>> -an -vcodec copy -f <<VideoCodec>> output.video

If the video is really significant in size, one possibility would be to create a screenshot of it, and use the image as input for the video-coder, instead of recoding the videostream

see ffmpeg.org/wiki for reference

#create screenshot from video
ffmpeg -i <<VideoName>> -ss 00:00:01.0 -f image2 -vframes 1 output.screen

You can see on this stackoverflow-post how to make a video from a still

share|improve this answer

If you just want to convert it, use a program called Format factory (link here: http://www.pcfreetime.com/) It can convert the file straight to mp4 for you, and you can set it to small size

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.