Tell me more ×
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 at 3:25

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.