I have a bunch of .mp4 files with various audio codes including AAC and opus. I don't think opus is supported so let's focus on AAC.
I'm using rodio with symphonia all options enabled.
This is the audio stream from my file:
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
It is AAC and supported by rodio/symphonia
Here is my code that fails:
let (_stream, audio_stream) = OutputStream::try_default().unwrap();
let ff = BufReader::new(File::open(&path).unwrap()); //.mp4 file
let audio = Decoder::new(f).unwrap(); <--- error here
The LAST line let audo = .... fails with thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnrecognizedFormat',
the rest of the code is too much to paste but basically audio and audio_stream get passed around to another function that plays them by using let music = audio.convert_samples().buffered();
audio_stream.play_raw(music.clone()).unwrap();
Does anyone know how to fix this?