[MEncoder-users] Audio/Video desync during conversion by mencoder

Andrey Voropaev avorop at mail.ru
Thu Apr 16 11:53:09 CEST 2009


On Wed, Apr 15, 2009 at 1:35 PM, Jan Knutar <jknutar at nic.fi> wrote:
> On Thursday 09 April 2009, Andrey Voropaev wrote:
>
>> mencoder -o converted.avi -oac lavc -ovc lavc -vf scale=400:-2
>> original.mkv
>>
>> During conversion there was lots of skipped frames. The conversion
>> ended with the message
>>
>> Too many audio packets in the buffer: (4101 in 932920 bytes).
>> Maybe you are playing a non-interleaved stream/file or the codec
>> failed? For AVI files, try to force non-interleaved mode with the -ni
>> option.
>
> vorbis in the source .mkv? Try with -afm libvorbis or -afm theora
> Mencoder doesn't seem to work too well decoding audio through ffmpeg...

Well, these options also didn't help. I've tried to convert another video.
This time it was avi file and I've used command

mencoder -o converted.avi -oac copy -ovc lavc -vf scale=400:-2 original.avi

The result was good. But then I've tried to replace -oac copy with
-oac lavc and the resulting
file had no a/v sync. Here when I would try to skip part of the video,
the audio would start from the
beginning :) Again, converting with option -oac mp3lame produced
synchronized file. Here, the original
file had mp3 encoded audio.

Going back to first MKV file. There, the audio is encoded using
Vorbis. mplayer -identify reports

ID_AUDIO_FORMAT=vrbs
ID_AUDIO_CODEC=ffvorbis
ID_VIDEO_CODEC=ffh264

If I try to use -oac copy, then I get error
Audio format 0x73627276 is incompatible with '-oac copy'

I think though, the problem here is not with audio, but with video.
During conversion lots of frames are skipped. I think, this
makes video noticeably shorter. When I tried to convert avi file,
there were only 2 frames skipped. That file has ID_VIDEO_CODEC=ffodivx


More information about the MEncoder-users mailing list