Opened 9 years ago

Closed 7 years ago

Last modified 7 years 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 Niedermayer, eric@lapsus.org, cschieli@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

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)
  configuration: 
  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':
  Metadata:
    ISFT            : Lavf56.36.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      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 9 years ago.

Download all attachments as: .zip

Change History (25)

by Guillaume, 9 years ago

Attachment: small-audio_ac3_glitch.ac3 added

comment:1 by Carl Eugen Hoyos, 9 years ago

Description: modified (diff)
Keywords: audio glitch removed
Reproduced by developer: set
Status: newopen

bug 868 filename is audio_ac3_glitch.ac3

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

comment:2 by Michael Niedermayer, 8 years ago

Cc: Michael Niedermayer added

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

comment:3 by Carl Eugen Hoyos, 8 years ago

Iirc, my hardware decoder outputs no audible glitches.

comment:4 by Carl Eugen Hoyos, 8 years ago

Keywords: eac3 added; AC3 removed
Summary: AC3 audio glitch : exponent out-of-rangeE-AC3 audio glitch : exponent out-of-range

No audible glitches with my hardware decoder.

comment:5 by titer, 8 years ago

Cc: eric@lapsus.org added

comment:6 by Hendrik, 8 years ago

The Microsoft decoder also plays this without any glitches.

comment:7 by Cédric Schieli, 8 years ago

Cc: cschieli@gmail.com added

comment:8 by Eiffel, 8 years ago

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 8 years ago by Eiffel (previous) (diff)

comment:9 by tesla_, 7 years ago

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 atsc.org 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 7 years ago by tesla_ (previous) (diff)

comment:10 by tesla_, 7 years ago

Priority: normalimportant

comment:11 by Carl Eugen Hoyos, 7 years ago

Priority: importantnormal

comment:12 by Michael Niedermayer, 7 years ago

Is there a open source reference decoder for EAC3 ?

comment:13 by tesla_, 7 years ago

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 ...

http://atsc.org/wp-content/uploads/2016/03/a_52-2015.pdf

in reply to:  13 comment:14 by Michael Niedermayer, 7 years ago

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 by tesla_, 7 years ago

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 7 years ago by tesla_ (previous) (diff)

comment:16 by tesla_, 7 years ago

Last edited 7 years ago by tesla_ (previous) (diff)

comment:17 by oxhak, 7 years ago

Last edited 7 years ago by oxhak (previous) (diff)

comment:18 by oxhak, 7 years ago

Hi,

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

Same like this guy http://www.dvbviewer.tv/forum/topic/58061-unusual-audio-issue-on-dvb-t-france/

He uploaded a file with the glitche here : https://onedrive.live.com/redir?resid=801E6E4E512A1A8F!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 ?

Regards.

comment:19 by Poloche9x7, 7 years ago

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 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: openclosed

Fixed by Michael Niedermayer.

comment:21 by Kieran Kunhya, 7 years ago

Are you speculating or has this actually been confirmed?

comment:22 by Cédric Schieli, 7 years ago

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

comment:23 by Cédric Schieli, 7 years ago

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

Thanks !

comment:24 by William, 7 years ago

Seems that the referenced commit became available as of ffmpeg 3.3.1.

I'm still experiencing a number of seemingly related errors decoding the audio block when remuxing .ts to .mkv on the 3.3.4 release:

[ac3 @ 0x55a891825b00] exponent -1 is out-of-range
[ac3 @ 0x55a891825b00] error decoding the audio block
[ac3 @ 0x55a891825b00] exponent -2 is out-of-range
[ac3 @ 0x55a891825b00] error decoding the audio block

Is this expected if the source audio has a dropout, or should this be handled in the current release?

Last edited 7 years ago by William (previous) (diff)
Note: See TracTickets for help on using tickets.