Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Sample Rate wrong for aac in m4a, actual 96kHz but show 30464 Hz #313

Open
coddoge opened this issue Oct 6, 2022 · 0 comments
Open

Comments

@coddoge
Copy link

coddoge commented Oct 6, 2022

I have a 96kHz m4a file, show in Media info below

Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (M4A /mp42/isom)
File size                                : 24.0 MiB
Duration                                 : 4 min 28 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 749 kb/s
Cover                                    : Yes

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 4 min 28 s
Bit rate mode                            : Variable
Bit rate                                 : 739 kb/s
Maximum bit rate                         : 833 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 96.0 kHz
Frame rate                               : 93.750 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 23.7 MiB (99%)

But read by taglib-sharp it's Audio Sample Rate wrong

<PackageReference Include="TagLibSharp" Version="2.3.0" />
var tag = TagLib.File.Create(@"....m4a");
var json = JsonConvert.SerializeObject(tag.Properties,Formatting.Indented);
{
  "Codecs": [
    {
      "Children": [
        {
          "StreamId": 0,
          "StreamPriority": 0,
          "ObjectTypeId": 64,
          "StreamType": 5,
          "BufferSizeDB": 1244,
          "MaximumBitrate": 833,
          "AverageBitrate": 739,
          "DecoderConfig": [...],
          "Version": 0,
          "Flags": 0,
          "BoxType": [...],
          "Size": 54,
          "Data": null,
          "Children": null,
          "Handler": {
            "Data": [...],
            "HandlerType": [...],
            "Name": "Sound Media Handler",
            "Version": 0,
            "Flags": 0,
            "BoxType": [...],
            "Size": 52,
            "Children": null,
            "Handler": null,
            "HasChildren": false
          },
          "HasChildren": false
        }
      ],
      "Duration": "00:00:00",
      "MediaTypes": 1,
      "Description": "MPEG-4 Audio (mp4a)",
      "AudioBitrate": 739,
      "AudioSampleRate": 30464,
      "AudioChannels": 2,
      "AudioSampleSize": 16,
      "DataReferenceIndex": 1,
      "BoxType": [...],
      "Size": 90,
      "Data": null,
      "Handler": {
        "Data": [...],
        "HandlerType": [...],
        "Name": "Sound Media Handler",
        "Version": 0,
        "Flags": 0,
        "BoxType": [...],
        "Size": 52,
        "Children": null,
        "Handler": null,
        "HasChildren": false
      },
      "HasChildren": true
    },
    null
  ],
  "Duration": "00:04:28.8426666",
  "MediaTypes": 1,
  "Description": "MPEG-4 Audio (mp4a)",
  "AudioBitrate": 739,
  "AudioSampleRate": 30464,
  "BitsPerSample": 0,
  "AudioChannels": 2,
  "VideoWidth": 0,
  "VideoHeight": 0,
  "PhotoWidth": 0,
  "PhotoHeight": 0,
  "PhotoQuality": 0
}

P.S. Audio Sample Rate of 96kHz FLAC is correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant