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 .zip file 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 to .mp4 360p proxy (*) + adjust for fast streaming. |
---|---|
-dat | Extract metadata, waveform and shot-changes to a “.dat” JSON 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 don’t use both together). |
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
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:
{
"drm": {
"host": "https://client.ooonatools.tv",
"apiKey": "A25XxbYOYYGrfV7Ma+giOFEYAjl/5axtZQYMIZhUiaIgw+Jk"
},
"watch": {
"input": "C:\\input",
"output": "C:\\output",
"arguments": "-encode -dat -drm"
}
}
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.
(*) MP4 proxy spec
Video: AVC Baseline@L3, 640x360px, 500kbps, source FPS
Audio: AAC, 64 kbps, stereo, 48 kHz