INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MP4 Plugin (m4a/AAC & ALAC decoder)  (Read 14173 times)

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
MP4 Plugin (m4a/AAC & ALAC decoder)
« on: March 21, 2011, 01:11:00 pm »

The announced history so far:

Quote
16.0.53 (3/16/2011)

4. Fixed: Mp4/m4a tag reader did not read bitrate correctly (build 52 ony).
5. Fixed: Mp4/m4a tag reader could crash on reading duration (build 52 ony).
6. Fixed: Mp4/m4a tag reader did not read embedded cover art  (build 52 ony).
7. Faster: Mp4/m4a tag reader is faster on files with embedded image.

16.0.52 (3/15/2011)

1. NEW: Improved support for Apple files.
2. Fixed: The mp4/m4a tagging system did not read replay-gain data correctly in build 51.

16.0.51 (3/11/2011)

14. Fixed: The new mp4/m4a tagging system did not read replay gain data into MC's replaygain fields.

16.0.50 (3/10/2011)

7. Fixed: The new mp4/m4a tagging system did not handle BPM and Date fields correctly.

16.0.46 (3/8/2011)

1. NEW: A new mp4/m4a file tagging system that reads all iTunes style tags, including embedded cover art.


Bugs (quite show stoppers)

- HE-AAC decoding does not work. The sound is seriously corrupted. If HE is not supported, the correct way to handle them would be to decode only the LC part and ignore the SBR part, like the old iTunes versions used to do. Naturally, it would be better to have correctly working HE-AAC support.

- ALAC seeking does not work.


Missing functionality

- Gapless m4a/AAC playback. I'd expect native support include gapless playback.

iTunes and the recent versions of the Nero encoder store the gapless playback info in the ITUNSMPB tag. The values are stored in hex format as follows (in this example: Nero LC, HE and HE+PS):

Red=encoder delay  Green=padding   Blue=original sample count
Quote
LC
 00000000 00000A40 000003E4 000000000004B5DC 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

HE
 00000000 00000920 000003F2 0000000000025AEE 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

HE+PS
 00000000 00000AF8 0000021A 0000000000025AEE 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Here are the values after conversion to dec:

LC
2624    996   308700

HE
2336   1010   154350

HE+PS
2808    538   154350

Apparently the original sample count for the HE versions is correct for the LC part (half of the reconstructed sample rate).

In addition you must also take the decoder delay into account. Here is a related thread at doom9: http://forum.doom9.org/showthread.php?t=154881
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #1 on: March 21, 2011, 01:19:40 pm »

I forgot this,

DirectShow & DC-Bass
Quote
Library now has 184 files. Search and update took 2:32.

Imported 182 new files.

Auto (the new plugin)
Quote
Library now has 184 files. Search and update took 0:25.

Imported 182 new files.

M4A importing is a lot faster with the new plugin.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #2 on: March 21, 2011, 01:47:21 pm »

... and this,

The bitrate field shows the decoded PCM bitrate (e.g. 1411 kbps for a 44.1 kHz file).
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41863
  • Shoes gone again!
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #3 on: March 21, 2011, 01:57:15 pm »

Bugs (quite show stoppers)

- HE-AAC decoding does not work. The sound is seriously corrupted. If HE is not supported, the correct way to handle them would be to decode only the LC part and ignore the SBR part, like the old iTunes versions used to do. Naturally, it would be better to have correctly working HE-AAC support.

Could you email me a sample?  It may be a container issue.  I'm matt at jriver dot com.


Quote
- ALAC seeking does not work.

Fixed next build.
Logged
Matt Ashland, JRiver Media Center

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #4 on: March 21, 2011, 03:16:31 pm »

I was already preparing a sample package that you can use for testing format compatibility and gapless playback.

Quote
M4a gapless samples, four tracks, total duration 30 s.
Formats: APE (reference), ALAC, Nero LC-AAC, Nero HE-AAC (SBR), Nero HE-AAC (SBR+PS), QuickTime LC-AAC, iTunes HE-AAC (SBR).
File: m4a_samples.zip (7.8 MB)

http://cid-138ca589c542aeee.office.live.com/self.aspx/MC%20stuff/m4a%20samples/m4a^_samples.zip
(The download link is on the above Skydrive webpage.)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41863
  • Shoes gone again!
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #5 on: March 22, 2011, 11:39:15 am »

- HE-AAC decoding does not work. The sound is seriously corrupted. If HE is not supported, the correct way to handle them would be to decode only the LC part and ignore the SBR part, like the old iTunes versions used to do. Naturally, it would be better to have correctly working HE-AAC support.

Fixed next build.

Thank you for the sample files.
Logged
Matt Ashland, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10849
  • Dogs of the world unite!
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #6 on: March 22, 2011, 04:02:24 pm »

... and this,

The bitrate field shows the decoded PCM bitrate (e.g. 1411 kbps for a 44.1 kHz file).

Will be fixed soon.
Logged
Yaobing Deng, JRiver Media Center

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #7 on: March 22, 2011, 05:53:33 pm »

Quote
16.0.56 (3/22/2011)

