OT: Help with Broken Downloads Please

Budge ajebay at errichel.co.uk
Tue Dec 22 15:23:17 PST 2015


On 22/12/15 19:21, Vangelis forthnet wrote:
> On Tue Dec 22 18:34:46 BST 2015, Budge wrote:
>
>> This tells me to use aac_adtstoasc to fix it
>> but as usual  cannot quite get the command.
>> What is the -bsf:a aac_adtstoasc command,
>> or rather where does it fit in total command string?
>
> Hi :-)
> Have been out all day to enjoy the great weather
> (spring-like sunshine with 16 Celsius), so I was not
> able to pick this from the start... :-(
>
> 1. It appears your "audio" files are somehow
> the result of a failed transcoding from AAC to MP3;
> the file extension was correctly set as ".mp3",
> but the file content (RAW audio stream) is still left as AAC.
> Probably the culprit had been FFmpeg when the
> radio programme was initially downloaded...
> It appears you then tagged the file with "EasyTAG",
> this could have made things worse if EasyTAG
> was instructed to tag a seemingly MP3 file which
> was in essence an AAC file/stream...
>
> Many times in the past I recommended you install
> MediaInfo for your OS:
> https://mediaarea.net/nn/MediaInfo/Download
> a plea refreshed by batguano999 in this thread...
> You should really do it now as you read this,
> it's a fine tool and the info it provides (much more
> useful than FFmpeg & FFprobe outputs) could
> help us (and you) debug future media-related issues
> you report on this list...
> Please install now and post the report it generates
> on the problem audio files...

Hi Vangelis,
Wet and cold here.  I envy you the sunshine!!!
MediaInfo is installed but doesn't tell us much:-

alastair at ibmx3400:~/GiP_Recordings> mediainfo
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.mp3
General
Complete name                            :
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.mp3
Format                                   : ADTS
Format/Info                              : Audio Data Transport Stream
File size                                : 97.4 MiB
Overall bit rate mode                    : Variable
Album                                    : Composer_of_the_Week -
Carl_Philipp_Emmanuel_Bach
Track name                               : of the Week - Carl Philipp
Emmanuel Bach 1714-1788 1. The Belligerent Flautist
Track name/Position                      : 01
Performer                                : BBC Radio 4
Genre                                    : Radio_Programme
Recorded date                            : 2011
Writing library                          : Lavf53.24.2
Comment                                  : Tagged with EasyTAG

Audio
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 4
Format profile                           : LC
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 97.4 MiB (100%)


alastair at ibmx3400:~/GiP_Recordings>

2. First try the "easy" approach by simply changing the
> extension of the problem files from ".mp3" to ".m4a";
> this may or (most probably) may not fix the playback issue,
> but you should keep the ".m4a" file extension if you are to
> process the file further with FFmpeg or other tool...
>
> 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; anyhow,
This was hopeless.  Nothing could play the file.

> 3. Try to remux (using the "renamed" file) in one step
> to see how it goes:
> Rename "problem.mp3" to "problem.m4a"
>
> ffmpeg -i "problem.m4a" -vn -c:a copy -bsf:a aac_adtstoasc -f ipod
> "problem-remuxed.m4a"

and here is the result of above suggestion:-

alastair at ibmx3400:~/GiP_Recordings> ffmpeg -i
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.m4a
-vn -c:a copy -bsf:a aac_adtstoasc -f ipod
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist_remuxed.m4a
ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0
-grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -g'
--optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic
--disable-stripping --enable-shared --disable-static
--enable-runtime-cpudetect --enable-gpl --disable-openssl
--enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libcelt --enable-libcdio
--enable-libdc1394 --enable-libfreetype --enable-libgsm
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-pic
--enable-pthreads --enable-vaapi --enable-vdpau --disable-decoder=dca
--enable-libdcadec --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-version3 --enable-libtwolame
--enable-libvo-aacenc --enable-libx264 --enable-libx265 --enable-libxvid
--enable-x11grab
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[aac @ 0x13cfe60] Error decoding AAC frame header.
[aac @ 0x13ce8e0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from
'Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.m4a':
  Metadata:
    encoder         : Lavf53.24.2
    artist          : BBC Radio 4
    album           : Composer_of_the_Week - Carl_Ph
    track           : 1
    comment         : Tagged with EasyTAG
    title           : of the Week - Carl Philipp Emm
    date            : 2011
    genre           : Other
  Duration: 01:11:26.78, bitrate: 190 kb/s
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 190 kb/s
File
'Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist_remuxed.m4a'
already exists. Overwrite ? [y/N] y
[ipod @ 0x13e21e0] Codec for stream 0 does not use global headers but
container format requires global headers
Output #0, ipod, to
'Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist_remuxed.m4a':
  Metadata:
    genre           : Other
    artist          : BBC Radio 4
    album           : Composer_of_the_Week - Carl_Ph
    track           : 1
    comment         : Tagged with EasyTAG
    title           : of the Week - Carl Philipp Emm
    date            : 2011
    encoder         : Lavf56.40.101
    Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, 190 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x13e27e0] Error parsing ADTS frame header!
