Workaround for broken(?) m4a files from ffmpeg, was Re: [PATCH] Output AAC as M4A for iTunes with metadata tags

richard richard at richsim900.plus.com
Fri Apr 15 11:10:18 EDT 2011


On Fri Apr 15 bat guano wrote:

>> Simon wrote:
> >
> rtmpdump produces FLV files, which have nowhere to put a value for the
> average bit rate. So this isn't something that rtmpdump could fix.
>
> I think ffmpeg is the right place to handle this. When ffmpeg runs
> (using -acodec copy), it displays a status line of the form
> size= 33270kB time=821.71 bitrate= 331.7kbits/s
> where these values are updated every second or so. So ffmpeg does
> know the average bit rate, but it doesn't store it in the m4a file.
>

> I also don't think it's a problem caused by streamed files from 
> RTMPDump.
>
> And it's not just '-acodec copy' that gives no avgBitrate.
> FFmpeg doesn't seem to set the avgBitrate when converting other files
> to m4a.
> Using commands like this:-
> ffmpeg -i foo -acodec libfaac foo.m4a

OK. I'll eat my words. I forgot about that. I've done some more testing
of a couple of mp3 files (not downloaded with get_iplayer) using that
command:

ffmpeg -i 128bit.mp3 -acodec libfaac 128bit.m4a
ffmpeg -i 128kbs.mp3 -acodec libfaac 128kbs.m4a

Both m4a files would not play in the Marantz, and the decConfigDescr in
the esds atom shows the same problem - avgBitrate = 0 

bufferSizeDB = 0 (0x000000) <24 bits> 
maxBitrate = 64000 (0x0000fa00) 
avgBitrate = 0 (0x00000000)

 








More information about the get_iplayer mailing list