John Morton
2004-Jul-05 07:57 UTC
[Vorbis] Use of ogg vorbis for real time audio streaming?
On Tue, 06 Jul 2004 02:40, d00ma3@tomsmusicpage.org.uk wrote:> Clearly, this link would have to be two-way; and should have a reasonable > latency (perhaps under 100ms). I understand that this is a challenging > task, and perhaps even impossible. However, I think it is possible that > with attention to detail at every level of the datapath it could be done. > > So. My question is: is ogg vorbis (as a whole, bitstream and codec) > appropriate for such an application? I have studied the documentation, and > it seems to me that there are several barriers (for example, ogg pages are > recommened to be 4-8kB, this is 0.5 - 1 sec worth of audio for a 64kbps > stream). Could I work around these limitations by aggressively setting > certain parameters in the code, or is this a no-brainer from the outset?As I understand it, there's a considerable size/latency tradeoff in the ogg encapuslation that makes it very hard to use ogg in low latency settings. Not sure about the vorbis encoder itself, but you may find that it's actually faster, in it's present form, when encoding in the q>=3 zone. The xiph encoder certainly hasn't seen a lot of optimization work focusing on speed and latency compared to the decoder. Speex is designed for low latency, targeting the VoIP domain, but it's not a good choice for streams that aren't exclusively voice, so that probably doesn't help. The Vorbis over RTP RFC might be of use to you, though: http://www.xiph.org/ogg/vorbis/doc/Vorbis_I_spec.html#vorbis-over-rtp John
Maik Merten
2004-Jul-05 08:33 UTC
[Vorbis] Use of ogg vorbis for real time audio streaming?
d00ma3@tomsmusicpage.org.uk wrote:> So. My question is: is ogg vorbis (as a whole, bitstream and codec) appropriate > for such an application? I have studied the documentation, and it seems to me > that there are several barriers (for example, ogg pages are recommened to be > 4-8kB, this is 0.5 - 1 sec worth of audio for a 64kbps stream). Could I work > around these limitations by aggressively setting certain parameters in the > code, or is this a no-brainer from the outset?Disclaimer: I?m not a developer. Latency will be critical. IIRC current Vorbis encodes audio in blocks sized up to 4096 samples (specification allows block sizes up to 8192 - in integer powers of two). At 44.1 kHz 4096 samples mean that roughly 92 ms of audio has to be gathered before encoding of the block can start - not counting overlapping of blocks. Encoding will take some time. Transport over the internet will introduce additional latency. As you can see it`s very easy to get an overall latency significantly higher than 100 ms. Vorbis minimum block size is 64, so it`s possible to minimize encoding-latency to usable dimensions. However, very small block sizes will severly reduce coding efficency and you?ll have to find a workable tradeoff. Ogg pages can be smaller than 4-8 kb - increasing overall overhead (but I don`t think this will be that critical).
d00ma3@tomsmusicpage.org.uk
2005-Jul-03 07:40 UTC
[Vorbis] Use of ogg vorbis for real time audio streaming?
Hi list! I am currently investigating the possibility of allowing musicians to collaborate over the internet -- Musician A -------> internet --------> Musician B This diagram obscures quite a lot of detail. In reality, the datapath would look more like this: Musician A ADC Compression algorithm UTP (or perhaps RTP?) IP ADSL the Internet ....<snip>..... Clearly, this link would have to be two-way; and should have a reasonable latency (perhaps under 100ms). I understand that this is a challenging task, and perhaps even impossible. However, I think it is possible that with attention to detail at every level of the datapath it could be done. So. My question is: is ogg vorbis (as a whole, bitstream and codec) appropriate for such an application? I have studied the documentation, and it seems to me that there are several barriers (for example, ogg pages are recommened to be 4-8kB, this is 0.5 - 1 sec worth of audio for a 64kbps stream). Could I work around these limitations by aggressively setting certain parameters in the code, or is this a no-brainer from the outset? Any suggestions would be gratefully received! Best regards, Tom
d00ma3@tomsmusicpage.org.uk
2006-Jul-03 02:28 UTC
[Vorbis] Use of ogg vorbis for real time audio streaming?
<014c01c462aa$8a651820$021a0852@Andrew> Message-ID: <1089106122.40ea70ca668f0@www.tomsmusicpage.org.uk> Thanks for the replies and the links! It seems like perhaps ogg vorbis will be usable for what I want. There is the alternative possibility of investigating how well a speech codec like Speex encodes music and working on extending the bandwith. Either way, it is critical to remove as much of the latency as possible. I guess it's getting near time to dive into some code! @ Andrew -- my website is (a little) out of date right now; I graduated recently, and this research is being done as part of my new job :) Thanks again for the information. Tom Quoting Andrew Brampton <andrew@bramp.freeserve.co.uk>:> If its any help I know of two people who recently as part of a Computer > Science degree tackled this type of problem > I did a quick google and I could only find the report for one of the > projects. > http://netjam.freehomepage.com/ > > I think the general outcome of the project was to decide that real-time > musical collaboration was not possible over the internet due to the high > real-time requirements of musicians. > > But maybe this research will help you out. > > Andrew > > P.S Just had a quick look on your website and I see you are also a student > :).. So I guess this is part of dissertation also. Well good luck with it :) > ----- Original Message ----- > From: <d00ma3@tomsmusicpage.org.uk> > To: <vorbis@xiph.org> > Sent: Monday, July 05, 2004 3:40 PM > Subject: [Vorbis] Use of ogg vorbis for real time audio streaming? > > > > > > > > Hi list! > > > > > > I am currently investigating the possibility of allowing musicians to > > collaborate over the internet -- > > > > Musician A -------> internet --------> Musician B > > > > This diagram obscures quite a lot of detail. In reality, the datapath > would look > > more like this: > > > > Musician A > > ADC > > Compression algorithm > > UTP (or perhaps RTP?) > > IP > > ADSL > > the Internet > > ....<snip>..... > > > > Clearly, this link would have to be two-way; and should have a reasonable > > latency (perhaps under 100ms). I understand that this is a challenging > task, > > and perhaps even impossible. However, I think it is possible that with > > attention to detail at every level of the datapath it could be done. > > > > So. My question is: is ogg vorbis (as a whole, bitstream and codec) > appropriate > > for such an application? I have studied the documentation, and it seems to > me > > that there are several barriers (for example, ogg pages are recommened to > be > > 4-8kB, this is 0.5 - 1 sec worth of audio for a 64kbps stream). Could I > work > > around these limitations by aggressively setting certain parameters in the > > code, or is this a no-brainer from the outset? > > > > > > Any suggestions would be gratefully received! > > > > Best regards, > > > > > > Tom > >