DeannaD
DeannaD

Reputation: 1535

Azure Media Indexer - Indexing IAssetFiles

The media indexer (to produce the closed caption files) seems to be setup to index Assets, but our Assets container multiple IAssetFiles, one of which is video that I need to index. I have successfully used this sample code but everything seems geared towards Assets and not AssetFiles. Any tips?

        IAsset asset = getAssetByID(dbAsset.containerId);
        IMediaProcessor indexer = GetLatestMediaProcessorByName(_mediaProcessorName);
        IJob job = _context.Jobs.Create("MediaIndex Job - " + dbAsset.name);
        string configuration = "";
        ITask task = job.Tasks.AddNew("MediaIndex Task", indexer, configuration, TaskOptions.None);

        // Specify the input asset to be indexed.
        task.InputAssets.Add(asset);  <---- need to pass IAssetFile here

Upvotes: 0

Views: 81

Answers (1)

DeannaD
DeannaD

Reputation: 1535

Figured it out. There's a config file you can pass into the task and you can add the filename to the input tag: to specify which of the asset files should be indexed.

Upvotes: 1

Related Questions