Showing posts with label S4M. Show all posts
Showing posts with label S4M. Show all posts

Monday, July 13, 2009

Scheduling events for more than one broadcast date in one playlist

We discovered over the weekend that S4M has the ability to schedule events from 2 consecutive broadcast dates in the same playlist. This resulted in some of Saturday’s schedule being broadcast on Sunday. Obviously, this resulted in an impact to the bottom line and we needed to prevent this from happening again. Our solution was to have me modify the application that converts the S4M H-series formatted playlist to a D-series one so that if more than one dldate node is found in the H-series playlist, to flag the playlist and not translate it for our playout servers.

The bottom line is this: don’t assume S4M will only generate playlists for a single broadcast day.

Monday, May 25, 2009

Dealing with HD (High Definition) content and SD (Standard Definition) Channels

Due to the switchover currently happening in moving all channels to HD, sometimes trafficking systems like S4M may have been told to produce a playlist that contains an event which is HD media on a SD channel. Usually operations will catch this and substitute the HD content with the SD version. If they don’t then the playout server would crash on attempting to play the HD content on the SD channel. Some broadcasters may have a single playout server broadcasting for multiple channels, so crashing a server would essentially bring down all those channels too. Finally, there are usually backup servers which are hooked up as dual support, so the final chain result would bring down the backups also.

How do we prevent this? Well, in the S4M case, it does track whether an event is in HD or SD, but the vanilla install of S4M doesn’t pass this field through to the playlist. So we weighed the cost of asking S4M to make the code change to add the <highdefinition> node to the dlevent node such as:

<dlevent>
...
<highdefinition>1</highdefinition>
</dlevent>

Against the cost of several channels not airing for some downtime. Presented with this tradeoff, the executives went ahead and asked S4M to make the code change.
Now, in my broadcaster’s particular case, S4M does not produce a playlist that our playout servers can understand, since S4M naturally writes in H-series format but our playout servers are DALs, and need D-series playlists. Therefore we decided that the translator I wrote to convert H-series to D-series playlists be modified to identify events that are HD (have a value of 1), and check to see if the channel is HD or not. If there is HD content scheduled for a non-HD channel, then operations will be alerted by adding HD to the column where the dlhnumber normally goes. My broadcaster uses dlhnumber to store the tape number of the content to play out, so since this content won’t be played out, we decided to substitute that value with a flag indicating HD content has been scheduled for a SD channel. Using the event id in the playlist, operational staff can check back to see what content was intended to be played and manually add in the SD version.

Sunday, March 15, 2009

Daylight Savings Time

After the DST time change on March 7, 2009, we discovered that certain events in the playlist generated from S4M were out of chronological order. To compensate for this, I made a change to the playlist translator so when it converted the S4M H-class file to the DAL playout server format, all the events would be sorted in chronological order, from 6AM to 5:59AM the following day (broadcast time).

Sunday, January 18, 2009

Troubleshooting a bug with a WDK customization designed for creating S4M cuesheets

Every piece of TV content has an associated cuesheet indicating at what times different segments, such as commercials, voiceovers or show segments should be broadcast. These cuesheets would be fed into a broadcast trafficking system so the broadcast server would know what content to play at what timecodes.

In my current television broadcasting company, EMC Documentum is used to store the cuesheet information for an episode version by representing episodes as objects in the Documentum repository, and attaching the cuesheet data as attributes of the objects. I wrote a WDK (Documentum’s Web Development Kit) customization that displayed the cuesheet information as a panel available upon clicking the “i” icon of an object. Once the “i” icon was clicked, the customization would do some basic business logic checking to determine if a cuesheet for this episode should be allowed into S4M (some regions were not on Documentum yet so could not take advantage of our cuesheet customizations), and set the value of a true/false flag in the java class behind the JSP page. Then the user would be allowed to make changes to the cuesheet information. Afterwards, when the user wanted to save their changes, they could click on the OK button. This would trigger the onCommitChanges() method, which would check the value of the flag first before continuing. If the flag was set to not print the cuesheet, then the cuesheet file would not have been written to the monitored directory for S4M to import.

Over a weekend, this change was released to production, and seemed to work fine until suddenly cuesheets stopped being written to the monitored directory. After some careful examination of the code, I realized the flag was not being reset upon each view of the cuesheet WDK page. I then set the flag to reset upon every view of the cuesheet page, which resolved the issue.
The lesson learnt from this is that values set to members of the WDK code-behind class would be remembered throughout the life of the WDK session. Therefore class members should be set back to their default values upon every view of the WDK component, by adding initialization calls to the initControls() method.

Thursday, January 15, 2009

S4M bug with reading cuesheets with end credits

TV Broadcasters divide their broadcast time into segments indicated on cuesheets. These cuesheets contain information detailing what content to display at specific times. Each of these information bits contain the type of event to broadcast (show segment or commercial), as well as the timecodes when they start and end. The timecodes are a little different than regular timestamps, as in addition to hours, minutes and seconds, they contain the number of frames, as a second can be divided into 30 frames, and a frame is the smallest unit of time possible for TV broadcasting.

Each broadcast trafficking system has their own cuesheet format; S4M uses XML. However, the information contained in these cuesheets is generally the same, regardless of the type of trafficking system used. Usually this is unimportant as most television broadcasters only use one trafficking system, but what happens when a television station buys another? There is the opportunity to inherit a new trafficking system, and thus the opportunity to share information between the systems to provide visibility to the executives.

So what is the best way to store cuesheet information so it can be imported by different broadcast trafficking systems and be visible to the executives? I recommend storing the data in an ECM (Enterprise Content Management) system and providing customizations to export it in different trafficking systems’ formats.

For my particular scenario, EMC Documentum was chosen because of its rich media features and completeness of ECM features (I’m sure that my being a big fan of Documentum had nothing to do with it.) What we decided was to create a taxonomy in the repository that organized television shows by seasons and episode versions, and store the cuesheet information as metadata of the episode version objects. I’ll blog more on the taxonomy structure in the future; for now, I would like to focus on the cuesheets.

In the S4M cuesheets are 2 node types: SEC and EEC. These timecodes are computed values from the VO Squeeze TC in attribute of the episode version, and they represent the end credits of a show. On Jan 15, 2009 we discovered a bug in S4M that would schedule programs with SEC and EEC timecodes incorrectly. It was placing the end credits as separate segments on the playlist when it should in fact be one segment.

Of course an urgent fix was requested from S4M, but what happens in the meantime? Master Control cannot handle the end credits properly so we needed a workaround immediately before we could generate new playlists. What we decided was to not print out the SEC and EEC timecodes until the fix was provided.

The implementation of the fix was relatively easy. I already made a WDK (Documentum's Web Development Kit) customization in Documentum to print the cuesheets, so I just added a configuration value to the component’s XML configuration file to determine whether to print SEC and EEC timecodes. If the value was present, the timecodes would be printed. Anything else would default to hiding the timecodes.

Therefore in production we currently have the value set to not print the end credits for S4M cuesheets. Once S4M releases a fix, I will release a new configuration file with the value set to print the end credits. Configuration files are insignificant work so the turnaround time will be under 30 minutes.