Newsroom Archive Import
How to import archived videos with metadata from an incoming S3 bucket into Nomad Media using an SQS event trigger.
The newsroom archive import process ingests archived videos and their metadata from an "incoming" S3 bucket into the appropriate content folders in Nomad Media. It is designed for legacy tape archive imports and similar bulk video migration scenarios.
Triggering the Import
The import is kicked off by a direct SQS event message containing the following parameters:
string stationName = "WABC";
string bucketName = "nomad-acme-system-incoming-jj5l71xolbkw";
string objectPrefix = "My Imports/WABC/tapes/";
string videoExtension = ".mxf";| Parameter | Description |
|---|---|
stationName | Determines which import settings to use and establishes the naming convention in the Nomad Media content bucket. |
bucketName | The source S3 bucket containing the files to import. |
objectPrefix | Limits the scope of the import to a specific subfolder, directory tree, or even a single file for testing. |
videoExtension | The file extension to add to video files that lack one (common in legacy tape archives). If the video already has an extension, this value is ignored. |
Import Logic
-
Scan for
.jsonfiles. The import scans every file in the S3 bucket that starts withobjectPrefix. Only.jsonfiles are analyzed — all other files (including video files directly) are skipped.Note: For convenience, most
.jsonsidecar files are named identically to the video files they describe. This is not required. What matters is thes3URIfield inside the.jsonfile, which points to the actual video. The.jsonfiles can live anywhere within theobjectPrefixlocation. -
Validate required fields. For each
.jsonfile, the import checks for thes3URIandcreatedDatefields. If either is missing, the file is skipped. -
Adjust for timezone. The
createdDatein the JSON is in UTC. It is converted to the station's local time. -
Determine the Nomad Media path. The adjusted
createdDateis combined withstationName, the slug, andvideoExtensionto construct the target path in Nomad Media. If that file already exists, it is skipped. -
Import the video. If the video does not already exist in Nomad Media, it is imported from the
s3URIlocation to the path determined in step 4. -
Apply metadata. Once imported, the remaining fields in the
.jsonfile are applied ascustomMetadatafor the video. -
Trigger normal processing. The video enters the standard registration pipeline to create transcoded versions and subtitle files.
Re-Running the Import
The import process is idempotent and can be run multiple times against the same folder without risk of duplication. On subsequent runs:
- Only new videos (those not already present in Nomad Media) are imported.
- Existing videos are skipped, even if their source
.jsonmetadata has changed.
