> ... config a small box (I hope to use a Raspberry Pi but will scale up until I >find one with the needed power to serve in this capacity) such that when it >is plugged into a network and amp/speakers somewhere it will connect to an >icecast stream automatically and play it out of the speakers.
I have done this. >It will detect silence in the stream (including the stream going down) and >switch to playing (a playlist of) locally stored files. But haven't done this on a Raspberry pi >It will detect when the stream audio comes back and cut out the local audio >and go back to stream audio. >All headless and automatic. Have done this with our slightly different setup. In our setup we have a PC at a mountain-top transmitter site that runs Windows so it can run a commercial audio processing & FM stereo composite signal generation program, but we also have it receiving an audio stream (using mplayer in a Windows Batch file) from the Internet delivered from the in-town studio. I do have Windows scripts that do all this (plays locally stored audio during stream failure, attempts to connect to a backup studio, plus logs everything for later inspection, etc), so at least I am familiar with the issues. > I am trying to use: >jack >silentjack (to detect the silence) >jack_connect (to change the jack routing on setup and on command from >silentjack) Our main studio uses a GPI input from the silence sensor built into a Broadcast Tools ACS 8.2, but we have a backup Rivendell computer (in another city!) that simply uses silentjack to do things based on what it determines the problem might be. For us it is typically that rdairplay has crashed while trying to pull up the next days log so we simply restart it. Other times it is because a live web stream broadcast got lost. >audio players: >mplayer (or its frontends) >vlc >others? Last time I played with jack on a Raspberry pi, I found it a little bit unstable, but I was trying to do more with it than you are. It seems that you might need to use a "real" (and stable, as in some are much better than others) USB sound device as the master clock for Jack unless you use netjack and lock it to a master on another computer. I think some of the instability is from the lack of a "real time" kernel available for the pi (maybe there is one now, but I think there were some issues with the ARM processor that prevents this). In any case I think you can get it working well enough for your purposes, just expect to need to dial in a few seconds of latency. >Problems I think I need to solve: >A way to "statically name" the main stream player so that I can refer to it >in scripts. >So far, I am not seeing how to do that with mplayer or vlc, the names seem >to be tied to the pid. You can do this with mplayer, but not vlc. I have run mplayer on the pi, but not VLC. We do have VLC receiving a web stream on our studio Rivendell machine, and yes it always has a jack name that includes it's process ID at the end, which is always different. I have a script that reads the process ID once VLC get running so it knows how to connect it in Jack. It is all done in a shell script called by Rivendell. >Is there a better way to go about this? So I like mplayer for this since you can do a static jack name. We are only currently using VLC because with our (somewhat now old, Debian "Squeeze" based) studio system, the mplayer version doesn't support the stream we are trying to get and VLC does. >If it hasn't already been done, I will write this all up when I am done. I'll be happy to share code with you, but since your needs are a little different than mine, it might be better for me to just help you with places where you might be having problems. _______________________________________________ Rivendell-dev mailing list Rivendell-dev@lists.rivendellaudio.org http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev