[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Any Radio Over Gopher [Bitreich Radio]



Greetings comrades.

In a discussion  about how to implement streaming audio  over gopher at 
bitreich, we came up with a really simple solution.                     

## Raw Commands

On bitreich.org:
% cd gopher/radio
% mkdir play
% cd play
% cat > index.cgi
#!/bin/sh
STREAMURI="http://bitreich.org:3232/live";
curl -s "${STREAMURI}" 2>/dev/null
^D
% chmod +x index.cgi

On my laptop:
% mpv gopher://bitreich.org/9/radio/listen

You can also use vlc or  any ffmpeg-based player from HEAD. Sadly there 
are no  versions tagged  with the  gopher support.  Gopher is so simple,
every device out there should be able to do:

% printf "/radio/listen\r\n" | nc bitreich.org 70 | mpv /dev/stdin

## Summary

In the above example I simply created a »play« dir, where »radio« on
bitreich.org is served over gopher. There some index.cgi file is created,
which simply gets the streaming URI and outputs it to stdout.

When  geomyidae   finds  some   index.gph,  index.cgi,   index.dcgi  or 
index.bin, it will serve them instead of showing a directory listing. 
The  index.cgi will  be  executed and  serve the  stream  from http  to 
gopher.                                                                 

Without much hassle every other media  stream can be served over gopher 
using this  method. Imagine running  ffmpeg in that  script, converting 
rtmp to a simple ogg video stream.                                      

Gopher is fun! :)


Sincerely,

Christoph Lohmann

Please activate Javascript to see the full signature.


Reply to: