Radio-ruelle

From Hackerspace Brussels
Jump to: navigation, search
Radio-ruelle
Rec-arch.png
What:
radio ruelle
Tagline:
A live recording and streaming radio device
Maintainer(s):
bolwerK
Archived:



DEVICE

Live-stream-radio-device.jpg


A mobile audio recording and streaming device:


A recording unit with microphone to stream live audio to a streaming server, Run on a battery. When passing through open wifi networks, automatically upload new recorded files to the website. Add them to a playlist and make a shuffle programme.

TUNE IN

Ramona: a character : http://www.ooooo.be/ramona A voice, a tune, interviews, concert,field recordings, compositions... will be audible in the projectspace @ Pianofabriek, on the market days of St-Gillis and amplified when I am biking to Oslo, Bjorvika The audio material will be dealing with strange affairs between bread, migration, astronomy and gossip about old and forgotten communication gadets. In different languages, street level talk. Somethings are pre-recorded, others are recorded with a mobile unit and easily added to a random playlist online. Ruelles: channel in : [[1]]

IDEA/SCENARIO

Fmradio.png

technical rescources

In THF! in Calafou I made some documentation of the different commands read more ... http://pad.constantvzw.org/public_pad/rrrptotocol

HARDWARE AND SOFTWARE

recording:

  • use line-out mic: ZOOM Q3

device:

encoding:

  • compressing with sox: convert all audio formats to mp3 in a folder mp3/
for f in *.*; do sox "$f" -t mp3 -r 44100 -c 2 "mp3/${f%.*}.mp3"; done

streaming:

Explanation + code - PiEye http://variable.constantvzw.org/define/index.php/PiEye http://www.constantvzw.org:8000/variable.ogg

in /etc/rc.local we start this gstreamer pipeline, reconnecting ad infinitum when lost;

 sleep 30
 /home/pi/stream/stream_mp3_usbaudio.sh &


#STREAMING SCRIPT - RUNNING RASBERRY PI, Zoom H4 (or other usb microphone) Rasberian

while [ true ];
do
  sleep 1
  gst-launch-0.10 alsasrc device=plughw:1 ! audioresample ! audioconvert ! audio/x-raw-int,rate=22050,channel=1,depth=8 \
  ! audioresample ! audioconvert ! queue \
  ! lame  ! taginject tags="title=RADIO,artist=LIVE" ! queue \
  ! shout2send ip=79.99.202.57 password=xxx mount=ruelle.live streamname="live radio" description="stream"  genre="radio" 
done

uploading:

  • connect to wifi /3G
  • Wifi dongle
 apt-get install firmware-realtek

/lib/modules/3.6.11+/kernel/drivers/net/wireless

rename existing 8192cu.ko to 8192cu.bak
then softlink the driver we need (realtek driver package)

lrwxrwxrwx  1 root root     19 May  1 11:49 8192cu.ko -> rtl8192cu/8192cu.ko

then we can just load the driver
modprobe 8192cu

(added to /etc/modules )

removed the wired interface from wicd (wicd-curses > preferences > remove the name of wired interface...
/etc/network/interfaces : added a static default ip 172.43.43.43  on eth0:1


  • (TO DO) automatically upload - Rsync
  • stream record > liquidsoap

ONLINE

MEDIA SERVER

 LIQUID SOAP http://savonet.sourceforge.net/doc-svn/index.html
/etc/liquidsoap/ramona.liq

set("log.file.path", argv(2))
set("init.daemon",true)
set("log.stdout",false)
set("log.file",true)
set("init.daemon.pidfile.path", argv(1))

# Lines starting with # are comments, they are ignored.

# Put the log file in some directory where
# you have permission to write.
#set("log.file.path","/tmp/<script>.log")
# Print log messages to the console,
# can also be done by passing the -v option to liquidsoap.
#set("log.stdout", true)
# Use the telnet server for requests
set("server.telnet", true)

# A bunch of files and playlists,
# supposedly all located in the same base dir.

day     = playlist("/home/ramona/audio/day.pls")
night   = playlist("/home/ramona/audio/day.pls")
jingles = playlist("/home/ramona/audio/jingles.pls")

default = audio_to_stereo(single("/home/ramona/audio/default.ogg"))

live = input.http(timeout=14., buffer=15.,max=30.,"http://www.constantvzw.org:8000/ruelle.live")


def on_meta (meta)
    print("ON_META")
    list.iter(fun (i) -> print(fst(i)^": "^snd(i)), meta)
end


clock   = audio_to_stereo(single("/home/ramona/audio/clock.ogg") )
#start   = audio_to_stereo(single("/home/ramona/audio/live_start.ogg"))
#stop    = audio_to_stereo_(single("/home/ramona/audio/live_stop.ogg"))


# Play user requests if there are any,
# otherwise one of our playlists,
# and the default file if anything goes wrong.
radio = fallback([ request.queue(id="request"),
                        switch([({ 6h-22h }, day),
                                ({ 22h-6h }, night)]),
                        default])

# Add the normal jingles
radio = random(weights=[1,4],[ jingles, radio ])
# And the clock jingle
radio = add([radio, switch([({0m0s},clock)])])


# Add the ability to relay live shows
full = fallback(track_sensitive=false, [live, radio])


full= on_metadata(on_meta, full)



# Output the full stream in OGG and MP3
 output.icecast(%mp3,
   host="constantvzw.org",port=8000,password="xxxxx",
   mount="radio-ramona",fallible=true,full)

output.icecast(%vorbis,
  host="constantvzw.org",port=8000,password="xxxxx",
  mount="radio-ramona.ogg",fallible=true,full)

output.file(
    %mp3,
    fallible=true,
    reopen_on_metadata=false,
    "/home/ramona/archive/%Y-%m-%d/%Y-%m-%d-%H_%M_%S.mp3",
   live
)



WEB SERVER

interesting projects

RADIO interruptor http://bureauit.org/radio/#kit

http://www.transmediale.de/de/content/radio-magic

http://www.mlff.org/about/

https://www.youtube.com/watch?v=ADZiPOUfzns

http://wiki.leloop.org/index.php/WebRadio_libre

http://99percentinvisible.org/episode/numbers-stations/

partners

Radio Centraal Webgang http://www.radiocentraal.be