3. Fixed: It was not possible to seek ALAC files.
11. Fixed: Mp4/m4a tagging reading could deadlock on some files containing copyright notice.
12. Fixed: Transitioning from native audio playback to Directshow audio playback when there was an audio format change could lead to problems.
13. Fixed: Some M4A files would not play properly.

ALAC seeking works and all AAC test samples play now correctly -- though not gaplessly, but that wasn't on the menu... (yet?)


BTW, have you tried any online AAC streams? Is the plugin intended to be able to play Internet radio?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #8 on: March 23, 2011, 01:22:31 pm »

FYI, I just noticed that the ITUNSMPB tag values in my "iTunes HE-AAC (SBR)" sample files are slightly off. This was caused by a buggy iTunes version (an early v.10 build).

I just installed the latest iTunes version (10.2.1.1) and the bug seems to be fixed. It produces values that are identical to the Nero and QuickTime values.

For encoding the "QuickTime LC-AAC" set I used the qaac frontend and it created correct ITUNSMPB tags.

So, if you are considering adding gapless support, don't use the "iTunes HE-AAC (SBR)" file set for testing the behavior.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #9 on: April 15, 2011, 11:40:27 am »

Quote
16.0.66 (4/11/2011)

1. NEW: Tag writing for mp4/m4a audio files.

I have run some tests and in general the new tagger seems to work fine.

I noticed a few problems though:

- It cannot embed cover art

- If the track number values in imported files contain the total number of tracks (e.g 1/10), on a tag write the value is truncated to a simple track number. Even though MC doesn't have a total number of tracks field it would be nice if MC could preserve it. MC's MP3 tagger preserves it.

- The tracks from iTunes shop contain a precise date value in ISO format (e.g. 2011-03-18T07:00:00Z). This value is truncated to a plain year value. Would it be possible to actually support the value or at least preserve the complete string in the file tag if the value is not changed inside MC?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #10 on: April 15, 2011, 02:19:28 pm »

Quote
- If the track number values in imported files contain the total number of tracks (e.g 1/10), on a tag write the value is truncated to a simple track number. Even though MC doesn't have a total number of tracks field it would be nice if MC could preserve it. MC's MP3 tagger preserves it.

The above applies also to the total discs value.

Oh, and please don't replace the useful encoder information with the "Media Center [version]" string (see the attached screenshot.) I checked the definitions at http://atomicparsley.sourceforge.net/mpeg-4files.html, but couldn't find any suitable tag "atom" for the tagger application. Please invent a new field if you really believe it is necessary to store the Media Center version info in a tag. (In the past some users have expressed their dislike of this mandatory behavior.)

However, perhaps you could add the "tagged date" data in a standard format (also shown in the screenshot). iTunes writes this tag on each tag update.

I attached also a small sample that has the original "Cİtoo" value (qaac 0.37, QuickTime 7.6.9, TVBR Quality 64) and the total tracks & discs values.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #11 on: April 18, 2011, 02:36:13 pm »

Multichannel, 5.1 and 7.1 m4a/AAC files do not work. 5.1 playback has wrong channel mapping and 7.1 playback is seriously broken.

I attached my 5.1 and 7.1 sample files (encoded with the Nero CLI AAC encoder v.1.5.4.0)

The source files in wav format are available here:
http://www.microsoft.com/windows/windowsmedia/howto/articles/Multichannel.aspx#link6
(The MS sample packages contain also 6 and 8 ch wma test files.)

I didn't try multichannel HE-AAC.

EDIT

I tested also HE-AAC. It has the same issues. I attached another sample package.

Here is what Mediainfo shows:

HE-AAC 5.1
Code: [Select]
General
Complete name                    : F:\Test\multichannel\6-8 channel aac\6_Channel_ID.m4a
Format                           : MPEG-4
Format profile                   : Base Media / Version 2
Codec ID                         : mp42
File size                        : 31.3 KiB
Duration                         : 5s 944ms
Overall bit rate                 : 43.1 Kbps
Encoded date                     : UTC 2011-04-18 19:46:06
Tagged date                      : UTC 2011-04-18 19:46:07

Audio
ID                               : 1
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : HE-AAC / LC
Codec ID                         : 40
Duration                         : 5s 944ms
Bit rate mode                    : Variable
Bit rate                         : 40.3 Kbps
Maximum bit rate                 : 55.6 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 44.1 KHz / 22.05 KHz
Compression mode                 : Lossy
Stream size                      : 29.3 KiB (93%)
Writing library                  : Nero AAC codec 1.5.4.0
Encoding settings                : -q 0.25
Encoded date                     : UTC 2011-04-18 19:46:06
Tagged date                      : UTC 2011-04-18 19:46:07

HE-AAC 7.1
Code: [Select]
General
Complete name                    : F:\Test\multichannel\6-8 channel AAC\8_Channel_ID.m4a
Format                           : MPEG-4
Format profile                   : Base Media / Version 2
Codec ID                         : mp42
File size                        : 62.6 KiB
Duration                         : 14s 122ms
Overall bit rate                 : 36.3 Kbps
Encoded date                     : UTC 2011-04-18 19:46:05
Tagged date                      : UTC 2011-04-18 19:46:11

