Stats Injector Manual

NSA Stats Injector User Manual

This document is considered in draft format for review only. Updated 08/03/2017

System Overview

The Stats Injector is a logging/metadata ingest application for converting XML game-play related metadata such as Daktronics or game statistics logging data into video markers for CatDV Pro. The system consists of a linux server (deployed as a virtual machine) that will ingest data as XML (per game) and ingest those records into a database server where CatDV Pro clips can be compared to see if any game play data matches.

An example workflow would be for footage from either a truck feed or even handheld camera footage that was captured separately from any metadata system, but contained accurate time of day time code and a correct shoot date.

In CatDV Pro a user selects a clip and sends it for comparison to the date and time of known games (ingested from the XML data.) If the clip’s date and time match a period of game play, then the “Play” data is imported as event markers.

For example, if a camera shot footage from 3pm to 3:05pm on Sunday Nov 22nd and there were 16 play action items in that 5 minutes of footage they would be sent to CatDV as markers and applied to that clip.

The components of the system are the Linux virtual machine server, mentioned above, and a Python application that is run by a Worker Node action. Additionally, the system requires CatDV Server and a Worker Node.

Admin User Info

This is a private internal web interface, there is no login protection on this web server. Please navigate to the address of your server on port 5001 in any web browser to start.

Start game import

To add a game XML to the system, navigate to the server's web interface.

Click the "Upload Game File" button, as shown below.

Choose game XML file

Navigate to a compatible game XML using the file browser and hit the "Choose" button.

Confirm/Edit game XML data

The system will import the XML data and display the events as a list, by inning.

Check that the metadata fields line up correctly with the template. (Batter is a name, Narrative is game play info, etc.)

If you choose, you may edit the "Game Info" section by typing in the metadata fields or using the up/down arrows to change the start time of the game. This is useful if the camera times or feed data do not match, such as might be the case with data gathered in another time zone or in the case of camera clocks not being adjusted due to travel across time zones.

Hit "Save Game Data" to import the data when you are ready to proceed.

Successful Import message

Click "OK" to return to main page.

No further action is required. You may close the web browser.

Editing Game Info

Users may now use the CatDV automation to look up event marker data from the system. This process is outlined in the "CatDV User Info" chapter.

If you choose, you may also review or edit game data by clicking the edit button under the Actions column.

A game may also be deleted by using the trash can icon in the Actions column.

If no further action is required, you may close the web interface. The server will continue to operate with no user interaction as long as the VM is running.

CatDV User Info

The following section outlines how to lookup game play data for a clip in CatDV Pro or Web Client.

Note: The system assumes that you have imported media with time of day time code that matches an existing game in the server. To confirm that this is the case, log into the server web interface and confirm the start date and time, and duration of the games in the system. If no data is found, the gameplay search will return no results.

Interface Elements

Your system's layout may vary as CatDV may be customized to your liking but the minimum elements for the workflow are:

Gameplay lookup action field - DAKS Action in the example here.

Event Markers field - CatDV built in field.

Job submission

To initiate a lookup, select "Get Markers" from the DAKS Action field.

Publish Changes

Save/Publish the changes to that field in CatDV Pro.

CatDV Worker Node progress (optional)

If you have access to the Worker Node machine, you can watch the action run. In this example the action is called "DAKS-Get_Markers." This, of course, may be different on your system, depending upon your deployment.

Note that the time to retrieve markers is a function of your Worker Node action settings. Square Box recommends no less than a 1 minute poll time on Worker actions.

The actual server lookup typically only takes a few seconds.

Note: If the system takes more than a minute to perform the action, it may have hung. Quit and restart the Worker Node to restart the job.

Markers imported - CatDV Pro

Upon successful location of markers, the markers will appear in the Event Markers field in CatDV Pro or the Web Client.

Note: Remember to refresh your window in CatDV Pro using the F5 function key or "Server" menu "Refresh Window". This pulls updates from the CatDV database that was initiated by the Worker Node and updated by the Stats Injector.

Adjust column widths in Event Markers

If the data is hard to view, you may click and drag the width of the columns in the Event Markers field.

Markers imported - CatDV Web Client

The data may also be viewed in the CatDV Web Client. Here is an example of a clip that has game play info on it.

Troubleshooting

For support please create a ticket for North Shore Automation using the following email address

support@northshoreautomation.com

Sports Logging VM Boot Instructions

VM Reboot Instructions:

cd northshore/sport-logging/vagrant

vagrant up

cd northshore/sport-logging/vagrant

vagrant ssh

sudo service uwsgi restart

exit

System Overview

System Requirements

DAKS XML example

The following image is an example of an XML file delivered to the video team by scoreboard operator as a text document with a .xml extension. It is included for reference only.

file-name.xml

Data Mapping

Baseball Example

Extractable Metadata:

<play ID="47393160" time="19:19:28" seq="1" outs="0" balls="2" strikes="2" batter="Carpenter, Matt" batprof="L" pitcher="LESTER, Jon" pchprof="L" pt="506" st="1" sequence="43">

<narrative ID="47393160" text="Matt Carpenter grounded out to second(4-3)"/>

</play>

<play ID="47393592" time="19:20:28" seq="2" outs="1" balls="1" strikes="0" batter="Heyward, Jason" batprof="L" pitcher="LESTER, Jon" pchprof="L" pt="501" st="1">

<narrative ID="47393592" text="Jason Heyward doubled to deep right"/>

</play>

<play ID="47392728" time="19:22:07" seq="3" outs="1" balls="2" strikes="0" batter="Holliday, Matt" batprof="R" pitcher="LESTER, Jon" pchprof="L" second="Heyward, Jason" pt="500" st="1">

<narrative ID="47392728" text="Matt Holliday singled to right"/></play><play ID="47391648" time="19:22:12" seq="4" outs="1" balls="0" strikes="0" batter="Holliday, Matt" batprof="R" pitcher="LESTER, Jon" pchprof="L" second="Heyward, Jason" pt="101" st="1107">

<narrative ID="47391648" text="Jason Heyward Scored, on the batted ball"/>

</play>

Event Handles

In some cases the logging data entered may not be accurate to the exact second. This is common in sports such as Baseball which may not observe a game clock. In these cases you may choose to set a "handle" value which will allow the system to include events from within the handle value on a clip. In the case where handles are not required or desired, the Handle value may be set to zero (0).

Handle events are placed on the first or last few frames as shown in the drawing below.

In this example, handles are set to 3 seconds. There are 2 events in the handle range (the blue and red values on the timeline.) These two events are placed on the first two frames of the clip. If you view a clip and there are several markers on the first or last frames, know that these events may be handle events and you may need to scan the clip for the actual time of the event.