[MPlayer-users] mencoder, audio stream shorter than video stream

T o n g mlist4suntong at yahoo.com
Sat Dec 12 18:38:42 CET 2009


On Mon, 30 Nov 2009 00:08:25 -0800, RC wrote:

>> the converted avi file's audio stream is about 10% shorter than the
>> video stream:
> 
> Get rid of -noskip, and try again.

Thanks RC. It doesn't work. I've also updated the mplayer/mencoder 
package since, but the problem persists.

I am using mencoder to covert my video to x264/mp3 format, but just 
noticed that the converted avi file's audio stream is about 10% shorter 
than the video stream:

 Video stream:  712.690 kbit/s  (89086 B/s)  size: 1532284 bytes  17.200 
secs  261 frames
 Audio stream:   46.772 kbit/s  (5846 B/s)  size: 85032 bytes  14.544 secs

The command that I used is:

 mencoder -of avi -oac mp3lame -lameopts abr:br=48:vol=2.2 -ovc x264 -vf 
harddup -srate 8000 -o imgp2163-.avi imgp2163.avi

Here is its full log:

 MPlayer SVN-r29980 (C) 2000-2009 MPlayer Team
 success: format: 0  data: 0x0 - 0x31d7c0
 VIDEO:  [MJPG]  320x240  24bpp  15.000 fps  1367.8 kbps (167.0 kbyte/s)
 [V] filefmt:3  fourcc:0x47504A4D  size:320x240  fps:15.000  ftime:=0.0667
 Opening audio decoder: [pcm] Uncompressed PCM audio decoder
 AUDIO: 8000 Hz, 1 ch, s16le, 128.0 kbit/100.00% (ratio: 16000->16000)
 Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
 Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
 Unsupported PixelFormat -1
 Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
 . . .
 Setting audio delay to 0.072s.
 Writing header...
 ODML: vprp aspect is 4:3.
 Setting audio delay to 0.072s.
 Pos:  14.0s    261f (99%) 45.07fps Trem:   0min   1mb  A-V:0.111 [708:46]
 Flushing video frames.
 Writing index...
 Writing header...
 ODML: vprp aspect is 4:3.
 Setting audio delay to 0.072s.

 Video stream:  712.690 kbit/s  (89086 B/s)  size: 1532284 bytes  17.200 
secs  261 frames
 Audio stream:   46.772 kbit/s  (5846 B/s)  size: 85032 bytes  14.544 secs
 x264 [info]: frame I:2     Avg QP:26.22  size: 12661
 x264 [info]: frame P:132   Avg QP:27.65  size:  8550
 x264 [info]: frame B:124   Avg QP:31.81  size:  3051
 x264 [info]: consecutive B-frames:  3.1% 96.9%  0.0%  0.0%
 x264 [info]: mb I  I16..4:  0.8% 98.5%  0.7%
 x264 [info]: mb P  I16..4:  0.4% 12.6%  1.0%  P16..4: 22.3% 31.5% 31.6%  
0.0%  0.0%    skip: 0.6%
 x264 [info]: mb B  I16..4:  0.3%  2.0%  0.1%  B16..8: 35.1%  5.6% 11.9%  
direct:22.1%  skip:23.0%  L0:30.8% L1:26.4% BI:42.7%
 x264 [info]: 8x8 transform intra:90.1% inter:86.4%
 x264 [info]: coded y,uvDC,uvAC intra: 83.7% 93.4% 62.7% inter: 62.3% 
63.4% 35.7%
 x264 [info]: i16 v,h,dc,p: 24% 40% 30%  7%
 x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 24% 29%  3%  3%  4%  4%  
4%  6%
 x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 22% 15%  5%  7%  7%  7%  
6%  7%
 x264 [info]: Weighted P-Frames: Y:15.9%
 x264 [info]: ref P L0: 52.8% 20.4% 13.8% 11.6%  1.3%
 x264 [info]: ref B L0: 83.9% 16.1%
 x264 [info]: kb/s:712.69

Because the audio stream is shorter, gmplayer will report the
following near the end when playing imgp2186-.avi:

 Cannot sync MAD frame: -0.001 ct:  0.025 276/276  6%  2%  0.5% 1 0    
 . . .
 Cannot sync MAD frame: -3.073 ct: -0.282 325/325  6%  2%  0.4% 1 0
 A:  18.5 V:  21.6 A-V: -3.073 ct: -0.289 325/325  6%  2%  0.4% 1 0


