Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

and

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
share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

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.