Working with Media using Local Files

Chameleon makes all media available as a url which is useful for many platforms. But, some platforms only support local files on the windows file system which requires a way to easily push media files to a local path. This isn’t a problem for players but for integration through BLADE.

Starting in Flow 12.7.5.1, BLADE provides a parameter to output a local path for a file. To make it easier, the BLADE page in Flow provides setting the parameter:

This parameter tells BLADE to add an additional field to all media data (for all formats). Here’s an example using json:

BLADE creates a filename based on the media’s unique id on the instance of Chameleon. Above, that id is 797680 creating a filename using the local file path and the filename.

To move files, Flow supports selecting a container and downloading all the media files locally. This is done in the Export tab of the Media data type:

Each container of all data types is available to download media files including topics (election event, scores league, story topic,…) and playlists.

Not only can all the media be downloaded immediately but it can also be downloaded on a timer for data that is dynamic like twitter or stories coming from an RSS feed.

To download the media of a container, choose the container from the combobox and click Add:

After that, give it a name which helps distinguish it for Media Runner (more on that later) and decide if it’s a onetime download or whether it’ll be downloaded on a timer:

Once added, it provide a download button for the export:

The download from Flow gives you a zip file. You can move the files from the zip to your destination.

It also provides the url which is used to pull data from BLADE. Note: by default, the url uses json format but you can change that to xml (or other supported formats depending on the data type) by modifying the url. For example, this url:

http://localhost/chameleon/blade/score/league/86/?format=json&localpath=d%3A\media runner

can be modified to use xml by changing “format=json” to “format=xml”:

http://localhost/chameleon/blade/score/league/86/?format=xml&localpath=d%3A\media runner

The update frequency only pertains to exports of dynamic data; data that can change like tweets. Select Enabled for this type of data and use an update frequency that matches the data.

For dynamic data that is to be downloaded on a regular basis, an application called Media Runner is available. Media Runner is a Windows application which reads all exports that are enabled:

 

For each export, Media Runner shows the frequency of downloads in minutes and when the next read will take place. Only exports that are enabled will download media and the downloads happen to the local directory defined in the export in Flow.

For performance reasons, Media Runner only downloads media that doesn’t exist locally and uses a unique filename corresponding to what is used in BLADE.

If an export needs to be done immediately, select the exports in the grid and click on the Export Select Items Now button.