Hello,
Finally I decided to follow the stereo_tool solution.
I put here the code snippet, also if you can find it on the web in some
forum.
So:
The concept is using stereo_tool that process the sound and really give
a super sound!
Now I can see that my webradio has a professional audio.
Use stereo_tool command line version, I'm using version 800 because from
812 I have error with c++ libraries. It seems Debian Jessie is too old
for version 814...
You should download a setting preset from the stereotool forum section.
It's really easy and there is a good choice.
Then create 2 files:
mkfifo /tmp/audioin.pcm
mkfifo /tmp/audioout.pcm
There are the files that must be read and write by liquidsoap and
stereotool.
The stereotool side is really easy, you can give a simple:
./stereo_tool_cmd_64_800 /tmp/audioin.pcm /tmp/audioout.pcm -s
./mySettings.sts &
The liquidsoap section instead:
I have a "radio" object that contain all playlists and scheduling
options. So we must generate a wav file that will be read by stereotool,
and then take the output file and stream by icecast. The piece of code
is follow:
output.file(%wav(stereo=true, channels=2, samplesize=16, header=true,
duration=1.),
"/tmp/audioin.pcm",
radio
)
# put all stream in the s object using the dd command
s = mksafe(input.external("dd if=/tmp/audioout.pcm 2>/dev/null"))
#enable icecast streaming passing the S object
output.icecast(%mp3(
samplerate=44100,
stereo=true,
bitrate=128),
mount="/stream",
name="NvRadio",
host="127.0.0.1",
port=8000,
password="CipCipCipCipCipCipCip",
genre="70's, 80's, 90's, easy listening, oldies, top 40/pop",
url="http://www.nvapple.it/",
icy_metadata="true",description = "radio a tema accessibilita' !!",
public=true,s)
Remember, start liquidsoap before, you will hear a silent streaming,
then start stereo_tool and the magic sound will appear.
I think it is useful to check with monit or similar the stereo_tool
process, because if it dies for some reason, you lost the streaming.
So at least it is a good idea to implement a script that notify you by
email, put down liquidsoap and start the emergency streaming of icecast.
On some circumstance you should kill also the "dd" process, but in my
server it was not necessary.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users