Audio
ID                               : 1
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : HE-AAC / LC
Codec ID                         : 40
Duration                         : 14s 122ms
Bit rate mode                    : Variable
Bit rate                         : 34.6 Kbps
Maximum bit rate                 : 62.2 Kbps
Channel(s)                       : 8 channels
Channel positions                : Front: L C R, Side: L R, Back: L R, LFE
Sampling rate                    : 48.0 KHz / 24.0 KHz
Compression mode                 : Lossy
Stream size                      : 59.7 KiB (95%)
Writing library                  : Nero AAC codec 1.5.4.0
Encoding settings                : -q 0.25
Encoded date                     : UTC 2011-04-18 19:46:05
Tagged date                      : UTC 2011-04-18 19:46:11
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #12 on: April 18, 2011, 03:26:01 pm »

In addition I tested various high resolution 2 channel ALAC samples. Playback works fine and the sample rate and bit depth info seem to now show up correctly in the library fields.

However, I noticed that the format info in Action Window > Tag incorrrectly shows "bit" as the bitrate unit. The unit should be kbps. See the attached screenshot.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41863
  • Shoes gone again!
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #13 on: April 18, 2011, 04:56:40 pm »

Hi Alex,

Next build:
Fixed: 6 and 8 channel AAC files would not play correctly.
Fixed: MP4 Action Window > Tag > Format page showed "bit" instead of "kbps" for the bitrate unit.
Fixed: Headerless AAC files were not playing properly.

Yaobing is looking into the tagging issues.

Thanks for all your help.
Logged
Matt Ashland, JRiver Media Center

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #14 on: April 24, 2011, 07:22:31 pm »

My latest report:
____________________________________________________________________

16.0.71 (4/18/2011)

1. Fixed: 6 and 8 channel AAC files would not play correctly.  confirmed fixed

2. Fixed: MP4 Action Window > Tag > Format page showed "bit" instead of "kbps" for the bitrate unit.  confirmed fixed

3. Fixed: Headerless AAC files were not playing properly.  not yet tested

16.0.72 (4/19/2011)

1. NEW: MP4 plugin supports AAC radio / streaming using the buffering reading system used by MP3.  not yet tested

2. NEW: MP4 plugin supports Icy metadata when playing AAC radio so track names, artists, etc. appear.  not yet tested

16.0.73 (4/20/2011)

2. NEW: AAC audio decoder outputs 64-bit (previously output 16-bit).  not yet tested

4. Fixed: m4a audio file tagger did not embed image in file.  confirmed fixeda new bug: it is impossible to remove embedded cover art. "Cover Art > Remove Cover Art" does not remove the image from the file.

5. Fixed: m4a audio file tagger did not preserve existing "total number of tracks" and "total number of disks" values when writing "track #" and "disk #" respectively.  confirmed fixeda new bug: it is impossible to clear the track or disc number from the file. When a track or disc number is deleted the change is applied only to the database. (If the file tag contains the "total part" it should be removed too.)

6. Changed: m4a audio file tagger will not replace existing encoding tool tag ('İtoo' atom) with "Media Center 16.0.xx".  Instead, "Tool Name" and "Tool Version" are written in different atoms.  confirmed fixed

7. Fixed: Some AAC radio / streaming sites were not working.  not yet tested

10. Fixed: m4a audio file tagger did not handle Date field correctly.  confirmed fixed

_______________________________________________________

Possibly a new bug: My 24-bit high resolution QuickTime/qaac encoded ALAC sample files do not decode correctly (they produce only loud noise). My 24-bit ALAC samples that were encoded with dBpoweramp's ALAC encoder play correctly.

The header info may be wrong in the 24-bit QuickTime/qaac ALAC samples. Some tools report "16-bit". Despite this foobar2000 can play the files correctly.

The samples are available here: http://cid-138ca589c542aeee.office.live.com/self.aspx/MC%20stuff/m4a%20samples/ALACsamples.zip  (It is a "skydrive" webpage and the actual download link is there.)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #15 on: April 28, 2011, 10:46:42 am »

A gentle bump. (since this thread is now in a new location)

Are you working on the remaining bugs?

Have you considered adding gapless decoding? The logic is similar to MP3 gapless decoding. The metadata for gapless decoding is stored in a different format than in MP3 files, but reading it correctly would probably not be the most difficult part. Personally I would not consider an m4a/AAC decoder complete without gapless decoding.

Finally, I think the import/read speed has regressed a bit, but I have not actually tested this (it was quite fast about a month ago: http://yabb.jriver.com/interact/index.php?topic=63215.msg422844#msg422844). I will run some tests and report.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10849
  • Dogs of the world unite!
Re: MP4 Plugin (m4a/AAC & ALAC decoder)
« Reply #16 on: April 28, 2011, 11:13:13 am »

Alex,

Thanks for details reports.  Yes we are still working on the remaining bugs.  In particular I will be working on #4 and 5, which involve properly removing tags.  

Yaobing
Logged
Yaobing Deng, JRiver Media Center
Pages: [1]   Go Up