OT: Help with Broken Downloads Please

Vangelis forthnet northmedia1 at the.forthnet.gr
Tue Dec 22 18:36:35 PST 2015


On Tue Dec 22 23:23:17 BST 2015, Budge wrote:

> MediaInfo is installed but doesn't tell us much:-
> (snip)
> Format                                   : ADTS
> Format/Info                            : Audio Data Transport Stream
> (snip)
> Comment                                : Tagged with EasyTAG

It tells me plenty... It's a tagged ".aac" audio file;
as MediaInfo states, it's an ADTS file;
so the "right" file extension should be ".aac" -
please rename the original file to comply with this...

I wrote:

> I have good suspicion that "problem.m4a"
> should really rather be "problem.aac", i.e. RAW
> AAC audio stream not yet muxed to the MP4 container...

I am blowing my own horn here, but my suspicion was right...

Searching the file name on Google reveals that it
belongs to this radio programme:
http://www.bbc.co.uk/programmes/b010nttb/
originally broadcast in Mon 23 May 2011 12:00.
This coincides with the time GiP was in version 2.79,
where the default handling of .flv audio files (downloaded
by rtmpdump/flvstreamer) containing the new - then - AAC
format was to extract the RAW audio stream as ".aac"
file (and my memory fails me here, but I think that was
later tagged by id3v2, if installed in the system...).
The audio extraction was performed by FFmpeg in a
fashion resembling this:

ffmpeg -i "audio.flv" -vn -acodec copy -y "audio.aac"

(see actual code at:
http://git.infradead.org/get_iplayer.git/blob/92e9bc27504f48a586ddac79154688d8791fbca2:/get_iplayer#l8121 )

On Windows GiP 2.79, FFmpeg was at version 0.8 -
who knows what version it was at the distro you used at the time...

 What remains a mystery to me is how your file got
the erroneous "mp3" extension, but this is not important now...
(what may have been important is that the radio prog
in question was last repeated as recently as last year:
http://www.bbc.co.uk/programmes/b010nttb/broadcasts =>
Mon 3 Mar 2014 18:30
so you could've re-fetched it then...)

But my fear is indeed justified:
I wrote:
> Your attempt so far with FFmpeg has produced the following error:
> [aac @ 0xf36e40] Error decoding AAC frame header.
> which is what concerns me the most

which means your ".aac" file has a CORRUPT AAC frame header!
(Possibly related info:
https://www.hydrogenaud.io/forums/index.php?showtopic=97442&view=findpost&p=813317 )
I would have thought that with a scheme like:

ffmpeg -i "problem.aac" -vn -c:a copy -f adts "problem-2.aac"

ffmpeg would re-write correct ADTS headers and hence produce
a playable ".aac" file, but the crux of the problem is that FFmpeg
can't go past the input file...
So I bet even a "transcoding" scheme like that:

ffmpeg -i "problem.aac" -vn -c:a libmp3lame -b:a 256k -ar 44100 -ac 2 -f mp3 
"problem-transcode.mp3"

will probably fail (doesn't hurt to try, though...)

A simple Google search also reveals you have taken this
to the FFmpeg-user mailing list, which is a good thing to do:
http://ffmpeg.org/pipermail/ffmpeg-user/2015-December/029699.html
Reading the thread so far, nothing has yet come up
that was not already suggested here by batguano or me...
The fatal error
[aac @ <random string>] Error decoding AAC frame header.
always shows up in the logs posted there (and here...).
Maybe you should focus Hoyos's attention to it -
Hoyos is a main FFmpeg dev and he should know better...

 If you ask me, what is needed is fixing the corrupt header
by modifying the file in the digital level, via a hexadecimal
editor - this goes well beyond my expertise in handling media
files... :-(
 But I may be wrong altogether! Let's hope you get
something meaningful from the FFmpeg dev; I suspect you
should really provide him with the problem audio file...

Festive regards,
Vangelis. 




More information about the get_iplayer mailing list