HTTP audio streaming with virtual_oss ?

Like title says. I tried the following on my FreeBSD machine:

sudo virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 1024 -f /dev/null -H 192.168.137.39 -o 9080 -d dsp

$ cat /dev/sndstat
No devices installed.
Installed devices from userspace:
dsp: <virtual_oss device> (play/rec)

then use mpg123 to play some mp3 file. it does not complain and plays the file to the virtual soundcard. This machine has no soundcard, so without the virtual_oss, mpg123 complains no sound device is found, so that part works I guess.

Then from another machine pointed VLC to 192.168.137.39:9080

no sound whatsoever. If the virtual_oss is not running, VLC complains that it can not connect to 192.168.137.39:9080.

So, it looks like:
- virtual_oss does open the port and allows to be connected to for streaming
- a sound device is created that allows apps to playback sound

however, I hear nothing... I am also not super-sure vlc is playing. It connects but there is no progress bar or anything.
what am I doing wrong ? (also tried -l dsp, no difference)
 
ok so as usual I found the issue after I posted this, keeping here for posterity:
virtual_oss actually presents a little UI on the address and port specified, the stream itself is actually at
http://<host>port/stream.wav

which is given in the playlist
http://<host>port/stream.m3u

second, the command I had to use is
sudo virtual_oss -C 2 -c 2 -r 48000 -b 16 -s 1024 -f /dev/null -H 192.168.137.39 -o 9080 -l dsp

thanks Alan, but actually the URL does not have the stream directly, so your ffplay command would not work afaik ? If it does then how does it present both a UI and the raw stream at the same endpoint ? Either way, it works for me the way I showed above, using VLC.
 
Back
Top