Differences between revisions 11 and 34 (spanning 23 versions)
Revision 11 as of 2009-10-04 20:59:39
Size: 7515
Editor: fruity
Comment:
Revision 34 as of 2019-08-04 16:20:19
Size: 11651
Editor: asbesto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
<<TableOfContents(5)>>

(!) {OK} {OK} (!)
Line 5: Line 8:
by Asbesto & Fruity - Dyne.org, Freaknet.org, Radiocybernet.org, Poetry Hacklab

TCPC9, Palazzolo Acreide, Oct 4, 2009

== Software to use ==
'''by Asbesto, 27/2/2018 '''

== Liquidsoap streaming for radiocybernet on zaverio.com ==

We installed liquidsoap:

{{{
apt-get install liquidsoap
}}}

The program we use is "stream.liq" in ~/radiocybernet:

{{{
#!/usr/bin/liquidsoap
# Log dir
set("log.file.path","/home/asbesto/radiocybernet/streaming.log")

# local telnet server only, port 1234
set("server.telnet", true)

# Music
myplaylist = playlist("~/radiocybernet/playlist.m3u",reload_mode="watch")

# Some jingles
jingles = playlist("~/radiocybernet/jingles.m3u",reload_mode="watch")

# If something goes wrong, we'll play this
security = single("~/radiocybernet/alfacharlie.mp3")

# Start building the feed with music
radio = myplaylist
# Now add some jingles
radio = random(weights = [1, 4],[jingles, radio])
# And finally the security
radio = fallback(track_sensitive = false, [radio, security])

# Stream it out
output.icecast(%mp3,
  host = "radio.dyne.org", port = 8000,
  password = "bactrim", mount = "rcyb.mp3",
  icy_metadata="true",
  genre = "Live",
  description = "Historical Broadcast live 24/7 - Multilingual - WARNING, can contain STRONG ITALIAN LANGUAGE, MAYBE NSFW ",
  name = "Radio Cybernet - Online since 1997",
  url = "http://www.radiocybernet.org",
  audio_to_stereo(radio))
}}}

Main playlist is there, you also have jingles and the security mp3 if something fail. random weights control jingles.

audio_to_stereo reencode weird mp3 formats on the fly so everything work smooth!

Just add a list of MP3 somewhere, create a playlist, and that's all!

TELNET server (local only) is useful but kinda tricky.

== TODO ==

 * add automatic live insertion to the playlist above
 * ... check random playing (now is random) or sequential playing...

== Tricks ==

Liquidsoap use MP3 id tag as titles etc. - If mp3 doesn't have tags, nothing will be display. So you MUST describe any mp3 in id tags. We used eye3D tool for that - very useful: eye3D -t title mp3.

REALAUDIO FILES to mp3 - must be converted. ffmpeg does this. GOOGLE THAT

TO BE EXPANDED


= OLD CONFIGS HERE - Software used =


by Asbesto & ''Fruity'' - Dyne.org, Freaknet.org, Radiocybernet.org, Poetry Hacklab

