[MPlayer-users] mencoder: Non-dvd encoding

Mike Mohr akihana at gmail.com
Sat Mar 21 21:19:40 CET 2009


I've been struggling with this exact problem for a long time.  It is
present with transcode as well as mplayer and I haven't found a way to
work around it.  The problem appears to be that the DVD-Video spec
allows for the audio stream to have gaps in playback.  The media
companies have figured out that if they add gaps in just the right way
it will cause audio/video desynchronization unless your tool is smart
enough to handle them.  The problem is exacerbated by the fact that
you're re-encoding the video to a different bitrate.  The only way I
can think of solving hte problem would be (a) your suggestion (sync to
keyframes) or (b) read the DVD spec and discover exactly how the gaps
are inserted, then patch mencoder.

Both (a) and (b) are a lot of work, especially for a non-mplayer
developer, so I can understand why mplayer doesn't support it
properly.  Why not just keep the video in its original container?  I
just picked up a 1.5TB drive at Fry's the other day for $125; I hear
they're down to $99 in some places now too.  You can store over 185
8GB DVD images on such a disk.

Mike

On Sat, Mar 21, 2009 at 9:39 AM, Greg Bryant <bryantgtx at gmail.com> wrote:
> Now that I'm compiled and running on all platforms (updated win box to this
> morning's svn to fix the last problem), I'm trying to learn more about the
> encoding options.  My target is h264 using libx264/aac in mp4 containers.
> I've been through chapter 11 in the HTML docs, but am still struggling with
> my test case - a 24fps 4m20s MOV video clip, trying to transcode it to MP4,
> and always getting progressive A/V sync issues (audio ends up around 30s
> late by the end).  Here's my base encoding line:
> mencoder input.mov -o output.mp4 -ovc lavc -lavcopts vcodec=libx264 - oac
> copy -mc 0
>
> I've played with a variety of options, including varying the -ofps, which
> just ended up dropping frames without seeming to affect the sync, -vf
> harddup which didn't seem to do anything (not sure I understand that one
> totally yet anyway), and some minor tweaks to lavcopts.
>
> Is this more an audio thing - need to specify audio options rather than just
> copy?
>
> Is there a way to keyframe sync audio and video?
>
> At least my output file is totally consistent across linux, mac and win!
> Thanks for any suggestions, doc pointers, etc.
>
> Greg
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>


More information about the MPlayer-users mailing list