savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.39k stars 126 forks source link

Multichannel opus support in Liquidsoap #21

Open retroerto opened 11 years ago

retroerto commented 11 years ago

ocaml-opus binding - multichannel support- there seems to be some consensus that this should be easy to add :) so who will be first to it! some details from mail-list pasted in here:

2013/2/6 Samuel Mimram smimram@gmail.com:

Concerning the mutiple channels, it is specified on http://www.opus-codec.org/docs/html_api-1.0.2/index.html :

  • Support for multichannel (up to 255 channels)

So, it should work, but I think multichannel streams need a specific API which is not available in the current ocaml-opus binding (it should be easy to add though).

That's correct, I remember now. The opus library does not provide any facility to properly encapsulate its data in ogg packet. In particular, channel mapping is not provided. For now the ocaml binding only supports stereo or mono channels but, yeah, it should not be too hard to support more, although liquidsoap has no provision to map channels to e.g. rear, front, left and right for instance..

That need not be a problem, as long as there is some metadata with the stream to explain the mapping.

With up to 255 channels available in theory (same as Vorbis) it could be 5.1 surround, 7.1 surround, 16-channel ambisonic, mix stems (like the Vorbis files used in Rock Band games) or something else. So it might be too limiting to assume a specific channel format.

Cheers!

Daniel

Romain

smimram commented 11 years ago

Actually, work already started in https://github.com/savonet/ocaml-opus/pull/2 :)

But let's leave this bug report open until integration in Liquidsoap has been completed!

dbaelde commented 9 years ago

Hey @smimram what's the status of this?

smimram commented 9 years ago

I don't remember much :) From what I see in https://github.com/savonet/ocaml-opus/pull/2 the opus part is mostly ready, now we would need to integrate that in Liquidsoap. @toots if you have some time... ;)