[MEncoder-users] mkv -> avi: audio problem

Davyd McColl davydm at gmail.com
Wed Nov 3 21:50:37 CET 2010


Good day

I'm new to this list but I have put this through the standard google grind
without too much joy, so please bear with me if I'm just completely
off-kilter (:

I have a script to share media on my one drive with my in-laws who have a SD
divx/xvid-capable TV. Quite a few of the source files are mkv (and HD) so I
have to reencode them before I can pass them down the line. I've noticed
some playing up recently though, popping the message:
"Too many audio packets in the buffer"
and prematurely quitting. MPlayer plays the source files without a hitch.
I'm using the latest and greatest from SVN with all the bells and whistles
turned on.

Every hit for searching for this problem has lead me down paths which
haven't fixed a thing. I can't even just extract the audio with the pcm
output codec -- I get the same error. Quite by accident, I tried adding
-srate 48000 (the sample rate of the source media audio) to the command line
and the encode appears to be progressing fine, but now I have a new
artifact: if I seek in the output file, the audio position is always reset
to the start of the file! Any thoughts appreciated.

Ok, time for some outputs:
1) mencoder output:
mencoder -ovc xvid -xvidencopts fixed_quant=4 -oac mp3lame -lameopts br=160
input.mkv -o output.avi
MEncoder SVN-r32577-4.4.5 (C) 2000-2010 MPlayer Team
success: format: 0  data: 0x0 - 0x2bb6ba3e
libavformat file format detected.
[matroska,webm @ 0x170f9f0] Estimating duration from bitrate, this may be
inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (mp3), -aid 0, -alang eng
VIDEO:  [H264]  720x360  0bpp  59.917 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44  fourcc:0x34363248  size:720x360  fps:59.917  ftime:=0.0167
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
xvid: using library version 1.2.2 (build xvid-1.2.2)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
MP3 audio selected.
Pos:   0.0s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]

1 duplicate frame(s)!
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Pos:   0.0s      2f ( 0%)  0.00fps Trem:   0min   3mb  A-V:0.002 [0:0]
Movie-Aspect is 2.37:1 - prescaling to correct movie aspect.
videocodec: XviD (720x360 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=852x360, sampled=720x360
xvid: Fixed Quant Rate Control -- quantizer=4/1=4.00
Writing header...
ODML: vprp aspect is 16384:6922.
(truncated)

2) The files are all generated with Handbrake from DVD source, using the
following setup:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
    <dict>
        <key>AudioList</key>
        <array>
            <dict>
                <key>AudioBitrate</key>
                <string>160</string>
                <key>AudioEncoder</key>
                <string>MP3 (lame)</string>
                <key>AudioEncoderActual</key>
                <string>lame</string>
                <key>AudioMixdown</key>
                <string>Stereo</string>
                <key>AudioSamplerate</key>
                <string>Auto</string>
                <key>AudioTrack</key>
                <integer>1</integer>
                <key>AudioTrackDRCSlider</key>
                <real>0</real>
                <key>AudioTrackDescription</key>
                <string>Unknown (AC3) (2.0 ch)</string>
            </dict>
        </array>
        <key>ChapterMarkers</key>
        <true />
        <key>Default</key>
        <false />
        <key>FileFormat</key>
        <string>MKV file</string>
        <key>Folder</key>
        <false />
        <key>Mp4HttpOptimize</key>
        <false />
        <key>Mp4LargeFile</key>
        <false />
        <key>Mp4iPodCompatible</key>
        <false />
        <key>PictureAutoCrop</key>
        <true />
        <key>PictureBottomCrop</key>
        <integer>60</integer>
        <key>PictureDeblock</key>
        <integer>4</integer>
        <key>PictureDecomb</key>
        <integer>2</integer>
        <key>PictureDecombCustom</key>
        <string></string>
        <key>PictureDecombDeinterlace</key>
        <true />
        <key>PictureDeinterlace</key>
        <integer>0</integer>
        <key>PictureDeinterlaceCustom</key>
        <string></string>
        <key>PictureDenoise</key>
        <integer>0</integer>
        <key>PictureDenoiseCustom</key>
        <string></string>
        <key>PictureDetelecine</key>
        <integer>0</integer>
        <key>PictureDetelecineCustom</key>
        <string></string>
        <key>PictureKeepRatio</key>
        <true />
        <key>PictureLeftCrop</key>
        <integer>0</integer>
        <key>PictureLooseCrop</key>
        <true />
        <key>PictureModulus</key>
        <string>2</string>
        <key>PicturePAR</key>
        <string>1</string>
        <key>PicturePARHeight</key>
        <integer>9</integer>
        <key>PicturePARWidth</key>
        <integer>8</integer>
        <key>PictureRightCrop</key>
        <integer>0</integer>
        <key>PictureTopCrop</key>
        <integer>60</integer>
        <key>PresetBuildNumber</key>
        <integer>2010110201</integer>
        <key>PresetDescription</key>
        <string>MKV container with decomb on</string>
        <key>PresetName</key>
        <string>mkv:daf</string>
        <key>SubtitleList</key>
        <array>
        </array>
        <key>Type</key>
        <integer>1</integer>
        <key>UsesPictureFilters</key>
        <integer>1</integer>
        <key>UsesPictureSettings</key>
        <integer>2</integer>
        <key>VideoAvgBitrate</key>
        <integer>1500</integer>
        <key>VideoEncoder</key>
        <string>H.264 (x264)</string>
        <key>VideoFramerate</key>
        <string>Same as source</string>
        <key>VideoFrameratePFR</key>
        <false />
        <key>VideoGrayScale</key>
        <false />
        <key>VideoQualitySlider</key>
        <real>19</real>
        <key>VideoQualityType</key>
        <integer>2</integer>
        <key>VideoTargetSize</key>
        <integer>700</integer>
        <key>VideoTurboTwoPass</key>
        <false />
        <key>VideoTwoPass</key>
        <false />
        <key>anamorphic</key>
        <true />
        <key>par_height</key>
        <integer>0</integer>
        <key>par_width</key>
        <integer>0</integer>
        <key>x264Option</key>

<string>ref=2:bframes=2:subme=10:mixed-refs=0:weightb=0:trellis=2:me=umh:b-adapt=2:partitions=all</string>
    </dict>
</array>
</plist>

3) mplayer/mencoder info: svn details
URL: svn://svn.mplayerhq.hu/mplayer/trunk
Repository Root: svn://svn.mplayerhq.hu/mplayer
Repository UUID: b3059339-0415-0410-9bf9-f77b7e298cf2
Revision: 32577
Node Kind: directory
Schedule: normal
Last Changed Author: reimar
Last Changed Rev: 32577
Last Changed Date: 2010-11-03 18:44:13 +0200 (Wed, 03 Nov 2010)

If I can supply more useful info, please let me know!

Thanks
-d

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The competent programmer is fully aware of the limited size of his own
skull. He therefore approaches his task with full humility, and avoids
clever tricks like the plague.
- Djikstra.


More information about the MEncoder-users mailing list