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

Andrey Voropaev avorop at mail.ru
Thu Apr 9 17:25:27 CEST 2009


On Thu, Apr 9, 2009 at 4:05 PM, belcampo <belcampo at zonnet.nl> wrote:
> Andrey Voropaev wrote:
>>
>> Hello!
>>
>> Sorry, I'm complete newbie in the area of video, all I wanted is to
>> make video file small enough to play on my PDA.
>>
>> Original size was 700x404 and I wanted to reduce it to 400x230. First
>> I tried to use command
>>
>> mencoder -o converted.avi -oac copy -ovc copy -vf scale=400:-2
>> original.mkv
>>
>> It failed with the error
>>
>> Audio format 0x73627276 is incompatible with '-oac copy', please try
>> '-oac pcm' instead or use '-fafmttag' to override it.
>>
>> Then I've tried
>>
>> 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.
>>
>> In the resulting file the audio was well behind video. Option -noskip
>> didn't help. What would be the proper way to convert the file?
>>
>> When playing original file mplayer reports the following
>>
>> [mkv] Track ID 1: video (V_MPEG4/ISO/AVC) "Spice and Wolf: Wolf and
>> Distant Past", -vid 0
>> [mkv] Track ID 2: audio (A_VORBIS) "2ch Vorbis", -aid 0, -alang jpn
>> [mkv] Track ID 3: subtitles (S_TEXT/ASS) "Styled Subtitles", -sid 0,
>> -slang eng
>> [mkv] Will play video track 1.
>> Matroska file format detected.
>> VIDEO:  [avc1]  704x400  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
>> [ass] auto-open
>> [ass] Init
>> [ass] Updating font cache.
>> ==========================================================================
>> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
>> Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
>> ==========================================================================
>> ==========================================================================
>> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
>> AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
>> Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
>> ==========================================================================
>> AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
>> Starting playback...
>> VDec: vo config request - 704 x 400 (preferred colorspace: Planar YV12)
>> VDec: using Planar YV12 as output csp (no 0)
>> Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
>> VO: [xv] 704x400 => 704x400 Planar YV12
>>
>> Would appreciate any help!
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
> Besides your question, will your PDA be able to decode avc1 stuff at a
> bitrate which was presumably intended to play on tv/computer-screen ?
> I think you 1st need to investigate what your PDA can play, not only
> screensize.

Well, the truth is, there's a script that generates necessary command
line for mencoder, but result of that conversion is still the same -
no synchronisation, that is why I've started to try simple conversions
first :) Here's the full command line

 mencoder -o spice2.avi -srate 44100 -oac mp3lame -lameopts
vbr=0:br=128 -af volnorm -ofps 23.976 -vf-add crop=666:400 -vf-add
scale=320:192 -vf-add unsharp=c4x4:0.3:l5x5:0.5 -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=350:aspect=320/192:vrc_buf_size=450:vrc_minrate=175:vrc_maxrate=1000
-ffourcc FMP4 -force-avi-aspect 1.66666666666667
Spice_and_Wolf_-_02%20%5BBSS%5D.mkv


More information about the MEncoder-users mailing list