View Full Version : ‘Tune in URL’ to run a local program?

2009-04-08, 14:15
Is it feasible to initiate the running of a local program on the SqueezeCenter machine by using the ‘Tune in URL’ feature?

What I’m attempting to do is to create a ‘Favorite’ for each DVB-S radio channel I use by running an executable file of the sort - "C:\Program Files\DVBViewer GE\DVBViewer.exe" -c:3582 – where the –c:3582 bit is the Service ID of the particular channel.

Any suggestions welcome.

2009-04-08, 14:24
Tune in needs an URL. In addition you need to clarify the format of the audio stream and how is it fed into SC.

The URL can be standard one such as http - in which case a http request will be sent out on the network interface.

The URL can be a fake which is then processed by a protocol handler set up by a Plugin. A relatively simple example is my SharkPlay plugin which takes URLs like shark://98.1 to run a program which tunes teh Griifin RadioSHark to 98.1MHz and then starts a program to route the RadioShark WAV stream into SC.

2009-04-09, 03:15
Ah, hadn’t realized they were fake URLs used by a plugin. Naively, I though I might be able to put in something, like a javascript or something, that was recognised as a URL but ran a local file.

Your SharkPlay plugin looks like it contains the sort of think I was looking for, but my aim is simpler.

I just want to ‘call’ the Wave Input function and run the command line as above example to set the channel of the DVB card. I don’t want to set up or control the card from within SC (I can do that with the existing DVB app.) other than the channel Service ID. The hope was that then I would be able to have a favo(u)rites list where each entry was a URL that called up wavin:0 & the command line that changed to a specific channel.

Currently I use the Wave Input as is and have to use non-SC workarounds to change channels, a system I can’t use with my new Duet.

2009-04-09, 03:20
Sharkplay calls a program called RadioShark to to tune in (and light a LED) then it uses wavin2cmd (from WaveINput) to get the audio.

It is very similar to what you need - I think you just need to rip out some of the LED code and the messing with manual tuning.

2009-04-09, 10:36

since you are already using DVB-Viewer it's just a small step from there :)
I recommend you check out DVB-Viewer's 'Recording Service', which is a small application that runs on just about any PC and doesn't need many resources. I have it up and running on the same machine that I am running Squeezecenter on and it serves my needs just perfectly. One of its nicest features is the ability to receive 'http-get commands' to which it answers with the requested DVB-stream. Here's an example: Let's say you have BBC Radio 1 stored on channel number 25 in DVB Viewer's channelist. All you have to do is add a favorite to Squeezecenter's favorite list with the following URL:


Selecting this entry will stream the requested audio to your player. That's it. No plugin required whatsoever and it works flawlessly.

I suggest you check out the DVB Viewer user forum on http://www.dvbviewer.info/forum/index.php?showforum=34 to find out more.



2009-04-10, 10:41
Great, thanks for the tip, Rheinländer, this is just what I was hoping might be about. Earlier, I had played with the Web Interface V1.5, but without success with SC.

I’ve had a first look at Recording Service but I’ve not got it running yet.

Regarding your example; http://serverip:port/upnp/channelstream/25.mp2

Is the server i.p. and port the one defined in the uPNP AV server section of the Configure - Web Options?

Also, may I ask which versions of DVB-Viewer and Recording Service you are using?

Many Thanks


2009-04-10, 12:00

I am running DVB-Viewer 4.0 and recording service
There is no need to configure the upnp server within the recording service, since you don't need it for what you want to do. You just have to enable webstreaming with its default port 7522 and make sure the computer that you are running the service on has port 7522 opened in its firewall.
You might want to check the DVB Viewer forum as mentioned above for further support regarding the service.



2009-04-10, 16:14
I was using DVB-Viewer 4.0 and recording service Updated to - now it’s working!

Thanks for your help,