[MEncoder-users] mencoder concatenation warps audio out of sync

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 6 23:40:58 CET 2009


On Fri, Nov 06, 2009 at 01:51:30PM -0800, mencoder at perlmeister.com wrote:
> On Fri, 6 Nov 2009, Reimar Döffinger wrote:
> 
> > Well, it's rather simple, if you play the title.avi with -novideo you
> > will realize that the audio is 2.4 seconds long, the video is only 1.7
> > seconds, making a difference of 0.7 seconds.  The right fix is to make
> > the audio of title.avi the right length
> 
> Nice find, thanks! What's the easiest way to create silent audio for the
> length of this video?

Probably copying sample_size*channels*sample_rate*desired_duration bytes
from /dev/null and using the -rawaudio stuff.

> produce a video made out of JPEGs in
> 
>      mencoder 'mf://dir/*.jpg' -mf fps=30 -o title.avi \
>          -ovc lavc -lavcopts vcodec=mjpeg:vbitrate=1000
> 
> that has silent audio of a given encoding (like mp3)?

First step as above and use -audiofile -audio-demuxer rawaudio -rawaudio
....


More information about the MEncoder-users mailing list