Just a quick and simply way to stream Ogg Vorbis

/etc/services

oggstream       8000/tcp                # testing ogg streaming over HTTP

(This uses port 8000 for your tests.)

/etc/inetd.conf

(Wrapped for readability, place all on one line.)
oggstream       stream  tcp     nowait.10      nobody
/home/reed/audio/streamogg streamogg

(This allows ten connections within one minute. Be sure to HUP inetd. You could also use tcp wrappers, xinetd or another network services daemon to better control this.)

the script

#!/bin/sh

echo HTTP/1.0 200 Ok^M  # this is carriage return (CTRL-M)
echo Server: streamogg-test^M  # try using CTRL-V followed by CTRL-M

# this shows you can encode WAV on the fly -- it is a little choppy
/usr/pkg/bin/oggenc -Q -b 1 -o - /home/reed/audio/kaas.wav 2>/dev/null

#or send already made Ogg Vorbis data -- sounds great
#cat /home/reed/audio/*ogg

(Make sure path to oggenc is correct; and make sure it is executable by user "nobody".)

test it

/usr/pkg/bin/ogg123 -v http://localhost:8000
(This also works with FreeAmp for Windows -- sometimes it hangs.)

notes

As for multiple connections, it would be better to not encode data multiple times. Please let me know if you try it that way.

Also, if you use with live audio via microphone and encoding it, please let me know how you did it.


Last updated: Thu Apr 4 05:40:49 PST 2002