how do i load an mp4 file with rodio

96 views Asked by At

while it works with .mp3 it does not with mp4.

let file = File::open(path).expect("unable to open file");
let file = BufReader::new(file);
// mp4 crashes in let source = ...
let source = Decoder::new(file).expect("unable to convert file to a 
music file");`

my cargo should also be appropriate with:

rodio = { version = "0.17", features = ["symphonia-isomp4"] }

i don't know what i am doing wrong. do i need to select a specific version or feature on symphonia?

i have already tried getting the error, but all that i get is Unrecognized Format.

Edit to adress comments: I do not want to have to install ffmpeg, in order to get the audio from mp4 files.

The Rodio-github sais: "MP4 and AAC (both disabled by default) are handled only by Symphonia." That is, why i am using features = ["symphonia-isomp4"]

Unrecognized Format is the exact error, unless you want the backtrace as well https://drive.google.com/file/d/1UEDEuP1O4XSMMwmPXV5dxRnIi713UL05/view?usp=sharing

0

There are 0 answers