Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's just an old HP Proliant home server with a USB sound dongle, and VLC transcoding from ALSA PCM to Opus and serving HTTP. VLC does it all!

My radio has a WiFi interface, but it's weird and unreliable (only supports RTSP, 401s if the requested host isn't its internal IP, crashes after 12 hours, etc). So I just use a short analog audio cable instead.



More technical details in case anyone needs to quickly pipe out some audio to the Internet:

  /usr/bin/vlc -I dummy -vv --no-alsa-stereo alsa://default:CARD=Device -L --sout-keep \
    --sout #transcode{acodec=opus,channels=1,ab=24000,afilter=equalizer}:standard{access=http,mux=ogg,dst=:9999} \
    --equalizer-2pass --equalizer-bands 0 0 0 0 0 0 -20 -20 -20 -20
--no-alsa-stereo because my input source is mono. --sout-keep probably isn't necessary now, but it was when I was streaming from the radio's crashy RTSP service.

The #transcode block sets up a simple pipeline: first transcode to Opus at the specified output bitrate (24 Kbps is plenty for recorded voice), then mux it up and serve it via HTTP. I added a low-pass filter at ~6 KHz because there's some of high frequency noise from either my radio's analog output stage or the cabling. I had to look through the VLC source code[1] to find the preset frequency bands since I couldn't find them in VLC docs.

[1] https://github.com/videolan/vlc/blob/777f36c15564b076bf13af6...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: