Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: AAC Codec questions / compatibility with car players (Read 10328 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AAC Codec questions / compatibility with car players

Hi All,

Every now and then I get interested in audio encoding, and I always find my way back to the hydrogen audio forums. This is a great resource of knowledge---thanks for what you have all shared.

I had been using the Nero AAC codec for years, and did not have any problems. Recently I read in the forums that it is somewhat outdated and that other AAC codecs are better, so I started looking into the other options, namely the FhG codec taken from Winamp, and the FDK codec.

What I found was that the built-in player in my Toyota car would read Lame MP3, Nero AAC, and FDK AAC files, but not the files encoded by the FhG codec. Has anyone experienced this? Any idea what may be different in the FhG-produced files which would cause this?

Another finding was that foobar2000, which I used for encoding, said that the VBR 4 setting with FDK should produce 128 kb/s files, but I find its average is closer to 154 kb/s, whereas a setting of VBR 3 yielded 126 kb/s. The wiki article here says that VBR 4 should be 64 kb/s / channel. Also, the FDK codec apparently has more aggressive filtering, and the largest bandwidth allowed is 20 kHz. Does foobar's front-end use the full BW, or the default, limited BWs for the different VBR settings?

Finally---I was interested in using QAAC with foobar, but I didn't want to install iTunes on my computer. I also saw the makeportable.cmd program which can extract the necessary components from the iTunes installer, but my hesitation in doing this is that the Apple license agreement says you can't "disassemble" or "create derivative works of the Licensed Application". Am I not understanding this correctly?

Thanks for any input,
JB

Re: AAC Codec questions / compatibility with car players

Reply #1
AAC compatibility with hardware decoders tends to be mixed. Lots of things work with iTunes and not necessarily everything else.

Hacked iTunes installers are absolutely against apples license terms. If you care about such things, download from Apple.

Re: AAC Codec questions / compatibility with car players

Reply #2
I would not be surprised if it's metadata issue. IIRC it used to be an issue years ago that the m4a container allows metadata to be stored before and after the audio but that some players only excepted metadata at the start of the file.

What happens if you take one of the incompatible files, strip all its tags and put in new ones or significantly change them with a popular tag editor?
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead

Re: AAC Codec questions / compatibility with car players

Reply #3
In all cases, I used foobar2000 to do the encoding---wouldn't it write the AAC tags in the same way for each case (FhG, FDK, and NeroAAC)? I also edited the tags in Mp3Tag (a truly great program) before testing.

I tried deleting and recreating the tags in Mp3Tag and the FhG files still do not show up in the car.

JB

Re: AAC Codec questions / compatibility with car players

Reply #4
Yes, I think that would rule out a metadata issue pretty convincingly.
Every night with my star friends / We eat caviar and drink champagne
Sniffing in the VIP area / We talk about Frank Sinatra
Do you know Frank Sinatra? / He's dead

Re: AAC Codec questions / compatibility with car players

Reply #5
The Kenwood stereo in my car chokes on AAC if the album art is too big. Another reason why I always end up back using MP3.

Re: AAC Codec questions / compatibility with car players

Reply #6
Have you tried stripping all unnecessary tags from your file and then test it in your car? The format itself should be compatible. I'd be surprised, if the FhG encoder lib would produce a malformed file. Even though it's probably a little older (Winamp hasn't seen development for quite some time), the library should produce compatible files nonetheless.

Could you perhaps upload a sample of the file that won't play in your car? I'd love to see if I can find something weird. (Doesn't have to be music, just record some noises yourself).

Also, can you tell us the part number of your car stereo system? I'd love to see if we can track down the datasheet for it, etc.

Re: AAC Codec questions / compatibility with car players

Reply #7
Have you tried stripping all unnecessary tags from your file and then test it in your car? The format itself should be compatible. I'd be surprised, if the FhG encoder lib would produce a malformed file.

This is extremely common with AAC files on devices that aren't running Android or Apple software with lots of RAM and fully spec complaint decoders.  The files themselves usually aren't malformed, instead typically they're in an MP4 container that the stereo doesn't understand or lacks sufficient RAM to parse.  You can almost always fix this problem by losslessly packing them in an "iTunes" or "mobile optimized" MP4 file or similar. 

Re: AAC Codec questions / compatibility with car players

Reply #8
This is extremely common with AAC files on devices that aren't running Android or Apple software with lots of RAM and fully spec complaint decoders.  The files themselves usually aren't malformed, instead typically they're in an MP4 container that the stereo doesn't understand or lacks sufficient RAM to parse.  You can almost always fix this problem by losslessly packing them in an "iTunes" or "mobile optimized" MP4 file or similar. 
OK, that does make sense. And the RAM limitation comes to mind in DJ equipment players. Can you perhaps elaborate a little bit about the specs which is often overlooked by some embedded players?

Most DJ equipment players I'm familiar with, have no AAC/MP4 playback capabilities at all. Most of them understand WAV/PCM, MP2 and MP3, and WMA, however I never looked into which one of the four codecs ("WMA" is not only the name of the file format, but also the codec. There's also "WMA Pro", "WMA Lossless", and "WMA Voice").
This "selective" support is kinda interesting, actually.


Re: AAC Codec questions / compatibility with car players

Reply #10
Have you tried stripping all unnecessary tags from your file and then test it in your car?

I haven't tried stripping all tags - I will need to find a blank USB flash drive and try that (too many other files on this drive which would make it hard to locate the untagged files)---but as I mentioned above, foobar did the tags for the three AAC encoders tested, and I modified these in Mp3Tag (adding suffixes to the album titles to indicate the different encoders). 

I'll try to come up with a short sample that I can verify is not recognized in the car and then upload that.

The player is the "multimedia system" built into a 2014 Toyota Corolla. It has always played Nero AAC files and all MP3 files without problems.

Re: AAC Codec questions / compatibility with car players

Reply #11
OK, I'll see if I can come up with something like a manual for it.

https://www.toyota.com/t3Portal/document/om-s/OM12F00U/pdf/OM12F00U.pdf <--- is it this one described on Section 5-11 (p. 283)?

On Page 304 and the following, the limitations are listed.

Quote from: Toyota Corolla Manual, p. 304-306
  • MP3, WMA and AAC files
    MP3 (MPEG Audio LAYER3) is a standard audio compression format.
    Files can be compressed to approximately 1/10 of their original size by using
    MP3 compression.
    WMA (Windows Media Audio) is a Microsoft audio compression format.
    This format compresses audio data to a size smaller than that of the MP3 format.
    AAC is short for Advanced Audio Coding and refers to an audio compression
    technology standard used with MPEG2 and MPEG4.
    MP3, WMA and AAC file and media/formats compatibility are limited.

    • MP3 file compatibility
      • Compatible standards
        MP3 (MPEG1 LAYER3, MPEG2 LSF LAYER3)
      • Compatible sampling frequencies
        MPEG1 LAYER3: 32, 44.1, 48 (kHz)
        MPEG2 LSF LAYER3: 16, 22.05, 24 (kHz)
      • Compatible bit rates (compatible with VBR)
        MPEG1 LAYER3: 32-320 (kbps)
        MPEG2 LSF LAYER3: 8-160 (kbps)
      • Compatible channel modes: stereo, joint stereo, dual channel and monaural
    • WMA file compatibility
      • Compatible standards
        WMA Ver. 7, 8, 9
      • Compatible sampling frequencies
        32, 44.1, 48 (kHz)
      • Compatible bit rates (only compatible with 2-channel playback)
        Ver. 7, 8: CBR 48-192 (kbps)
        Ver. 9: CBR 48-320 (kbps)
    • AAC file compatibility
      • Compatible standards
        MPEG4/AAC-LC
      • Compatible sampling frequencies
        11.025/12/16/22.05/24/32/44.1/48 (kHz)
      • Compatible bit rates
        16-320 (kbps)
    • Compatible media
      Media that can be used for MP3, WMA and AAC playback are CD-Rs and
      CD-RWs.
      Playback in some instances may not be possible if the CD-R or CD-RW is
      not finalized. Playback may not be possible or the audio may jump if the
      disc is scratched or marked with fingerprints.
    • Compatible disc formats
      The following disc formats can be used.
      • Disc formats: CD-ROM Mode 1 and Mode 2
        CD-ROM XA Mode 2, Form 1 and Form 2
      • File formats: ISO9660 Level 1, Level 2, (Romeo, Joliet)
        UDF (2.01 or lower)
        MP3, WMA and AAC files written in any format other than those listed
        above may not play correctly, and their file names and folder names may
        not be displayed correctly
      Items related to standards and limitations are as follows.
      • Maximum directory hierarchy: 8 levels (including the root)
      • Maximum length of folder names/file names: 32 characters
      • Maximum number of folders: 192 (including the root)
      • Maximum number of files per disc: 255
    • File names
      The only files that can be recognized as MP3/WMA/AAC and played are
      those with the extension .mp3, .wma or .m4a.
    • Discs containing multi-session recordings
      As the multimedia system is compatible with multi session discs, it is possible
      to play discs that contain MP3, WMA and AAC files. However, only the
      first session can be played.
    • ID3, WMA and AAC tags
      ID3 tags can be added to MP3 files, making it possible to record the track
      title, artist name, etc.
      The system is compatible with ID3 Ver. 1.0, 1.1, and Ver. 2.2, 2.3 ID3 tags.
      (The number of characters is based on ID3 Ver. 1.0 and 1.1.)
      WMA tags can be added to WMA files, making it possible to record the
      track title and artist name in the same way as with ID3 tags.
      AAC tags can be added to AAC files, making it possible to record the track
      title and artist name in the same way as with ID3 tags.
    • MP3, WMA and AAC playback
      When a disc containing MP3, WMA or AAC files is inserted, all files on the
      disc are first checked. Once the file check is finished, the first MP3, WMA or
      AAC file is played. To make the file check finish more quickly, we recommend
      you do not write any files to the disc other than MP3, WMA or AAC
      files or create any unnecessary folders.
      Discs that contain a mixture of music data and MP3, WMA or AAC format
      data cannot be played.
    • Extensions
      If the file extensions .mp3, .wma and .m4a are used for files other than
      MP3, WMA and AAC files, they may be mistakenly recognized and played
      as MP3, WMA and AAC files. This may result in large amounts of interference
      and damage to the speakers.
    • Playback
      • To play MP3 files with steady sound quality, we recommend a fixed bit
        rate of at least 128 kbps and a sampling frequency of 44.1 kHz.
      • CD-R or CD-RW playback may not be possible in some instances,
        depending on the characteristics of the disc.
      • There is a wide variety of freeware and other encoding software for MP3,
        WMA and AAC files on the market, and depending on the status of the
        encoding and the file format, poor sound quality or noise at the start of
        playback may result. In some cases, playback may not be possible at all.
      • When files other than MP3, WMA or AAC files are recorded on a disc, it
        may take more time to recognize the disc and in some cases, playback
        may not be possible at all.
      • Microsoft, Windows, and Windows Media are the registered trademarks
        of Microsoft Corporation in the U.S.A. and other countries.

Even though the limitations might not be superbly precise, I'd love to see if the file the player is rejecting is actually conforming to the limitations laid out in this document.

Re: AAC Codec questions / compatibility with car players

Reply #12
Ok - I did a more controlled test using a blank USB drive with the three attached files on it. It does appear to be a tag issue, even though I treated the tagging in exactly the same way for the three different files (foobar added the tags, and then I modified the Album field using Mp3Tag to differentiate the three files). The Toyota player does not recognize the tags of the FhG encoded sample, but it does play it. Before, I did not see the FhG files because, without it reading the tags, they were buried in all of the other files on the drive.


Re: AAC Codec questions / compatibility with car players

Reply #14
Here is the metadata from Sample_FhG_VBR4.m4a:
Code: [Select]
* Movie Info *
Timescale 44100 - 3 tracks
Computed Duration 00:00:08.057 - Indicated Duration 00:00:08.057
Fragmented File: no
File suitable for progressive download (moov before mdat)
File Brand mp42 - version 0
Compatible brands: mp42 isom
Created: GMT Wed Dec 27 20:46:56 2017
Modified: GMT Wed Dec 27 20:46:56 2017

File has root IOD (92 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: No visual capability required (0xff)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)

Chapters:
Chapter #1 - 00:00:00.036 - "Symphony No. 6 in F major, op. 68 (Beethoven): 1st Movement - Allegro ma non troppo, 1st part (Side 1)"

iTunes Info:
Name: Symphony No. 6 in F major, op. 68 (Beethoven): 1st Movement - Allegro ma non troppo, 1st part (Side 1)
Artist: BBC Symphony Orchestra (Conductor: Arturo Toscanini)
Album: Sample_FhG
Comment: Gramophone DB 3333 (2ER 231) RCM and ELP
Genre: Symphonies
Encoder Software: fhgaac v03.02.16;VBR=4
3 UDTA types: hnti (1) meta (1) chpl (1)

Track # 1 Info - TrackID 1 - TimeScale 44100
Media Duration 00:00:08.057 - Indicated Duration 00:00:08.057
Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 347 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 44100
Synchronized on stream 2
RFC6381 Codec Parameters: mp4a.40.2
All samples are sync

Track # 2 Info - TrackID 2 - TimeScale 1000
Media Duration 00:00:08.057 - Indicated Duration 00:00:08.057
Track is present in Root OD
Media Info: Language "Undetermined (und)" - Type "odsm:mp4s" - 1 samples
MPEG-4 Config: ObjectDescriptor Stream - ObjectTypeIndication 0x01
Self-synchronized
RFC6381 Codec Parameters: mp4s.01
All samples are sync

Track # 3 Info - TrackID 3 - TimeScale 1000
Media Duration 00:00:08.057 - Indicated Duration 00:00:08.057
Track is present in Root OD
Media Info: Language "Undetermined (und)" - Type "sdsm:mp4s" - 1 samples
MPEG-4 Config: SceneDescription Stream - ObjectTypeIndication 0x02
BIFS Scene description - Command stream
Synchronized on stream 2
RFC6381 Codec Parameters: mp4s.02
All samples are sync

The other files don't have this sort of redundant metadata information, maybe this has something to do with it?. Although I'm not exacly an expert in MP4 metadata, etc. I can post the other metadata information, if requested.


Re: AAC Codec questions / compatibility with car players

Reply #16
I'd suggest taking that FhG file, and removing the ODSM and SDSM streams, and seeing if the car now accepts the files.

With these relatively low-featured, embedded players, less is more, The CD player in my old car, was unable to read Joliet information off of CDROMs. it was all just ISO 9660 level 1 to 3 I think.

Btw, in I used MP4box to read the meta data of those files.

Re: AAC Codec questions / compatibility with car players

Reply #17
That would be a worthwhile test---it would show conclusively if these streams are the source of the problem. So, of the three, only this encoder included these streams?

Can the streams be easily removed using the MP4Box program you mentioned?

I've contented myself with using the FDK encoder instead of FhG, since the former is compatible with my car's player, and what I've read says that the two are comparable. I also very much like that the FDK encoder is open source.  

Re: AAC Codec questions / compatibility with car players

Reply #18
Yes, only this file has the two extra streams. The two other files just have one track, with the AAC stream.

Yes, MP4box can easily remove the superfluous tracks:
Code: [Select]
MP4Box -rem 2 -rem 3 Sample_FhG_VBR4.m4a

I also tried with FFmpeg, but for some reason it adds a "text:text" track, and I don't seem to be able to convince FFmpeg to not attach this track, no idea what's going on here. The FFmpeg syntax isn't the most intuitive anyway ¦D

The FDK encoder is certainly not a bad choice all things considered. It's also the one I'd chose out of convenience, because it comes with my Linux distro. In pretty much all ABX results I've seen so far, FDK and FhG are nearly identical, only depending on sounds. One song might sound better with one encoder, while another with the other, etc.

Since we're talking about a car stereo and not exactly ultra-high-end headphones, etc. transparency is achieved pretty easy, anyway, so no need to shoot for the moon, really.

I've re-uploaded your sample file with the extra tracks removed, so you can check in your car, etc.

Just in case you're interested: MP4Box is part of GPAC and is available here: https://gpac.wp.imt.fr/downloads/
Windows binaries are available, too.


Re: AAC Codec questions / compatibility with car players

Reply #20
I tested the file with those two extra streams removed. The player recognized the tags and it played fine, so these are what was confusing it. Thanks for the help with this.

Re: AAC Codec questions / compatibility with car players

Reply #21
Anytime! Also, great thing to know where compatibility breaks down, for future reference, etc.