pcwalton / rust-media

A free, comprehensive, and portable video/audio streaming library for Rust
Apache License 2.0
787 stars 57 forks source link

Support MP3 #10

Open pcwalton opened 9 years ago

pcwalton commented 9 years ago

We should add MP3 support via FFmpeg and AudioUnit.framework on Mac. It may also be desirable to add ID3 support.

bgdncz commented 8 years ago

Is it ok if we don't use FFmpeg or AudioUnit.framework and write a decoder in Rust instead?

pcwalton commented 8 years ago

It is, but that decoder should be treated as a fallback for when no hardware decoder is available. Sadly, the only way to use HW decoders is typically the platform APIs, due to the closed proprietary nature of decoders :(

bgdncz commented 8 years ago

But isn't that only for Win + Mac? For Linux we're using software decoding anyways, aren't we?

pcwalton commented 8 years ago

Yeah, I don't think desktop Linux usually uses HW decoding, so a pure Rust solution sounds just fine there. Assuming it works and is fast enough, of course :)

bgdncz commented 8 years ago

It would be an interesting experiment :)

bgdncz commented 8 years ago

How would we go about per-frame headers and info (ex. sampling rate)? It is common practice to assume that every frame will be like the first, but that's not correct per se.

bgdncz commented 8 years ago

@pcwalton ^^

pcwalton commented 8 years ago

Usually I've been following the way mkv does these things. For example, the notion of cluster/track/etc. is taken from mkv. So I guess my answer would be "however mkv handles it".

bgdncz commented 8 years ago

@pcwalton Well, it seems like mkv handles it exactly the way I put it (at least judging by this), which assumes that each frame has the same headers, but this is not correct, and it will not allow features such as variable bitrate

ritiek commented 6 years ago

Any update on MP3 support?

jdm commented 6 years ago

Nobody is working on rust-media at this point.

lieff commented 6 years ago

Hi, here new https://crates.io/crates/minimp3