Skip to content

even with features = ["symphonia-isomp4"] mp4 files just give Unrecognized format #527

@Per6

Description

@Per6

it is nowhere explained, how to use mp4 files with rodio, just, that it is diabeled by default. I assumed, it would work by enabeling the "symphonia-isomp4" feature however it does not work and returns an error of unrecognized format.

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");

i've also tried to use new_mp4 but it doesn't work with any of the Mp4Types and returns the same error just for mp4

let source = if path
		.file_name()
		.unwrap()
		.to_string_lossy()
		.ends_with(".mp4")
	{
		Decoder::new_mp4(file, rodio::decoder::Mp4Type::Mp4)
			.expect("unable to convert mp4 file to a music file")
	} else {
		Decoder::new(file).expect("unable to convert file to a music file")
	};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions