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

Andy Bircumshaw andy at networkned.co.uk
Thu Apr 14 13:04:36 EDT 2011


On 14/4/2011, at 2:15pm, richard wrote:
> ... when the avgBitrate (average bit rate) in the
> DecoderConfigDescriptor of the esds atom is zero, a m4a file will not
> play in the Marantz CD6003. 
> 
> Both EasyTag and mp4tags makes a m4a file playable by changing the
> average bitrate from zero to a non zero value ...
> 
> Clearly the Marantz player is fickle about how m4a files are written. It
> appears to me that the problem is not due to a bug in ffmpeg or the
> Marantz firmware, but (as dumpypumpkin says) because rtmpdump doesn't
> set a field for the avgBitrate, or perhaps because the avgBitrate is
> incorrectly set to zero.

One might guess that Marantz do this to determine whether the player has enough processing power to playback the audio file. It may be considered better to reject an audio track as unplayable than to skip and sound horrendous in an unsuccessful attempt to play a file of too high a bitrate. Perhaps Marantz include some CD-ripping software with the player that sets avgBitrate in the .m4a files it outputs?

Apple do the same in iPods, Sony in the PS3, refusing to play h264 video if it's not marked with a "level" that the player is capable of decoding:
http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels 

IIRC you can fib to an iPod about the level and play back slightly higher resolution / bitrate (say 10%) than specified in that chart, but the iPod (certainly the PS3) will completely refuse to play an .mp4 if you've transcoded it yourself and forgotten to mark a level. Search `man mplayer` for "CodecContext" or see [1].

aB.



[1] http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-May/051417.html




More information about the get_iplayer mailing list