[MEncoder-users] -oac copy and -of lavf shows audio data info wrong for flv videos.

Bill Crockett wsc4 at optusnet.com.au
Fri Jul 22 07:56:53 CEST 2011


When stream copying avc and aac with an flv container, the clip info of 
the audio data rate is showing completely wrong in Mplayer and 
MediaInfo.  The command line:

mencoder -ovc copy -oac copy -of lavf -lavfopts format=flv -fafmttag 
0x706d infile.flv -o outfile.flv

MEncoder Sherpya-SVN-r33883-4.2.5 (C) 2000-2011 MPlayer Team
163 audio & 369 video codecs
success: format: 0  data: 0x0 - 0x5a2303
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  640x360  24bpp  29.970 fps  685.6 kbps (83.7 kbyte/s)
[V] filefmt:44  fourcc:0x34363248  size:640x360  fps:29.970  ftime:=0.0334
** MUXER_LAVF 
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
videocodec: framecopy (640x360 24bpp fourcc=34363248)
Forcing output audio format tag to 0x706d.
audiocodec: framecopy (format=706d chans=2 rate=44100 bits=16 B/s=11999 
sample-0)
VIDEO CODEC ID: 28
AUDIO CODEC ID: 15002, TAG: 0
Writing header...
[flv @ 0212b280] Codec for stream 0 does not use global headers but 
container format requires global headers
[flv @ 0212b280] Codec for stream 1 does not use global headers but 
container format requires global headers
Pos:  60.0s   1799f (99%)  0.00fps Trem:   0min   5mb  A-V:0.001 [685:95]]
Writing index...

Video stream:  685.595 kbit/s  (85699 B/s)  size: 5144242 bytes  60.027 
secs  1799 frames

Audio stream:   95.995 kbit/s  (11999 B/s)  size: 726375 bytes  60.534 secs
------------------------------------------------------------------------

As you can see, the audio stream is 95 kbit/s.  This is correct and is 
exactly the same as the original.  However, playing with Mplayer - look 
at the audiodatarate - shows this:

Clip info:
  duration: 61
  width: 640
  height: 360
  videodatarate: 781
  framerate: 30
  videocodecid: 7
  audiodatarate: 3
  audiosamplerate: 44100
  audiosamplesize: 16
  stereo: true
  audiocodecid: 10
  encoder: Lavf53.6.0
  filesize: 5951333
Load subtitles in ./

==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 3.4 kbit/0.24% (ratio: 421->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================

The audiodatarate is only showing 3 and 3.4 kbit as shown above.  The 
program MediaInfo confirms this.

Any ideas to correct this really appreciated.


More information about the MEncoder-users mailing list