You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An audio file is a container (mp4/mkv etc). A container contains one or more streams and possibly metadata. Those streams are encoded with a codec. For audio those streams are usually multiple tracks. Rodio currently has no way to deal with multiple tracks in one file/container.
Some containers are special and can contain only a stream encoded with one specific codec. For example mp3 contains only MPEG-1 Audio Layer 3 encoded stream. Flac is another of these.
Features in rodio
Features in rodio can have two functions:
allow users to pick one decoder over another (for example minimp3 vs symphonia). Though this can only be done by disabling/enabling support by a decoder for a container.
speed up compilation by disabling unused codecs. Important for upstream libs building on rodio like bevy
exclude code with less permissive licenses (symphonia).
Right now there is no structure to the symphonia related features. There are features which
enable a single container
a single container and codecs often used with it.
a single codec.
Right now (cause of #516 and probably #527) we can not play ogg files. While there is a feature to enable the vorbis codec usually used in an ogg there is no feature to enable support for the ogg container. This will be addressed shortly.
Issue
This can be pretty confusing to users not familiar with the difference between codecs and decoders (such as me this morning). The errors you get if you fail to enable a codec feature can be puzzling. Without looking at the source code it is not possible to predict what a feature combination will do.
Proposal
Document how enabled features determines the decoder used by rodio. Using different decoders for different streams in the same container will only be possible when specifying enabled codec and containers separately. As an example, it will be possible to configure rodio such that it uses lewton for ogg containing a vorbis stream while decoding ogg containing flac with symphonia.
Background
Terminology
An audio file is a container (mp4/mkv etc). A container contains one or more streams and possibly metadata. Those streams are encoded with a codec. For audio those streams are usually multiple tracks.
Rodio
currently has no way to deal with multiple tracks in one file/container.Some containers are special and can contain only a stream encoded with one specific codec. For example mp3 contains only MPEG-1 Audio Layer 3 encoded stream. Flac is another of these.
Features in rodio
Features in
rodio
can have two functions:minimp3
vssymphonia
). Though this can only be done by disabling/enabling support by a decoder for a container.rodio
likebevy
symphonia
).Right now there is no structure to the
symphonia
related features. There are features whichRight now (cause of #516 and probably #527) we can not play ogg files. While there is a feature to enable the vorbis codec usually used in an ogg there is no feature to enable support for the ogg container. This will be addressed shortly.
Issue
This can be pretty confusing to users not familiar with the difference between codecs and decoders (such as me this morning). The errors you get if you fail to enable a codec feature can be puzzling. Without looking at the source code it is not possible to predict what a feature combination will do.
Proposal
Document how enabled features determines the decoder used by
rodio
. Using different decoders for different streams in the same container will only be possible when specifying enabled codec and containers separately. As an example, it will be possible to configurerodio
such that it useslewton
for ogg containing a vorbis stream while decoding ogg containing flac withsymphonia
.Make the current container features (for example
symphonia-isomp4
) enable all codecs. This removes the pitfall of Reverb example rans into error with symphonia vorbis decoder #516.Add features that only enable a container without enabling any codecs to facilitate 1. and allow speeding up compilation.
Please let me know what you (the rodio user) think.
The text was updated successfully, but these errors were encountered: