Opened 23 months ago

Closed 3 months ago

Last modified 2 months ago

#4861 closed defect (fixed)

E-AC3 audio glitch : exponent out-of-range

Reported by: Guillaume Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: eac3
Cc: michael,, Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by cehoyos)

I'm trying to decode an AC3 file extracted from live French TV stream.
3 audio glitches can be heard in the sample file.

During conversion, error logs are returned.

$ ffmpeg -i audio_ac3_glitch.ac3 audio_test.wav
ffmpeg version 2.7 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
[eac3 @ 0xa387a00] Estimating duration from bitrate, this may be inaccurate
Input #0, eac3, from 'audio_ac3_glitch.ac3':
  Duration: 00:00:45.57, start: 0.000000, bitrate: 127 kb/s
    Stream #0:0: Audio: eac3, 48000 Hz, stereo, fltp, 128 kb/s
Output #0, wav, to 'audio_test.wav':
    ISFT            : Lavf56.36.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
      encoder         : Lavc56.41.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (eac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[eac3 @ 0xa388be0] exponent out-of-range
[eac3 @ 0xa388be0] error decoding the audio block
[eac3 @ 0xa388be0] exponent out-of-range
[eac3 @ 0xa388be0] error decoding the audio block
[eac3 @ 0xa388be0] exponent out-of-range
[eac3 @ 0xa388be0] error decoding the audio block
[eac3 @ 0xa388be0] incomplete frame
size=    8550kB time=00:00:45.60 bitrate=1536.0kbits/s    
video:0kB audio:8550kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000891%

Same errors occur when trying to stream this file using a GSTreamer pipeline :

gst-launch-1.0 -v --gst-debug-level=3 filesrc location=./audio_ac3_glitch.ac3 ! ac3parse ! avdec_eac3 ! audioconvert ! playsink

We can notice that the errors seem related to audio glitches heard.

I've tried to modify the code in file libavcodec/ac3dec.c in function ac3_decode_frame() where trying to decode the audio blocks generates the log "error decoding the audio block\n". Without success.

Attachments (1)

small-audio_ac3_glitch.ac3 (712.1 KB) - added by Guillaume 23 months ago.

Download all attachments as: .zip

Change History (24)

Changed 23 months ago by Guillaume

comment:1 Changed 23 months ago by cehoyos

  • Description modified (diff)
  • Keywords audio glitch removed
  • Reproduced by developer set
  • Status changed from new to open

bug 868 filename is audio_ac3_glitch.ac3

For future tickets: Please always test current FFmpeg git head before reporting issues.

comment:2 Changed 19 months ago by michael

  • Cc michael added

Is there a decoder that plays this without any errors/glitches ?

comment:3 Changed 19 months ago by cehoyos

Iirc, my hardware decoder outputs no audible glitches.

comment:4 Changed 19 months ago by cehoyos

  • Keywords eac3 added; AC3 removed
  • Summary changed from AC3 audio glitch : exponent out-of-range to E-AC3 audio glitch : exponent out-of-range

No audible glitches with my hardware decoder.

comment:5 Changed 17 months ago by titer

  • Cc added

comment:6 Changed 16 months ago by heleppkes

The Microsoft decoder also plays this without any glitches.

comment:7 Changed 15 months ago by sdrik

  • Cc added

comment:8 Changed 14 months ago by Eiffel

This bug is very annoying and occurs more often in speech than music. On a talkshow, this can be several times per minute.
I observe it on each DVB-T recording and occasionally in other sources.

Conversion with ffmpeg shows an "exponent out-of-range" error for each glitch.
However, some errors reported are not audible.

The same DVB-T sample reads fine for me on two hardware players and with MPC-HC v1.3.1249.0 on a very old PC that received tons of codecs and upgrades over the years. On the same PC, the glitches occur with VideoLAN player.

On a new PC, I cannot read this sample with whatever I test. Probably because most players use ffmpeg... And yes, I tested with the latest version.

Last edited 14 months ago by Eiffel (previous) (diff)

comment:9 Changed 9 months ago by tesla_

Same for me on french DVB channels with eac3.
This affected all channel and happens all the time. No problem before the france switch to the eac3.
Lots of glitch all time. I've spend lot's of hours with the official doc with no success.
The sound attach here play very well and convert with no glitch on a mac (with afconvert)
When open the sound with audacity on linux we can see the 3 glitches.
On Mac with audacity ( he use the internal audio library) no artefact.
The file is not corrupt (no crc error ...)
I'll try to invalidate the frame. The artefact is minimized but still here. I'll try to invalidate the frame and next after but the artefact is still here. I'll try to see if it may be a parser problem but i don't think.
Can anybody help us on this bug ?
I've test with the last version of ffmpeg.

Last edited 9 months ago by tesla_ (previous) (diff)

comment:10 Changed 9 months ago by tesla_

  • Priority changed from normal to important

comment:11 Changed 9 months ago by cehoyos

  • Priority changed from important to normal

comment:12 Changed 9 months ago by michael

Is there a open source reference decoder for EAC3 ?

comment:13 follow-up: Changed 9 months ago by tesla_

official doc atsc

Ive audit the decode_components function and it's same that the doc ...
Somme missing param in the eac3 parser but not affected by the file ac3 attached here ...

comment:14 in reply to: ↑ 13 Changed 9 months ago by michael

Replying to tesla_:

official doc atsc

debuging this from the doc is timeconsuming and assumes this is not a typo in the doc (which we cannot exclude really as a explanation at this point)

Is there some reference implementation that is open source ?

comment:15 Changed 9 months ago by tesla_

I've manually detect the frame that sucks. (Three )
The last is the 1298 frame
I've manually apply a gain of zero when apply scaling to coefficients. and the artefact disappears :)
Now must found write a good solution to apply to each time :)
I think the file have problems but doesn't matter is just one frame.
We just must invalidate all work already done on the bad frame. i think that is something that

Last edited 9 months ago by tesla_ (previous) (diff)

comment:16 Changed 9 months ago by tesla_

Last edited 9 months ago by tesla_ (previous) (diff)

comment:17 Changed 8 months ago by oxhak

Last edited 8 months ago by oxhak (previous) (diff)

comment:18 Changed 8 months ago by oxhak


I'm on ArchLinux?, and I have this issue with VLC, Kaffeine, on my DVB-T tunner.

Same like this guy

He uploaded a file with the glitche here :!581990&authkey=!AJ4s8d9JG4w97KQ&ithint=video%2Cts

The audio glitch occurs near the end about 00:01:14 (there is only one audio stream)

This bug is really annoying when watching tv on my pc.

Do you think you can resolve it, cause I tried ffmpeg-git and it's the same, issue still here.

Tell me if you need some sample from my dvb-t tuner for analyze ?


comment:19 Changed 6 months ago by Poloche9x7

Same issue with my records since audio are in E-AC3 format. I have many audio glitch in my TS files if i play it with VLC, Audacity, etc... , but if i play these in my hardware players (Samsung TV, HPLC windows 10, or with paid logiciel as CyberLink? power DVD, etc), the files work fine !

Thankx to fix this bug if possible.

comment:20 Changed 3 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed by Michael Niedermayer.

comment:21 Changed 3 months ago by kierank

Are you speculating or has this actually been confirmed?

comment:22 Changed 2 months ago by sdrik

Is this bug supposed to be fixed by commit 9351a156de724edb69ba6e1f05884fe806a13a21 ?

comment:23 Changed 2 months ago by sdrik

I can confirm that commit 9351a156de724edb69ba6e1f05884fe806a13a21 fixes the issue for my test cases.

Thanks !

Note: See TracTickets for help on using tickets.