Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Background

Ooona Parser is a helper application that allows you to manipulate your source video files to make them ready for use inside Ooona’s Online Toolkit.
It can encode transcode a source video file into a streamable container and create a low-resolution, streaming-ready .mp4 file (down-conversion);
extract metadata, audio waveform, and detect shot-changes in the video;
eventually it can package the video into MPEG-DASH container (with an optional encryption of the content to keep it safe from possible theft).

Installation

Currently, we don’t supply the parser as a GUI installation file but The parser has no GUI installation. It's supplied as a portable program.
Please contact our support to receive a link to download the latest version of the Parser.
Unpack the downloaded .zip file archive to your desired location (for example to D:\OoonaParser).

OOONA Parser requires Microsoft Visual C++ 2015 Redistributable Update 3 RC (64 bit)
which can be downloaded here https://www.microsoft.com/en-us/download/details.aspx?id=52685

Commands

-encode

Down-convert

the file

a source video to .mp4

360p

proxy (*) + adjust for fast streaming

-encode watermark

Same as above, plus it will burn a static watermark into the proxy. The image is taken from watermark.png located in the Parser root folder.
(you can replace the default image with your own)

-encode startTC=00:00:00:00+dropmode=ndf

Sending startTC and dropmode (optional) to -encode is relevant when setting encoding.timecode.enabled to true under appsettings.json.
This will set the parameters to burnt-in timecode.

-encode watermark+startTC=01:00:00:00+dropmode=ndf

Combine watermark with burnt-in timecodes parameters. -encode parameters code right after encode with a “-” and joined by a “+” symbol.

-dat

Extract video metadata, audio waveform and shot-

changes

change timecodes to a

sidecar .

dat” JSON

dat file

.

-dash

Package the file into MPEG DASH container (a directory with .mpd xml description and video/audio segments)

-drm

Same as “-dash” but with encryption – use either

of them and

-dash or -drm, but don’t use both together).
Will package the file into MPEG DASH container, encrypted and protected with DRM via OOONA’s proxy server
(it will only be playable using the exact same Toolkit server used to encrypt it).

-s3

Upload the result to an S3 bucket according to the “s3” configuration in the appsettings.json file.

-email

Send an email to a dedicated target address (requires SMTP server settings in the “email” configuration in the appsettings.json file)

-delete

Delete the created files (should only be used after -s3 if you don’t want to keep the parser results).

-deleteSource

Delete the input file after the parser is done.

-remux

Re-wraps video for frame-accurate playback in HTML players (the source should be .mov or .mp4 with h.264 video and aac audio)

-audio

Adding -audio will extract the audio track into a separate file. You can change the target extension and codec under the “extractAudio” settings in appsettings.json. This is a must if you want to be able to run ASR on mpeg-dash with DRM stream because ASR engines won’t be able to decrypt the video and the source might be gone. It’s a general recommendation to use the audio track separately for ASR engines to lower the exposure of your content the 3rd party engines.

Command Line

The command line tool can help you create custom scripts for parsing your video files. Use the Parser as part of an existing video processing pipeline (a custom one or in a 3rd part application).
To run it, open command line and open the containing directory (for this sample we’re assuming “D:\OoonaParser”): 

D:
cd D:\OoonaParser

To to down-convert the source video and package a DASH stream without DRM encryption (you don’t have to have an “.mp4” as source but any ffmpeg supported video):
OoonaParser.exe -encode -dat -dash FULL_FILE_PATH_HERE.mp4

...

If you already down-converted the video or have an MP4proxy (*), and only need to create a sidecar file with audio waveform and shot-changes
OoonaParser.exe -dat FULL_FILE_PATH_HERE.mp4

To package with DRM, upload the results to S3, send an email when done and delete the files:

OoonaParser.exe -encode -dat -drm -s3 -email -delete FULL_FILE_PATH_HERE.mp4

Watch Folder

...

 A sample file looks like this:

 {   "drm": {     "host": "https://clientclientname.ooonatools.tv",     "apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYY"   },   "watch": {     "input": "C:\\input",     "output": "C:\\output",     "arguments": "-encode watermark+startTC=00:00:00:00+dropmode=ndf -dat -audio -drm -s3" }, "s3": { "

  }

}

 accessKeyId": "YYYYYYYYYYYYYYY", "secretAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXX", "bucketName": "BUCKET_NAME", "region": "us-east-1", "targetPrefix": "drm/{year}{MMM}/", "maxSimultaneous": 8, "signedUrlExpirationsDays": 7 }, "encoding": { "useOpus": false, "remuxWithMp4Box": false, "dontEncode": { "extensions": "mp4,mov", "videoCodecs": "h264,avc", "audioCodecs": "aac,opus", "maxBitrate": 1000, "maxVideoHeight": 720 }, "timecode": { "enabled": true, "frames": true, "media": true, "smpte": true,
"fontfile": "/Windows/Fonts/Calibri.ttf" } }, "extractAudio": { "extension": "aac", "command": "-c:a aac" }, "email": { "SMTPServer": "smtp.gmail.com", "SMTPPort": 465, "SMTPUsername": "XXXXXXX@gmail.com", "SMTPPassword": "XXXXXXXXXXX", "from": "no-reply@ooonatools.tv", "ssl": false, "subject": "A new asset is ready for streaming: {name}", "body": "Here are the links:\r\n<br/><br/>\r\n<strong>Video: </strong> {mpd}\r\n<br/><strong>DAT: </strong> {dat}" }, "dat": { "excludeShotchanges": false }, "manifest": "https://ooona-public.s3.amazonaws.com/parser/parser.json", "log": "%target%\\%filename%.log", "extensions": "avi,h264,webm,mov,mp4,m4a,mp3,aac,mpeg,ogg,wav,mpg,wmv,mkv,mxf", "placeOutputNextToOriginalFile": false, "scanSubFolders": true, "threads": 32 }

Here you can see that under "drm" you should define your own Toolkit URL for "host" and the secret API key for "apiKey".

Under "watch" you define which input folder to scan for files when opening the parser (it saves the list of parsed files in the “parsed-files.json” file which you can delete if you want to re-parse all files in the input directory).

Make sure that any path you supply to "input" and "output" won’t contains a single back-slash (“\”) character – it should be replaced with a double back-slash (“\\”) sequence instead.

The "arguments" value has the same behavior as the command lines arguments has – every new file in the input directory will be parsed with those arguments and the result will end up in the output directory.

Under “encode” you can define the encoding parameters, including at which quality to skip encoding and if and how to add burnt-in timecode on the video.

Under “extractAudio” you can set the relevant extension and codec for the “-audio” to generate an audio file.

Under “s3” you can set the AWS credentials and target path to be used when using the “-s3” argument to upload the results to a bucket. You can use any of the following arguments in the "targetPrefix": year (2020), month (08), yy (20), MMM (Aug), MMMM (August), dd (03).

Under “email” are the SMTP settings, target email address and email subject / body templates.

For “log” you can either specify a single path for a log file to be overridden on every job or use the “%target%\\” prefix to write the log to the same directory as the result of the parser. If you simply specify the value “lastrun.log” the file will be saved in the OoonaParser directory and overridden on every job.

...

 (*) MP4 proxy spec

Video: AVC Baseline@L3, 640x360px360p, 500kbps, source FPS
Audio: AAC, 64 kbps, stereo, 48 kHz