Ingest remote media with their metadata

Modified on Mon, 07 Aug 2023 at 12:30 PM

Change histor:
Initial version     08-23-2022         Initial version
Revision 1         10-18-2022            Updated version (ingest to folder + reschedule)


Case study for :

  • Importing media from third-party storage 
    • AWS S3 
    • Azure Blob storage
    • Others ...
  • Import media & metadata in JSON format

 

 

Limitations :

  • Be an Okast customer 
  • Have an Okast channels instance + credentials
  • One call per owned instance


General usage syntax for _addVideoLink

The call URL is as follows


http://<URL_de_mon_instance>/synthesia/okast-channels/playlist/manager/php/_addVideoLink.php


General parameters

ParameterFormatDescriptionMandatoryUtilisable en méta 
filePathURLHTTPS link to the remote media file (.MP4) to be imported and ingested
YesNo
metadataPathURLHTTPS link to remote metadata file (.JSON) to import and processYesNo
validateBooléen (O/1)

Indicates whether the imported file should be automatically validated (i.e. taken out of the validation lock).

1 : by pass validation

0 : validation step

NoNo
Ingest to destination folder
destinationFolderstringId du dossier cibleNoYes
destinationFolderkindstring

target folder insertion mode

- queueBottom (default): at end of folder

- queueTop: at beginning of folder

- indexed : at a given position (>=0)

NoYes
destinationFolderIndexintergeruseful only if destinationFolderKind=indexed. Indicates the position where to insert (starts at zero)NoYes
destinationFolderIndexReplaceBooléen (O/1)useful only if destinationFolderKind=indexed. Indicates whether to replace the element already at this position in the folder, or to insert it at its position and move it downwardsNoYes
Reschedule a playlist
rescheduledate YYYY-MM-DD

Force planning for target day(s)

1 day: reschedule=2022-10-14 N days: reschedule=2022-10-14;2022-10-15;2022-10-16


In the event of rescheduling, elements that are identical (same files and same start/end timestamps) will not be refreshed.

NoYes



Examples

Simple ingestion: remote file + metadata in JSON format

https://okast.easytools.tv/synthesia/okast-channels/playlist/manager/php/_addVideoLink.php?
filePath=http%3A%2F%2Fmydomain.fr%2Fmedias%2FBigBuckBunny-1080p.mp4
&metadataPath=http%3A%2F%2Fmydomain.fr%2Fmetadata%2FBigBuckBunny-1080p-metadata.json


Advanced ingestion #1: remote file + metadata in JSON format + specified destination folder

https://okast.easytools.tv/synthesia/okast-channels/playlist/manager/php/_addVideoLink.php?
filePath=http%3A%2F%2Fmydomain.fr%2Fmedias%2FBigBuckBunny-1080p.mp4
&metadataPath=http%3A%2F%2Fmydomain.fr%2Fmetadata%2FBigBuckBunny-1080p-metadata.json
&destinationFolder=421adfcc-5b92-356c-9553-609075bf194b
&destinationFolderKind=queueBottom



Advanced ingestion #2: remote file + metadata in JSON format + specified destination folder + playlist refresh for a specified day

https://okast.easytools.tv/synthesia/okast-channels/playlist/manager/php/_addVideoLink.php?
filePath=http%3A%2F%2Fmydomain.fr%2Fmedias%2FBigBuckBunny-1080p.mp4
&metadataPath=http%3A%2F%2Fmydomain.fr%2Fmetadata%2FBigBuckBunny-1080p-metadata.json
&destinationFolder=421adfcc-5b92-356c-9553-609075bf194b
&destinationFolderKind=queueBottom
&reschedule=2022-10-14


JSON metadata structure summary > PDF at end of article. 

Metadata JSON example

{
    "tag":"1997-01193_136_22640187",
    "title":"Media title",
    "subtitle":"Media subtitle",
    "description":"Media description, write here the full description of the media",
    "season":0,
    "episode":136,
    "category":"COMEDY",
    "host":"",
    "hostFunction":"",
    "host2":"",
    "host2Function":"",
    "host3":"",
    "host3Function":"",
    "showName":"Write the Show Name",
    "dateDay":1,
    "dateMonth":1,
    "dateYear":1994,
    "imageLink":"",
    "country":"France",
    "classification":"Tout public",
    "isrc":"",
    "isan":"",
    "plurimedia":"",
    "internal":null,
    "internalRef":"",
    "comments":"Write here comment on yout media",
    "hasOverlay":1,
    "oeCategory":"",
    "keywords":"A0000000",
    "siteUrl":"",
    "qrUrl":"",
    "qrTitle":"",
    "qrDescription":"",
    "qrInvite":"",
    "validityFromDay":9,
    "validityFromMonth":8,
    "validityFromYear":2022,
    "validityFromHour":14,
    "validityFromMinute":26,
    "validityToDay":9,
    "validityToMonth":11,
    "validityToYear":2022,
    "validityToHour":14,
    "validityToMinute":26
}