Failed to open bitstream filter aac_adtstoasc for stream 0 with codec
copy: Invalid data found when processing input
[ipod @ 0x13e21e0] Malformed AAC bitstream detected: use the audio
bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc'
option with ffmpeg)
av_interleaved_write_frame(): Operation not permitted
size=       1kB time=00:00:00.02 bitrate= 182.3kbits/s   
video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Conversion failed!
alastair at ibmx3400:~/GiP_Recordings>


>
> 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...
> It may also be  "problem.flv", i.e. RAW
> AAC audio stream still inside the FLV container as fetched
> by rtmpdump; unsure without the MediaInfo report...
> In any case, and pending your further report, try a two-step remux:
>
> ffmpeg -i "problem.m4a" -vn -c:a copy -f adts "problem.aac"

this is the result of first part:-

alastair at ibmx3400:~/GiP_Recordings> ffmpeg -i
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.m4a
-vn -c:a copy -bsf:a aac_adtstoasc -f adts
Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.aac
ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0
-grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -g'
--optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic
--disable-stripping --enable-shared --disable-static
--enable-runtime-cpudetect --enable-gpl --disable-openssl
--enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libcelt --enable-libcdio
--enable-libdc1394 --enable-libfreetype --enable-libgsm
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-pic
--enable-pthreads --enable-vaapi --enable-vdpau --disable-decoder=dca
--enable-libdcadec --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-version3 --enable-libtwolame
--enable-libvo-aacenc --enable-libx264 --enable-libx265 --enable-libxvid
--enable-x11grab
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[aac @ 0x1d96e40] Error decoding AAC frame header.
[aac @ 0x1d958c0] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from
'Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.m4a':
  Metadata:
    encoder         : Lavf53.24.2
    artist          : BBC Radio 4
    album           : Composer_of_the_Week - Carl_Ph
    track           : 1
    comment         : Tagged with EasyTAG
    title           : of the Week - Carl Philipp Emm
    date            : 2011
    genre           : Other
  Duration: 01:11:26.78, bitrate: 190 kb/s
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 190 kb/s
Output #0, adts, to
'Composer_of_the_Week_-_Carl_Philipp_Emmanuel_Bach_1714-1788_1._The_Belligerent_Flautist.aac':
  Metadata:
    genre           : Other
    artist          : BBC Radio 4
    album           : Composer_of_the_Week - Carl_Ph
    track           : 1
    comment         : Tagged with EasyTAG
    title           : of the Week - Carl Philipp Emm
    date            : 2011
    encoder         : Lavf56.40.101
    Stream #0:0: Audio: aac, 44100 Hz, stereo, 190 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x1da97c0] Error parsing ADTS frame header!
Failed to open bitstream filter aac_adtstoasc for stream 0 with codec
copy: Invalid data found when processing input
size=   98463kB time=01:10:01.09 bitrate= 192.0kbits/s   
video:0kB audio:98463kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.000000%
alastair at ibmx3400:~/GiP_Recordings>

I shall break now and run mediainfo on the aac file which resulted.

>
> If that succeeds, then continue by issuing:
>
> ffmpeg -i "problem.aac" -vn -c:a copy -bsf:a aac_adtstoasc -f ipod
> "problem-remuxed.m4a"
>
> and hopefully that would play fine...
>
> Regards...
>
> (..any news on those Tea Cakes?
> I'm a coffee person myself, but I bet they'd
> go down fine with coffee, too...)
>
Do I have your postal address?  PM me.

Many thanks again.
Alastair.



More information about the get_iplayer mailing list