[Ffmpeg-devel] possible bug - ac3 transcoding

Rui Correia john3voltas
Sat Dec 16 21:39:45 CET 2006

Hello there,
I have XP Pro SP2 and I'm using a ffmpeg for windows binary that I downloaded
here http://tirnanog.fate.jp/mirror/ffmpeg/.
It is not the latest SVN but since I don't know how to build the latest SVN on
cygwin/mingw I have to post my results with SVN-7260.
This is the CLI that I'm using.
It was taken from BeHappy a windows frontend for many encoders, namely FFmpeg.

ffmpeg.exe -i gotk448.ac3 -y -acodec ac3 -ab 384 gotk384.ac3

And here is the log

FFmpeg version SVN-r7260, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration:  --enable-mp3lame --enable-libnut --enable-libogg
--enable-vorbis --enable-faad --enable-faac --enable-libgsm --enable-xvid
--enable-x264 --enable-mingw32 --enable-a52 --enable-dts --enable-pp
--enable-amr_nb --enable-amr_wb --enable-swscaler --enable-avisynth
--enable-gpl --enable-memalign-hack --cpu=i686 --extra-ldflags=-static
  libavutil version: 49.1.0
  libavcodec version: 51.26.0
  libavformat version: 51.6.0
  built on Dec  8 2006 17:40:35, gcc: 4.0.3
Input #0, ac3, from 'gotk448.ac3':
  Duration: 01:34:06.9, start: 0.000000, bitrate: 448 kb/s
  Stream #0.0: Audio: ac3, 48000 Hz, 5 channels, 448 kb/s
Output #0, ac3, to 'gotk384.ac3':
  Stream #0.0: Audio: ac3, 48000 Hz, 5 channels, 384 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=  317640kB time=6776.3 bitrate= 384.0kbits/s
video:0kB audio:317640kB global headers:0kB muxing overhead 0.000000%

Note: I'm only using ffmpeg for audio transcoding.
I use a different encoder for the video part.
In the end I'll just mux them back with DVDLab Pro or Muxman Std..
In the above test the source movie is a original DVD PAL 25fps and it has a
total of 141175 frames.
I extracted the ac3 stream using DGMPGDec/DGIndex 1.4.8. which reports the ac3
stream as a 5.1 448kbps stream and it uses 308819KB of disc space.
After transcoding to 384kbit ac3 using the above CLI I get a file with 317640KB
thus making it _even_bigger_than_the_original_.
For me this doesn't make sense because if my math is right I should be getting
a file from ffmpeg with ~264703KB.
My math for the transcoded ac3:  ((141175/25)*(384/8))/1024*1000=264703,125
And for the source ac3:          ((141175/25)*(448/8))/1024*1000=308820,3125
Plus if I try to play the ffmpeg-transcoded file with either
foobar2000 or MediaPlayerClassic my PC crashes and reboots.
I've tried several ffmpeg builds from that repository (celtic_druid's) as well
as from other repositories and I always get this problem.
FYI I am quite sure that this used to work with an older ffmpeg build from
19/04/2006, which already had the "ac3 low volume bug" fixed.
Unfortunately in one of my latest HDD housekeeping I accidentally erased that
build and I can't run a test with it just to make sure.
I raised this problem in the ffmpeg-users list and Mr. V?ctor Paesa told me
that he could reproduce my problem an he is on cygwin.
Here is one of his posts in that thread.
http://article.gmane.org/gmane.comp.video.ffmpeg.user/7094 .
As you can see he sounds pretty much convinced that this is a bug.
If it is I need your help because I'd like to escalate it.
Merry Xmas to you all.

PS: yesterday I had already tried to post in this list but I got a mail from
the list saying that I was not a registered user and that my post would require
validation by a moderator or something similar.
So be nice with me :) if you get to see 2 posts very similar from the
same email address.

More information about the ffmpeg-devel mailing list