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

Cannot read m4a files - no channels found #291

Open
tGrothmannFluffy opened this issue Jun 21, 2024 · 2 comments
Open

Cannot read m4a files - no channels found #291

tGrothmannFluffy opened this issue Jun 21, 2024 · 2 comments

Comments

@tGrothmannFluffy
Copy link

tGrothmannFluffy commented Jun 21, 2024

Hi,

I'm trying to to decode m4a files, but I am not getting any channels in the decoder. track.codec_params.channels is None.

I'm using these features, because I need to be able to decode a lot of file types:

symphonia = { version = "0.5.4", features = [
    "mpa",
    "all-codecs",
    "aiff",
    "alac",
    "adpcm",
    "aac",
    "vorbis",
    "pcm",
    "isomp4",
    "caf",
    "mkv",
    "opt-simd-sse",
    "opt-simd-avx",
    "opt-simd-neon",
    "default",
] }

The files I tried are:

sweeps.zip

@tGrothmannFluffy
Copy link
Author

tGrothmannFluffy commented Jun 21, 2024

It seems like I can get the number of channels via

let decoded = decoder.decode(&packet)?;
match decoded {
[...]
   AudioBufferRef::S16(buffer) => {
      let num_channels = buffer.spec().channels.iter().count()
[...]

which is not ideal but works.

@tGrothmannFluffy
Copy link
Author

Even though I found a solution for now, I'd like to leave this open. Maybe someone can point me to a better way or tell me what I'm doing wrong here.

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