[vorbis-dev] vorbis tool ogg123/oggenc running out of sync while streaming.

Dirk-Willem van Gulik dirkx at webweaving.org
Sun Sep 8 16:23:08 PDT 2002



Or rather - the ogg123 seems to run faster than the oggenc.

Based on the vorbis toots 1.0_1,3

I've got (on freebsd) a small streaming server which essentially takes the
oss/vox audion input; uses the code from oggenc to make a stream and then
a bit of apache 2.0 to dole that stream out over TCP to various clients:

        setup oss /dev/dspW0.0 16 bit stereo 44k1.
        create ogg/vorbis header
        setup tcp
        while(1) {
                read oss from /dev/dsp.
                cut and paste code from oggenc
                        enced this with default settings
                if (accept) {
                        add client
                        do http GET/200 OK
                        send ogg/vorbis header
                }
                for each client {
                        if buffer empty
                                fill buffer with most recent frame.
                        if buffered
                                send as much buffered as we can
                        if error
                                drop client
                }
        }

One of the clients is a Sharp Zaurus running:

        http://ipaq.vmlinuz.org/ogg/

a native ogg123:

        ./ogg123 http://foo/oggie

The apache server streams reliable and steadily at a 4 - 256kbit rate -
and the TCP connection is clean and steady. And it certainly seems that
the machine is encoding at a steady pace and fast enough.

Now the problem I have is that regardless of how large I make the Zaurus
its input buffer; the decoder always seems to run a little fast - and will
generally deplete the input buffer after a minute or so. I.e. it nicely
buffers 200-300k; and the after a minute or so is down to 0 on the input
buffer - and will linger around that point.

Is there any way to prevent this ? Is it normal to expect some PID like
feedback loop to adjust the time/keep the buffer roughly ? Or are there
clever time stamps in the protocol to ensure this - and should I look for
a bug in ogg123 ?

Thanks ?

Dw

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list