Sound4 – Getting metadata in a stream

There are many different ways of getting data in to a web stream using the Sound4 streamers. In my case, I’m using an x4. It has taken a little while to understand how this method presented works, as the documentation requires a bit more clarity – hence why I’m writing this entry.

Sound4 have numerous automatic XML imports of metadata, and these are great, but there’s times when this won’t work well enough. For this blog, I’m going to be focusing on integration with RCS Zetta.

If you work at a radio station, you’ll know that at times some of the audio files for playout has various metadata that wouldn’t look the best visually for the public.

For example, we have music that sometimes has pronounciation data in it.

As an example, let’s say we have the following information for an artist. As shown, there is pronunciation information listed in the brackets. It’s not something that needs or should be going to the public, therefore, we need to filter that out.

The other problem you would have is with Links (or other audio that isn’t music). Firstly, how do you get them in your metadata feed? Do you amend the XML schema import doc to say that if the audio is over 2 minutes, display the metadata? Yes, that could work, but you still have a bigger problem for these long form pre-recorded programs, as they are often supplied with a title such as YYYYMMDD – Title. This really isn’t very friendly for the public either.

So, how do we fix this? There are multiple ways of tackling this. Firstly, the obvious one is by making sure everything is correct in the first place, but you’re still going to have a myriad of data entering the stream that you probably don’t need or want to have in there.

In my case we need to take a step back at the bigger picture as there are so many more moving parts involved and are much better ways of doing this, but it requires infrastructure.

When I say the bigger picture, I mean, links and other audio that isn’t music. As mentioned, there’s plenty of times where audio just gets dropped in the log without correct metadata that isn’t public friendly – such as IDs, station promos and other long form programs such as pre-recorded interviews and the like. This kind of content with bad titles isn’t really what we want, especially when it could be mix of live, or pre-recorded segments where the metadata is updated ad-hoc.

So, this is where you need a proper filtering system. We’ve done this already with an internal production system, which filters out much of the wrong data and audio types leaving only have a clean feed of what we want to display. It’s done through a method of allowing only specific link categories.

The solution we use is based around Zetta. In short, we push the metdadata via an internal RCS program called Glue, push it to a database which does the filtering, and then we output the data for the public to our website.

Our database program is an internal production manager tool that is web based, and keeps track of all of our production needs, manages program names, program titles, categories and helps us keep track of what is loaded. But, on top of all that, it is the master library of our metadata for our shows. In short, we control only the data that is going to our now playing stream by being able to turn off and on specific Link category information.

I digress, but now to the topic at hand of how do we output this clean metadata to a Sound4 Stream x4?

It’s actually quite easy in the end.

There are multiple options given, but in this use case, we want to use the “Http Request” option, as a “TCP Server”.

For this example to work, you must set the “Mode” to use the “TCP Server”.

After studying the Sound4 metadata script for the “Http Request” method, I discovered that it is a script that appears to be running locally (think as a server) to receive data only.

To make the server capture this data, there are 2 values that need to be sent to the Stream x4. They are simply “artist” and “title”.

Any simple GET request will work, and so in essence, you could just try the following to your device from your browser and it will update:

While that above example isn’t any good for anything practical except testing, the following PHP script will allow you to build further on to what you’ve already started.


$url = "";

$dataArray = array('title'=>'song test', 'artist'=>'artist test');
$ch = curl_init();
$data = http_build_query($dataArray);
$getUrl = $url."?".$data;
curl_setopt($ch, CURLOPT_URL, $getUrl);
curl_setopt($ch, CURLOPT_TIMEOUT, 80);
$response = curl_exec($ch);
	echo 'Request Error:' . curl_error($ch);
	echo $response;


After running the PHP script, you should get a result in your browser like the following:

The Sound4 will then show metadata like the following:

You will also need to match the server and port of your Sound4 Stream x4.

As you can imagine, there is much left out of how to get the metadata from Zetta in to a database to cleanse it and then to where it’s ready to be sent via a GET request to your Sound4 Stream x4 device, but this should at least serve as a good starting point to help make your public facing metadata be much better.

As a side note, the manual for the device is available here, and we are looking at around page 54:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: