lostromb / concentus

Pure Portable C# and Java implementations of the Opus audio codec
Other
248 stars 49 forks source link

Ability to decode Ogg/Opus multiple streams #12

Open mihui opened 7 years ago

mihui commented 7 years ago

Is it possible to decode the multi-stream of ogg/opus instead of a single stream or file? Thanks.

lostromb commented 7 years ago

Do you mean 5.1 channel audio, or playing an Ogg file that has more than 1 elementary stream? If there is more than 1 elementary stream, are they interleaved, or does one start after the other ends?

mihui commented 7 years ago

Thanks for your quick response, I meant "more than 1 elementary stream" with interleaved data if I understood it right, which means if I have a big size of ogg/opus data streaming back to the application, the decoder may have the ability to decode the a part of it, piece by piece, so that the application (client) will play the buffer instead of waiting for downloading the full size of the data.

lostromb commented 7 years ago

So, the logic that is implemented right now is really dumb - the ogg container code just looks for elementary stream [0] in the file, assumes it is opus, and creates an output using only that stream. Obviously it could be much better, but it would require the API to change something like this:

mauriciogracia commented 6 years ago

I am interested in helping to solve this issue, what concepts are needed and what programming techcnices or good practices are recommended before getting involved ? I am a Advanced JAVA Developer with intermdiate Sound related concepts knowledge and very new to the Opus/Concentus arena

lostromb commented 6 years ago

Well, awesome. First things first though, I want to move this issue to the Concentus.Oggfile repository since this is a feature relating to ogg files exclusively. It will also require a total redesign of the API because of the way ogg files work. I'll dump my ideas over in that repository. Some questions for you though: