Personal tools

Difference between revisions of "Streaming from Rivendell"

From Rivendell Wiki

Jump to: navigation, search
(Install a broadcast server)
(Further Rivendell Streaming Info)
 
(One intermediate revision by the same user not shown)
Line 22: Line 22:
  
 
N.B. - Due to the way that the IceCast server software is designed, PAD update messages must be seen by the server to originate from the same IP address as that being used to originate the associated audio stream. Provided that the audio encoder and Rivendell are accessing Icecast by means of the same NAT'ed firewall, this requirement will generally be met. If not, then PyPAD can often be configured to send PAD via the audio encoder.
 
N.B. - Due to the way that the IceCast server software is designed, PAD update messages must be seen by the server to originate from the same IP address as that being used to originate the associated audio stream. Provided that the audio encoder and Rivendell are accessing Icecast by means of the same NAT'ed firewall, this requirement will generally be met. If not, then PyPAD can often be configured to send PAD via the audio encoder.
 
==Icecast2/Shoutcast Meta Data from Rivendell==
 
 
=== icecast.py ===
 
 
Icecast Stream python meta-data Updater Courtesy WZEW-FM MOBILE AL and Nik Martin - Server Corps
 
 
[http://92zew.net/icecast.py icecast.py]
 
 
 
 
===Updating metadata IceCast2/Shoutcast with Rivendell - RDSTREAMDATA===
 
<font size=1>Portuguese to English translation</font>
 
 
Following these steps can we use the information in "Now & Next" to update the Rivendell icecast2 servers and / or Shoutcast, thereby making the names of the artist and song are running are displayed in the player receiving the stream.
 
 
The Rivendell sends this information via UDP messages, what we do is to capture these messages (using netcat), treat them and apply them to the desired shape Shoutcast/Icecast2 streaming services.
 
 
 
==== Requirements ====
 
 
The procedures shown here were tested at 10.4 32 bit Ubuntu distribution.
 
Make sure your distribution has the following packages installed:
 
 
* Wget (Used to upgrade servers icecast2)
 
* Lynx (Used to upgrade servers Shoutcast)
 
* Nc (netcat, used to capture messages sent by RDAirPlay)
 
 
The commands used in the scripts provided below will work with NC (netcat) openbsd version which is the default for Ubuntu 10.04.
 
If your distribution uses the traditional NC default, see if there is a binary version of openbsd, as Ubuntu, for example, has both versions.
 
In Ubuntu you can check the versions available with the command:
 
 
# Update-alternatives - list nc
 
 
It is not necessary that you change the default version of your system, just set in the following steps to use the version RDStreamData openbsd.
 
 
==== Installation ====
 
 
* Download the package rdstreamdata.tar.gz
 
[Http://www.fdts.com.br/rdstreamdata.tar.gz rdstreamdata.tar.gz]
 
 
* Unzip the package and enter the directory created
 
# Tar-zxvf rdstreamdata.tar.gz
 
# Cd rdstreamdata
 
* As root, run the installation script and read the instructions on screen.
 
#. / Install.sh
 
Will this script install RDstreamdata, a set of scripts That Will listen to an UDP port is Rivendell Now & Next information and update
 
this information to an icecast2 and / or ShoutCast Server.
 
Do you want to do it? y / n.y
 
* Enter "y" and hit Enter
 
Copying files
 
Now You Have to edit / etc / rdstreamdata.conf 'to suit your icecast2, Rivendell and ShoutCast Configurations.
 
 
 
Attemper That You Must Set the username and group Which must run under the process before you start the daemon for the first time.
 
Edit / etc / default / rdstreamdata 'and set' Enable 'to' true ', so You Can start it though the init script
 
 
 
Also you need to Set the script / etc / init.d / rdstreamdata 'to Be automaticaly run in the desired runlevels,
 
systems in Ubuntu You may use "sysv-rc-conf 'command for this.
 
 
 
 
 
You Can contact me at contato@fdts.com.br
 
 
 
Thanks for using
 
 
====General Settings ==== 
 
 
* Now we must set up some items, as described by the installer, start with the'''/ etc / defaults / rdstreamdata''', where we must fulfill what the user under which the processes are executed. You can use either the user that you log into Linux as the user running the other services of Rivendell, I use the username'''rduser''' and''group 'rivendell'''. '''NOT recommend that you use root or another user with higher privileges'''.
 
* Even in'''/ etc / defaults / rdstreamdata''' set the value of'''ENABLE''' to'''true''', otherwise the daemon will not start.
 
* In the file'''/ etc / rdstreamdata.conf''' we have all other settings, we should look to the following:
 
** In the general settings:
 
***'''Netcat_bin = / bin / nc''' - At this point we can define a binary alternative to netcat, remember that we emphasize the importance of early use Netcat version of OpenBSD. As with Ubuntu 4.10 this is already the default, I'm using the default path / bin / nc.
 
***'''Riv_udp_port = "9876"''' - Here we define which port our script will be listening for messages from Rivendell, you should use a port that is not being used by any service above 1024 and ever since we are not running as root. The port is also used here as defined in the configuration of Rivendell.
 
***'''Message = "Name of your radio"''' - The message specified here is used when the RDAirPlay is closed or when the event is in the air that is not configured to send names (jingles, commercials, called , etc.).
 
***'''Min_title_size = 5''' - Minimum size of characters that the event must have for the the standard message set in the previous section is replaced by the name of the event. This is used to filter unwanted events of null characters.
 
 
==== Settings Icecast2==== 
 
* In the file'''/ etc / rdstreamdata.conf'''
 
** These settings define whether or not you use a server Icecast2 and what data to access it.
 
***'''Ic_enable = true''' - If the value is different from'''true''' the server Icecast2 not be updated.
 
***'''Ic_server = "localhost"''' - Hostname or IP of server Icecast2, change as needed.
 
***'''Ic_admin = "admin"''' - User Icecast2 server administrator, change as needed.
 
***'''Ic_pass = "password"''' - User password server administrator Icecast2, change as needed.
 
***'''Ic_port = "8888"''' - Server port Icecast2, change as needed.
 
***'''Ic_mount = "/ radio"''' - Mount point Icecast2 server, change as needed.
 
 
==== Settings Shoucast==== 
 
* In the file'''/ etc / rdstreamdata.conf'''
 
** These settings define whether or not you use a Shoutcast server and what data to access it.
 
***'''Sc_enable = true''' - If the value is different from'''true''' the Shoutcast server will not be updated.
 
***'''Sc_server = "localhost"''' - Hostname or IP of the Shoutcast server, change as needed.
 
***'''Sc_admin = "admin"''' - User Shoutcast server administrator, change as needed.
 
***'''Sc_pass = "password"''' - Password for user administrator Shoutcast server, change as needed.
 
***'''Sc_port = "8080"''' - Shoutcast server port, change as needed.
 
 
==== Configuring Rivendell ====
 
 
This is an essential step for the update to run, since the Rivendell not send the desired information is useless effort.
 
To enable the transmission of information follow the following steps:
 
* Enter rdadmin.
 
[[File: rdstreamdata_01.jpeg]]
 
* Click on'''Manage Hosts'''.
 
[[File: rdstreamdata_02.jpeg]]
 
* Select the Host which runs RDAirPlay and click'''Edit'''.
 
[[File: rdstreamdata_03.jpeg]]
 
* Click'''RDAirPlay'''
 
[[File: rdstreamdata_04.jpeg]]
 
* On the screen that opens click'''Now & Next Set Parameters'''.
 
[[File: rdstreamdata_05.jpeg]]
 
* Fill in the fields as indicated:
 
**'''IP Address''' 127.0.0.1
 
**'''UDP Port:''' 9876 - The same setup informed'''/ etc / rdstreamdata.conf'''.
 
**'''UDP String:'''% a -% t% r - Thus we have a message with the names of the artist and the current song, plus a line break.
 
[[File: rdstreamdata_06.jpeg]]
 
 
 
At this point the RDAirPlay is ready to send UDP messages to update our Streaming, however we must be sure that groups are configured to transmit the event information.
 
 
* Free rdadmin again.
 
[[File: rdstreamdata_01.jpeg]]
 
* Click'''Groups'''.
 
[[File: rdstreamdata_07.jpeg]]
 
* Select a group that wants to transmit information and click'''Edit'''.
 
[[File: rdstreamdata_08.jpeg]]
 
* Check the'''Transmit Now & Next day''' and click OK.
 
[[File: rdstreamdata_09.jpeg]]
 
* Repeat the last steps for all desired groups.
 
 
* Close and reopen the RDAirPlay. Now the Rivendell should already be updating your streaming server!
 
 
Happy Rivendelling!
 
 
You can follow any updates to the log file'''/ var / log / rdstreamdata.log'''
 
 
== Further Rivendell Streaming Info ==
 
You can also see the page [[Stream under Debian]]  for information about streaming under Rivendell but it references darkice and ices-kh(ices2). The first if compiled does not work and the latter is hard to find if you even can.
 
 
Also see [[Rivendell_Loadable_Module_(RLM)_SDK_-_For_Sending_Now_%26_Next_Data_to_external_systems|Rivendell Loadable Modules]] for more info on meta data transfer to external systems
 

Latest revision as of 19:49, 2 July 2023

Using PyPAD to Generate PAD Updates

Beginning with v3.0.1, Rivendell uses a system called 'PyPAD' to generate program associated data ("PAD", sometimes also referred to in the Rivendell docs as "Now & Next") updates in real time. Each time a log event starts or stops in RDAirplay, PyPAD can be configured to call one or more Python scripts, each of which are handed the parameters of the event to be be processed and/or forwarded by the code in the script. An overview of the system can be found in the Program Associated Data chapter in the Rivendell Operations Guide.

While PyPAD is explicitly designed to make it relatively easy for even novice Python coders to create their own custom scripts, Rivendell also ships with a set of pre-installed scripts that can deal with many common update scenarios, including sending updates for:

  • RDS/RDBS displays
  • Online streaming encoders/players
  • Station web sites
  • Associated data displays (such as the Text Display Widget in WallTime

Icecast2 Meta Data from Rivendell

Rivendell ships with a PyPAD script called pypad_icecast2.py that can be used to update the 'Currently playing' display in IceCast v2.x setups. To configure it, proceed as follows:

  1. Start RDAdmin and go to Manage Hosts => <hostname> => PyPAD Instances.
  2. Touch the 'Add' button to open a list of available PyPAD scripts.
  3. Choose pypad_icecast2.py from the list and then touch 'Open'. An 'Edit PyPAD Instance' dialog will open.
  4. Find the 'Password=', 'Hostname=', 'Tcpport=' and 'Mountpoint=' entries in the configuration and change them to the values appropriate for your Icecast server. (The configuration contains other entries that can also be used to customize the behavior of the updating process, such as limiting the ability to send PAD updates to a specific subset of carts on the basis of group membership. See the accompanying comments in the configuration for details).
  5. Touch the 'OK' button.
  6. A new line will appear in the 'PyPAD Instances' dialog. The status light at the start of the line should turn green after a few seconds. If it remains red, select the entry on the list and then touch the 'Error Log' button to see any error messages or warnings generated by the script. Close the dialog, then touch the 'Edit' button and make any needed changes to the configuration. Repeat the process until a green status light is obtained.

N.B. - Due to the way that the IceCast server software is designed, PAD update messages must be seen by the server to originate from the same IP address as that being used to originate the associated audio stream. Provided that the audio encoder and Rivendell are accessing Icecast by means of the same NAT'ed firewall, this requirement will generally be met. If not, then PyPAD can often be configured to send PAD via the audio encoder.