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.