Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

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 a source video file into a streamable container (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 as a portable program.
Please contact our support to receive a link to download the latest version of the Parser.
Unpack the downloaded archive to your desired location (for example to D:\OoonaParser).

Commands

-encode

Down-convert a source video to .mp4 proxy (*) + adjust for fast streaming

-dat

Extract video metadata, audio waveform and shot-change timecodes to a sidecar .dat file

-dash or

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 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 and SMTP settings defined 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)

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

To achieve the same with DRM encryption (requires the appsettings.json and internet access):
OoonaParser.exe -encode -dat -drm FULL_FILE_PATH_HERE.mp4

If you already down-converted the video or have an MP4proxy (*), you don’t need -encode
OoonaParser.exe -dat -drm 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

(OPTIONAL) If you define the “watch” section in your configuration file (appsettings.json) and run the Parser with no arguments – it will search for files it didn’t parse yet in the input directory and run the command defined in the configuration file against this file and output the result to the output directory.

Configuration

(OPTIONAL) At the root directory of the Ooona Parser (where the OoonaParser.exe file is) you can see the appsettings.json file – this file contains the DRM API secret key needed to encrypt your MPEG-DASH streams (supplied by a Toolkit super user – contact us if you don’t have a key) and the watch folder related settings.

 A sample file looks like this:

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 “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, 640x360px, 500kbps, source FPS
Audio: AAC, 64 kbps, stereo, 48 kHz

 

  • No labels