Hi Nicholas,

Rivendell itself doesn't play streaming audio directly, however with
some macro carts and scripting it is possible to do what you're looking
to do.  It isn't any different from cutting away from the log to run
programming off a satellite and then cutting back to the log once the
satellite programming is done.

To cut over to the stream you'll need to create a Rivendell macro cart
that:

-Stops the playout of the log (PS)
-Puts a notification on the RDAirplay screen that you're running off an
alternate source (LB) - this is optional but I highly recommend it
-Runs a shell script which will connect to your stream and direct the
audio to the output (RN)  

As I recall you're running Jack, which makes things easier as you'll
just need to direct your stream output to the Jack output.

To cut back to Live programming, you'll need a Rivendell macro cart
that:

-Runs a shell script which kills your streaming audio (RN)
-Puts a message on RDAirplay that you're back to  programming from
Rivendell (LB)
-Starts up the log again with a start next (PN)

Each macro will probably need a sleep command or two, just to give it a
moment to pause (SP).  For what you'll need and where to put those,
you'll have to do some experimenting.

As for scheduling, there's a few options.  Once the macros work you
could either put them directly in your log, or if the day / time of the
schedule is always exact you could put them into RDCatch.  I kind of
prefer something like this in the log and then anyone looking at
RDAirplay can quickly see what's supposed to happen and when.  However
it is up to you.

Another option for scheduling (and this does present security issues!
Don't do this on the open internet!), if you can get through to port
5858 or 5859 on your Rivendell system then you can send it Cart Execute
commands (EX) from the remote location.  At the start of your live
remote broadcast send it an EX <cart number>! and that'll make it run
the cart that cuts over to the remote broadcast.  At the end of the
broadcast, run the cart relating to the "return to regular programming",
and it'll fire up RDAirplay's log playout again.

The reason this is a security risk and I say do NOT do this on the open
internet, if the port is wide open then anyone can send any RML command
down this pipe and really mess up your system. If you want to have this
capability then add a security layer - set up something like a VPN that
you must log into first or set up a separate machine on the same network
as your Rivendell machine that you can SSH into, then send the command
from the machine you've remotely accessed.  If you just open up the
ports on your Rivendell machine to the internet and someone messes up
your system, don't say I didn't warn you!

As for the shell scripts to either connect to the Icecast stream or
disconnect, those should be pretty simple.  Pick your favourite linux
audio player that can 1) play a stream, 2) be run from a command line,
and 3) send the output to Jack.  Mplayer, liquidsoap, and various others
are commonly used.  Depending on the player you might need to first
connect it to your stream then send it jack_connect commands to connect
its outputs to the audio outputs on your sound card.  For the disconnect
script, all it needs to do is kill the process for the player that
you've picked.

Another thing you might run into is a potential delay in the player
connecting to the audio stream which - if rdairplay has already stopped,
could create some dead air.  One option to overcome this - could be to
run a script to connect to the stream first, and then only stops
RDAirplay's playout and switches over to the stream (with jack_connect)
once it is confirmed that there is audio on the stream.  This adds a
little more complexity, but not too much.  

Since streaming audio can also drop at times, you could also build into
the system a fallback which monitors the streaming audio and resumes
Rivendell playout if the audio should drop unexpectedly.  Again this
adds a little more complexity, but is not impossible to do.

Anyways, I hope that gives you some ideas of where to start.  Your best
approach is to start out simple, and then work up from there.

Lorne Tyndale




> 
> I'm in the process of replacing my current automation system with Rivendell, 
> and I realized that I still have one question unresolved:
> 
> Is it possible to insert a remote stream in Rivendell at a certain time?
> 
> Here's the scenario:
> 
> We'll be doing a remote broadcast. From the remote location, we will generate 
> a new Icecast stream, and uplink it to our central Icecast server. Meanwhile, 
> back at our HQ, Rivendell is rocking along playing tunes on full automation. 
> If everything works according to plan, Rivendell will grab the new Icecast 
> stream and insert it into the queue and play it as a source for the duration 
> of our show, then return to normal business, playing out music tracks. 
> 
> Is this possible?
> 
> Thanks for your patience and expertise. I know I've had a lot of posts here, 
> and you all have been very gracious and helpful. 
> 
> Nicholas
> _______________________________________________
> Rivendell-dev mailing list
> [email protected]
> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

Reply via email to