[MEncoder-users] Inserting image files at absolute time offset into video stream?
Giacomo Comes
comes at naic.edu
Tue Nov 21 17:51:14 CET 2006
On Tue, Nov 21, 2006 at 09:29:43AM -0700, Terry Evans wrote:
> I'm really, really new to mencoder (just downloaded it yesterday in fact),
> and through my searching I haven't been able to find a way to insert image
> files at absolute offsets into the encoded video stream.
>
> As a little background, here's what I'm trying to do:
>
> On a Windows PC I'm recording the audio stream and then taking a screen
> capture of the desktop about every second and saving all of those images and
> the audio file to a directory. The problem I'm having is that if I encode a
> video with a fps=1 then the audio and video end up getting out of sync over
> time. After about two minutes the audio and video are off by about 7
> seconds, for example.
>
> What I'd like to be able to do is for each screen capture to specify the
> absolute time when each image should be inserted into the video stream,
> something like:
>
> ScreenCapture1.png at 0.00 seconds
> ScreenCapture2.png at 1.05 seconds
> ScreenCapture3.png at 2.15 seconds
> ....
>
> Is there any way of doing something like this?
Yes but not exactly. The requirement is that the frame rate between the screenshot
has to be constant. In your examples it is 1.05 and 1.10 sec and that wont work.
Example command line:
mencoder -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi mf://ScreenCapture*.png -fps 0.952 -audiofile source.wav -ofps 25 -oac toolame -toolameopts br=224
This is a VERY basic command line that will create an avi assuming that the time
between screenshot is 1.05 sec.
You may improve the command line as you need. (audio codec, video codec/quality,
container, etc.).
Giacomo
More information about the MEncoder-users
mailing list