2

I am trying use some images and audio to create video using mencoder. But my audio file could be much longer.

Example:
5 images. 
fps: 1
desired video length: 5 seconds
audio file length is: 20 seconds.

mencoder mf://*.jpg -mf fps:1.0 -oac mp3lame -audiofile myaudio.mp3 -ovc lavc vcodec=mpeg4 -o myvideo.mpeg

This produces a video that is:
20 seconds long (as long as audio file length).
The image slide show ends at 5 seconds, after that there is only audio playing (from 6th to 20th second).

How can i make mencoder to generate video of only duration where video stream exists. In this case end the video at 5 seconds.

ffmpeg has a -shortest option for exactly this kind of use case. But i cannot find equivalent of that in mencoder.

Jasper
  • 8,440
  • 31
  • 92
  • 133
  • Why not parse out the duration of streams and then provide the shortest as number of seconds to encode? This is just in case mencoder does not have the option – av501 Jul 30 '14 at 12:54
  • Did you ever find a way to do this? I just came across the same scenario, and haven't been able to find any info on how to do this with mencoder. – Rob Oct 19 '18 at 17:21

0 Answers0