I'm using mencoder and ffmpeg to make videos with music playing over a single image. The videos play fine but I can't seek at all. I've tried generating them with -idx and even -forceidx and keyint with mencoder but I couldn't get it to work. The only option I saw for this with ffmpeg was force_key_frames but it seems I'd have to set each time explicitly.

I'd specifically like this to work with Totem. When I do try to seek with Totem it restarts the video. I can seek with other videos processed with mencoder/ffmpeg where I started with a video from another source. I'm only having trouble with these videos that I'm creating from images.

The basic encoding commands I'm using are:

mencoder "mf://image.jpg" -mf w=480:h=360:type=jpg -o mencoder_out.avi -ovc lavc -lavcopts vcodec=mpeg4:aspect=4/3:keyint=30 -audiofile music.mp3 -oac copy -fps 1/300.0 -ofps 30 -idx


ffmpeg -i image.jpg -i music.mp3 -acodec copy ffmpeg_out.avi

With mencoder I've also tried using a separate pass to add the key frames:

mencoder -idx mencoder_out.avi -o mencoder_indexed.avi -ovc copy -oac copy
  • note: with mencoder I usually add other lavcopts like vbitrate and mbd but none of those have had any effect on this problem as far as I can tell

1 Answer 1


I figured it out for ffmpeg. I added -f image as an input option for the image like so:

-f image2 -i image.jpg

I found the answer indirectly on superuser and his tip for -loop_input -shortest helped me a lot too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .