hRADIO RAMONA 
RADIO RUELLES

https://hackerspace.be/Radio-ruelle
http://ooooo.be/ramona/
http://ooooo.be/radio-ramona/
http://ooooo.be/ruelles/

 ****** =  verbindingen en francais

ssh pi@localhost -p 12345 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null



SERVER
ssh -P 8022 root@188.210.92.35/

------------------------------------
STREAMING SERVICE
sudo apt-get update
sudo apt-get install icecast2 (install streaming server) http://en.flossmanuals.net/icecast/
------------------------------------
RADIO SERVICE
sudo apt-get install liquidsoap
sudo apt-get install liquidsoap-plugin-all
------------------------------------

LAPTOP/DEVICE/RASPBERRY PI
sudo apt-get install gstreamer-**.**(streaming software) http://gstreamer.freedesktop.org/
#  install (libraries) > good/bad/ugly #  
sudo apt-get install gstreamer-tools gstreamer**.**-plugins-ugly gstreamer**.**-plugins-bad gstreamer**.**-plugins-good  

STREAM AUDIO

GTSTREAMER
external soundcard
server 188.210.92.35
mountpoint ruelles.live
----------------------------
gst-launch-1.0  alsasrc device=plughw:0 ! 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=188.210.92.35 password=**** mount=ruelles.live.ogg streamname="live radio" description="transfeminist"  genre="radio"  port=80

internal soundcard
server 188.210.92.35
mountpoint ruelles.live.ogg
----------------------------
gst-launch-1.0 alsasrc  ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=ruelles.live.ogg port=80 username=source password=jonctions ip=188.210.92.35

internal soundcard
server stream.p-node.org
mountpoint ooooo.ogg
----------------------------
gst-launch-1.0 alsasrc  ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=ooooo.ogg port=80 username=source  password=Antivirus!!! ip=stream.p-node.org

BUTT
----------------------------
internal soundcard
server stream.p-node.org
mountpoint ooooo.ogg

butt  -c ooooo
http://stream.p-node.org/ooooo.ogg
user: source
mountpoint: ooooo.ogg
80
stream.p-node.org
1-Live
p-node.org



VIDEO

gst-launch-0.10 oggmux name=mux ! shout2send ip=188.210.92.35 password=jonctions port=80 mount=variable.ogg alsasrc device="plughw:VF0770" !  audio/x-raw-int,rate=8000,channels=1,depth=8 ! queue ! audioresample ! audioconvert ! queue !  vorbisenc quality=0 !  mux. v4l2src  ! 'video/x-raw-yuv,width=320,height=240,framerate=30/1' ! videorate max-rate=1 !  theoraenc ! mux. 

http://variable.constantvzw.org/define/index.php/PiEye
 

RADIO _ FALLBACK
--------------------------------------------------------------
PREPARE AUDIO FILES FOR LIQUIDSOAP
-------------------------------------------------------------
AUDIO SOFTWARE: 
apt-get install sox
ALL to mp3
for f in *.*; do sox "$f" -t mp3 -r 44100 -c 2 "$/{f%.*}.mp3"; done
mv *.mp3 mp3
----------------------------------------------------------------
-t|--type FILETYPE       File type of audio
-r|--rate RATE                Sample rate of audio
-c|--channels CHANNELS   Number of channels of audio data; e.g. 2 = vi stereo
----------------------------------------------------------------
lltag, pudletag (tagging / title, artist, album)
------------------------
UPLOAD FILES
------------------------
cd mp3
scp -P 8022 -r *.mp3 root@188.210.92.35:/home/ruelles/audio/play/day
------------------------------------------------------------------------------------------------------------------------
CONNECT TO MEDIA SERVER + PREPARE AUDIO FILES FOR PLAYLIST LIQUIDSOAP
------------------------------------------------------------------------------------------------------------------------
ssh -p8022 root@188.210.92.35
fapg --format=pls --output=/home/ruelles/audio/day.pls  /home/ruelles/audio/play/day
service liquidsoap force-reload
------------------------------------------------------------------------------------------------------------------------
COPY ARCHIVE SERVER TO LOCAL
------------------------------------------------------------------------------------------------------------------------
cd Desktop
scp -P 8022 -r root@188.210.92.35:/home/ruelles/archive
------------------------------------------------------------------------------------------------------------------------



LIQUIDSOAP
http://u.delta9.pl/k/liquidsoap/scripts/complete_case.liq
https://github.com/savonet/liquidsoap-daemon

root@bolwerk2:/# cat /etc/liquidsoap/ruelles.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", false) 

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

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

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


live = audio_to_stereo(input.http(timeout=1., buffer=1.,max=30.,"http://localhost:80/ruelles.li
ve.ogg")) 

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


clock   = audio_to_stereo(single("/home/pi/audio/clock.ogg") ) 
#start   = audio_to_stereo(single("/home/pi/audio/live_start.ogg")) 
#stop    = audio_to_stereo_(single("/home/pi/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) 
full = amplify(1.,override="replay_gain",full) 

ruellesUrl="http://ooooo.be/ruelles
ruellesGenre="she is the radio of the streets" 
ruellesDescr="A voice, a tune, interviews, concerts, field recordings, compositions... " 

# Output the full stream in  MP3 

 output.icecast(%mp3,  
   host="localhost",port=80,password="jonctions", 
   mount="radio-ruelles",fallible=true,full,genre=ruellesGenre,  
   description=ruellesDescr, url=ruellesUrl) 


# HOW TO RECORD STREAM 
#output.file( 
#    %mp3, 
#    fallible=true, 
#    reopen_on_metadata=false, 
#    "/home/ruelles/archive/%Y-%m-%d/%Y-%m-%d-%H_%M_%S.mp3", 
#   live  
#) 

# doesn't work (yet) ? 
# output.icecast(%mp3, host="stream.p-node.org",port=80,password="iu5Zsv_c", mount="ooooo.mp3",
fallible=true,full,genre=ruellesGenre, description=ruellesDescr, url=ruellesUrl)


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

fallback_radio     = playlist("/home/pi/fallback/fall.pls")

live = audio_to_stereo(input.http(timeout=1., buffer=1.,max=30.,"http://streamer.radiocampus.be/stream.mp3")) 

# 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"), 
                        fallback_radio,
                        default]) 


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

full = amplify(1.,override="replay_gain",full) 

output.pulseaudio(mksafe(full))


P_NODE LIBRETIME

-------------------------------------------------------------------------------
https://pad.riseup.net/p/ant!v!rus-keep
https://air3.p-node.org
-------------------------------------------------------------------------------
http://air3.p-node.org
http://lists.machineaecrire.com/mailman/listinfo/pdab
https://p-node.org/actions/antivirus#archives
http://lists.machineaecrire.com/cgi-bin/mailman/subscribe/px