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";
ParameterDescription
stationNameDetermines which import settings to use and establishes the naming convention in the Nomad Media content bucket.
bucketNameThe source S3 bucket containing the files to import.
objectPrefixLimits the scope of the import to a specific subfolder, directory tree, or even a single file for testing.
videoExtensionThe 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

  1. Scan for .json files. The import scans every file in the S3 bucket that starts with objectPrefix. Only .json files are analyzed — all other files (including video files directly) are skipped.

    Note: For convenience, most .json sidecar files are named identically to the video files they describe. This is not required. What matters is the s3URI field inside the .json file, which points to the actual video. The .json files can live anywhere within the objectPrefix location.

  2. Validate required fields. For each .json file, the import checks for the s3URI and createdDate fields. If either is missing, the file is skipped.

  3. Adjust for timezone. The createdDate in the JSON is in UTC. It is converted to the station's local time.

  4. Determine the Nomad Media path. The adjusted createdDate is combined with stationName, the slug, and videoExtension to construct the target path in Nomad Media. If that file already exists, it is skipped.

  5. Import the video. If the video does not already exist in Nomad Media, it is imported from the s3URI location to the path determined in step 4.

  6. Apply metadata. Once imported, the remaining fields in the .json file are applied as customMetadata for the video.

  7. 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 .json metadata has changed.