'''TCPC9''', '''''Palazzolo Acreide, Oct 4, 2009'''''
Line 13: Line 88:
 * Icecast2  * [[ http://www.icecast.org/ | Icecast2 ]]
Line 17: Line 92:
 * MuSE
 * Darkice
 * [[ http://muse.dyne.org/ | MuSE ]]
 * [[ http://code.google.com/p/darkice/ | Darkice ]]
Line 78: Line 153:
This is the config file for darkice under Linux, to stream on radio.dyne.org:

===== With OSS (OLD :P Open Sound System) =====

Control permissions and existance of /dev/dsp dsp1 dsp2, dependently from how many audio cards you have.
Tri gom or aumix to control the mixer settings.
This is the config file for darkice under Linux, to stream on radio.dyne.org, use darkice as ''darkice -c darkice.cfg'' where darkice.cfg is the configuration file:

===== With OSS (OLD :-? Open Sound System) =====

Control permissions and existance of ''/dev/dsp dsp1 dsp2'', dependently from how many audio cards you have.
Tri ''gom'' or ''aumix'' to control the mixer settings.
Line 130: Line 205:
''' NOTE '''

On ubuntu ( and on debian to be tried ) pulseaudio take over hw:0,0 so your audiocard will be hw:1,0 (blarg...)
There must be a more gently way of killing pulseaudio and clearing this naming issue... to be investigated :)
||||<style="background-color: red;">''' NOTE '''||
||<style="background-color: red;">{i}{X}X-({X}{i}||
||<style="background-color: red;">~-On ubuntu ( and on debian to be tried ) pulseaudio take over hw:0,0 so your audiocard will be hw:1,0 (blarg...). There must be a more gently way of __killing pulseaudio__ and clearing this naming issue... to be investigated :)-~||||
Line 147: Line 221:
device = hw:0,0      # ALSA soundcard device
     #(hw:1,0 in case of the cadaver of pulseaudio in the way)
device = default # hw:0,0 # ALSA soundcard device
                          #(hw:1,0 in case of the cadaver of pulseaudio in the way)
                          # DEFAULT works!
Line 176: Line 252:
[icecast2-1] # Note is icecast2 sezione di configurazione numero 1 [icecast2-1]
# Note is icecast2 sezione di configurazione numero 1
Line 188: Line 265:
Line 201: Line 277:
{{{ '''screenshots coming''' }}} {{attachment:alsamixer-card-fullduplex.png}}

In alsamixer press the [tab] button on your keyboard to go to the input capture view:

{{attachment:alsamixer-capture-volumes-view-1.png}}

Don't put the capture volume at max or you will get poor quality audio, if your terminal supports colors keep it under the red bar :), in amixergui or thing like that keep the capture volume 2/3 of the max volume.

With the arrows you can cross the input channels, put the capture on the -mix- by pressing the space bar and then set the volumes of the outputs ( again [tab] to switch back to the outputs volumes views) as you wish.

If you plan to use a player like mplayer or audacious or xmms remember to set them to use Master as volume and not PCM otherwise with the music you will take down also mikes line-in cd and what-sallamadonna-not , best to set them on software volume control ( -softvol for mplayer )
Line 209: Line 295:
==== ID3 tag, titles etc ====

to do

{{{
  501 apt-cache search id3
  502 apt-get install id3
  503 id3
  504 id3 radiocybernet.mp3
  505 id3 -v radiocybernet.mp3
  506 id3 -l radiocybernet.mp3
  507 eyeD3 radiocybernet.mp3
  508 id3 -l radiocybernet.mp3
  509 id3 radiocybernet.mp3
  510 id3 radiocybernet.mp3
  511 man id3
  512 id3 -l title radiocybernet.mp3
  513 id3 -l radiocybernet.mp3
  514 eyeD3 radio
  515 eyeD3 radiocybernet.mp3
  516 apt-get install soxi
  517 apt-get install sox
  518 soxi
  519 soxi radiocybernet.mp3
  520 apt-get install libsox-fmt-mp3
  521 soxi radiocybernet.mp3
  522 history
}}}

(!) {OK} {OK} (!)

Streaming Radio Howto

by Asbesto, 27/2/2018

Liquidsoap streaming for radiocybernet on zaverio.com

We installed liquidsoap:

apt-get install liquidsoap

The program we use is "stream.liq" in ~/radiocybernet:

# Log dir
set("log.file.path","/home/asbesto/radiocybernet/streaming.log")

# local telnet server only, port 1234
set("server.telnet", true)

# Music
myplaylist = playlist("~/radiocybernet/playlist.m3u",reload_mode="watch")

# Some jingles
jingles = playlist("~/radiocybernet/jingles.m3u",reload_mode="watch")

# If something goes wrong, we'll play this
security = single("~/radiocybernet/alfacharlie.mp3")

# Start building the feed with music
radio = myplaylist
# Now add some jingles
radio = random(weights = [1, 4],[jingles, radio])
# And finally the security
radio = fallback(track_sensitive = false, [radio, security])

# Stream it out
output.icecast(%mp3,
  host = "radio.dyne.org", port = 8000,
  password = "bactrim", mount = "rcyb.mp3",
  icy_metadata="true",
  genre = "Live",
  description = "Historical Broadcast live 24/7 - Multilingual - WARNING, can contain STRONG ITALIAN LANGUAGE, MAYBE NSFW ",
  name = "Radio Cybernet - Online since 1997",
  url = "http://www.radiocybernet.org",
  audio_to_stereo(radio))

Main playlist is there, you also have jingles and the security mp3 if something fail. random weights control jingles.

audio_to_stereo reencode weird mp3 formats on the fly so everything work smooth!

Just add a list of MP3 somewhere, create a playlist, and that's all!

TELNET server (local only) is useful but kinda tricky.

TODO

  • add automatic live insertion to the playlist above
  • ... check random playing (now is random) or sequential playing...

Tricks

Liquidsoap use MP3 id tag as titles etc. - If mp3 doesn't have tags, nothing will be display. So you MUST describe any mp3 in id tags. We used eye3D tool for that - very useful: eye3D -t title mp3.

REALAUDIO FILES to mp3 - must be converted. ffmpeg does this. GOOGLE THAT

TO BE EXPANDED

OLD CONFIGS HERE - Software used

by Asbesto & Fruity - Dyne.org, Freaknet.org, Radiocybernet.org, Poetry Hacklab

TCPC9, Palazzolo Acreide, Oct 4, 2009

Server side:

Client side:

Configurations

Server side

Icecast 2

This is only the mountpoint configuration.

<!-- asbesto, radiocybernet -->

<mount>
        <mount-name>/rcyb.mp3</mount-name>

# NOTE: the INTRO path is relative to the icecast2 web interface!!!
            <intro>radiocybernet/intro.mp3</intro>

            <max-listeners>1000</max-listeners>
            <fallback-mount>/radiocybernet-oldies.mp3</fallback-mount>
            <fallback-override>1</fallback-override>
            <fallback-when-full>1</fallback-when-full>
</mount>
                                
# FALLBACK STREAM: old recordings or ambient sounds: sea, trees, forests...
<mount>
        <mount-name>/radiocybernet-oldies.mp3</mount-name>
        <max-listeners>1000</max-listeners>
        <hidden>0</hidden>
</mount>

Client side

VLC

(to be added)

MuSE

Command line streaming tool "Strimma" by Asbesto

echo "strimma v0.1 (c) 2002 Gabriele Zaverio (asbesto@freaknet.org)"
muse -e mp3 -o -C -b 16 -q 4 -i \
     -f rcyb-`date +%d%b%Y-%H%M%S`.mp3 \
        -s radio.dyne.org:8000 -m rcyb.mp3 -U source -p revolution \
        -n radiocybernet_LIVE_NOW

#        -s indivia.net:8000 -m rcyb -p xxxxxx \
#        -n radiocybernet_HACKIT2005_NAPOLI \
# questo per strimmare su 2 server contemporaneamente analmente hackit03

(work in progress)

Darkice config file

This is the config file for darkice under Linux, to stream on radio.dyne.org, use darkice as darkice -c darkice.cfg where darkice.cfg is the configuration file:

With OSS (OLD :-? Open Sound System)

Control permissions and existance of /dev/dsp dsp1 dsp2, dependently from how many audio cards you have. Tri gom or aumix to control the mixer settings.

# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
device          = /dev/dsp  # OSS DSP soundcard device for the audio input
sampleRate      = 22050     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 1         # channels. 1 = mono, 2 = stereo

# this section describes a streaming connection to an IceCast2 server
# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]
# these can be mixed with [icecast-x] and [shoutcast-x] sections
[icecast2-0]
bitrateMode     = cbr       # avr=average bit rate
format          = mp3 #vorbis    # format of the stream: ogg vorbis
bitrate         = 32        # bitrate of the stream sent to the server
server          = radio.dyne.org
                            # host name of the server
port            = 8000      # port of the IceCast2 server, usually 8000
password        = revolution    # source password to the IceCast2 server
mountPoint      = rcyb.mp3  # mount point of this stream on the IceCast2 server
name            = Radio Cybernet
                            # name of the stream
description     = Test from tcpc9
                            # description of the stream
url             = http://www.radiocybernet.org
                            # URL related to the stream
genre           = live    # genre of the stream
public          = yes       # advertise this stream?
localDumpFile   = rcyb.mp3
fileAddDate     = yes

With ALSA

Control that there is an audio card with aplay -l and always control that you are part of group audio ( or be root )

NOTE

{i}{X}X-({X}{i}

On ubuntu ( and on debian to be tried ) pulseaudio take over hw:0,0 so your audiocard will be hw:1,0 (blarg...). There must be a more gently way of killing pulseaudio and clearing this naming issue... to be investigated :)

# sample DarkIce configuration file, edit for your needs before using
# see the darkice.cfg man page for details

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
device          = default # hw:0,0 # ALSA soundcard device 
                          #(hw:1,0 in case of the cadaver of pulseaudio in the way)
                          # DEFAULT works!

sampleRate      = 22050     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 1         # channels. 1 = mono, 2 = stereo

# mp3
[icecast2-0]
bitrateMode     = cbr       # avr=average bit rate
format          = mp3      # format of the stream: ogg vorbis
bitrate         = 32        # bitrate of the stream sent to the server
server          = radio.dyne.org
                            # host name of the server
port            = 8000      # port of the IceCast2 server, usually 8000
password        = revolution    # source password to the IceCast2 server
mountPoint      = rcyb.mp3  # mount point of this stream on the IceCast2 server
name            = Radio Cybernet
                            # name of the stream
description     = Test from tcpc9

                            # description of the stream
url             = http://www.radiocybernet.org
                            # URL related to the stream
genre           = live    # genre of the stream
public          = yes       # advertise this stream?
localDumpFile   = rcyb.mp3  # backup locally
fileAddDate     = yes       # add date to filename

# ogg
[icecast2-1] 
# Note is icecast2 sezione di configurazione numero 1
bitrateMode     = cbr       # avr=average bit rate
format          = vorbis    # format of the stream: ogg vorbis mp3
bitrate         = 32        # bitrate of the stream sent to the server
server          = radio.dyne.org
                            # host name of the server
port            = 8000      # port of the IceCast2 server, usually 8000
password        = revolution    # source password to the IceCast2 server
mountPoint      = rcyb.ogg  # mount point of this stream on the IceCast2 server
name            = Radio Cybernet
                            # name of the stream
description     = Test from tcpc9
                            # description of the stream
url             = http://www.radiocybernet.org
                            # URL related to the stream
genre           = live    # genre of the stream
public          = yes       # advertise this stream?
localDumpFile   = rcyb.ogg
fileAddDate     = yes

Control the mixer with alsamixer ( alsamixer -c1 in case of pulseaudio cadaver )

alsamixer-card-fullduplex.png

In alsamixer press the [tab] button on your keyboard to go to the input capture view:

alsamixer-capture-volumes-view-1.png

Don't put the capture volume at max or you will get poor quality audio, if your terminal supports colors keep it under the red bar :), in amixergui or thing like that keep the capture volume 2/3 of the max volume.

With the arrows you can cross the input channels, put the capture on the -mix- by pressing the space bar and then set the volumes of the outputs ( again [tab] to switch back to the outputs volumes views) as you wish.

If you plan to use a player like mplayer or audacious or xmms remember to set them to use Master as volume and not PCM otherwise with the music you will take down also mikes line-in cd and what-sallamadonna-not , best to set them on software volume control ( -softvol for mplayer )

Hardware

Microphones

Other stuff

ID3 tag, titles etc

to do

  501  apt-cache search id3
  502  apt-get install id3
  503  id3
  504  id3 radiocybernet.mp3
  505  id3 -v radiocybernet.mp3
  506  id3 -l radiocybernet.mp3
  507  eyeD3 radiocybernet.mp3
  508  id3 -l radiocybernet.mp3
  509  id3  radiocybernet.mp3
  510  id3  radiocybernet.mp3
  511  man id3
  512  id3 -l title radiocybernet.mp3
  513  id3 -l radiocybernet.mp3
  514  eyeD3  radio
  515  eyeD3  radiocybernet.mp3
  516  apt-get install soxi
  517  apt-get install sox
  518  soxi
  519  soxi radiocybernet.mp3
  520  apt-get install libsox-fmt-mp3
  521  soxi radiocybernet.mp3
  522  history

Tip'n tricks

StreamingRadioHowto (last edited 2023-12-08 10:42:02 by asbesto)