NB, as opposed to the OP in the mplayer.user mlist, the '-noskip'
was removed from the command line, as suggested by RC. But the
problem persists with and/or without the '-noskip' option. Moreover,
when converted without the '-noskip' option, the A/V will be off
sync. 

I've upload the imgp2163.avi file to ftp mplayerhq.hu /MPlayer/incoming/,
giving it a name as "mencoder_coverts_audio_stream_shorter.avi".

Please investigate.

Thanks

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (300, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-grml64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages mencoder depends on:
ii  liba52-0.7.4         0.7.4-11            library for decoding ATSC 
A/52 str
ii  libasound2           1.0.19-1            shared library for ALSA 
applicatio
ii  libbs2b0             3.1.0-0.2           Bauer stereophonic-to-
binaural DSP
ii  libbz2-1.0           1.0.5-1             high-quality block-sorting 
file co
ii  libc6                2.9-4               GNU C Library: Shared 
libraries
ii  libcdparanoia0       3.10.2+debian-5     audio extraction tool for 
sampling
ii  libdirac-decoder0    1.0.2-2             open and royalty free high 
quality
ii  libdirac-encoder0    1.0.2-2             open and royalty free high 
quality
ii  libdv4               1.0.0-2             software library for DV 
format dig
ii  libenca0             1.9-6               Extremely Naive Charset 
Analyser -
ii  libfaac0             1.28-0.1            an AAC audio encoder - 
library fil
ii  libfaad2             2.7-4               freeware Advanced Audio 
Decoder - 
ii  libfontconfig1       2.6.0-3             generic font configuration 
library
ii  libfreetype6         2.3.9-4             FreeType 2 font engine, 
shared lib
ii  libfribidi0          0.10.9-1            Free Implementation of the 
Unicode
ii  libgcc1              1:4.3.3-3           GCC support library
ii  libgif4              4.1.6-6             library for GIF images 
(library)
ii  libjpeg62            6b-14               The Independent JPEG Group's 
JPEG 
ii  liblzo2-2            2.03-1              data compression library
ii  libmad0              0.15.1b-4           MPEG audio decoder library
ii  libmng1              1.0.9-1             Multiple-image Network 
Graphics li
ii  libmp3lame0          3.98.2-0.5          LAME Ain't an MP3 Encoder
ii  libncurses5          5.7+20090404-1      shared libraries for 
terminal hand
ii  libogg0              1.1.3-5             Ogg Bitstream Library
ii  liboil0.3            0.3.15-1            Library of Optimized Inner 
Loops
ii  libopencore-amrnb0   0.1.1-0.0           Adaptive Multi Rate speech 
codec -
ii  libopencore-amrwb0   0.1.1-0.0           Adaptive Multi-Rate - 
Wideband spe
ii  libpng12-0           1.2.35-1            PNG library - runtime
ii  libschroedinger-1.0- 1.0.5-1             library for encoding/
decoding of D
ii  libsmbclient         2:3.3.3-1           shared library for 
communication w
ii  libspeex1            1.2~rc1-1           The Speex codec runtime 
library
ii  libstdc++6           4.3.3-3             The GNU Standard C++ Library 
v3
ii  libtheora0           1.0-2               The Theora Video Compression 
Codec
ii  libtwolame0          0.3.12-1            MPEG Audio Layer 2 encoding 
librar
ii  libvorbis0a          1.2.0.dfsg-4        The Vorbis General Audio 
Compressi
ii  libx264-79           1:0.svn20091125-0.0 x264 video coding library
ii  libxvidcore4         2:1.1.3-0.6         High quality ISO MPEG4 codec 
libra
ii  zlib1g               1:1.2.3.3.dfsg-13   compression library - runtime

mencoder recommends no packages.

Versions of packages mencoder suggests:
ii  libdvdcss2 [libdvdcss]        1.2.10-0.2 Simple foundation for 
reading DVDs
pn  mplayer-doc                   <none>     (no description available)

-- no debconf information

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/



More information about the MPlayer-users mailing list