OpenTimelineIO drp adapter plugin
This repository aims at storing an adapter for the OpenTimelineIO project allowing to import .drp files from the Blackmagic ATEM Mini ISO. The initial goal is to be able to import them directly in KDEnlive for further editing, but any OTIO adapter can be used, by design.
It works as is, for simple file based sources, and the .drp file generated by the ATEM Mini ISO. Do not expect it to work right away for every use-case, and obviously not for an actual DaVinci Resolve generated file.
Installation and Usage
Installation
The adapter is not included in OTIO, but is published on Pypi as otio-drp-adapter, so either you can clone the repository and run pip install ., or just install it using pip / PyPi (it will install OpenTimelineIO if needed):
pip install otio-drp-adpater
Usage
If you have a .drp file from the Blackmagic ATEM ISO, you can use otioconvert -i Video.drp -o Video.kdenlive once you've installed the adapter. It won't be available for now from KDEnlive menu, as it requires adapters to enable read and write to be listed, and we only implement reading for now.
Adapter Arguments
You can use arguments with otio tools (-a param=value) to modify the adapter's behaviour.
main_mix=False
This adds a Main Mix track with all the clips attached to it. By default all the sources are set on their track, the timeline is the main mix. It may help for further editing to have an explicit track there, this argument enables it. It's built while processing the .drp file, not using the flatten tools in OTIO.
full_tracks=False
Instead of having each source as a track with gaps, this fills each track source with the full length clip. This is mostly useful combined with main_mix=True, to make it possible to re-decide on the source selection, e.g. using the Multicam tool in KDEnlive.
Notes about .drp file format
Note: the .drp format here is the one generated by the BlackMagic ATEM ISO switcher, not DaVinci Resolve, though it may work for such files.
There wasn't an obvious spec for that file, so the adapter is written based on guesses about the file format itself. It seems the file is line-based, with the first line being some metadata, including the sources using JSON. Then each line represent a live switch between sources, using JSON as well.
Metadata
The header looks like this (taken from a simple ISO recording on the Blackmagic ATEM Mini Pro ISO):
{"version":1,"masterTimecode":"20:58:44:03","videoMode":"1080p25","sources":[{"name":"Camera 1","type":"Video","volume":"ATEM","projectPath":"Test 3","file":"Video ISO Files/Test CAM 1.mp4","startTimecode":"20:58:44:03","_index_":1},{"name":"Camera 2","type":"Video","volume":"ATEM","projectPath":"Test 3","file":"Video ISO Files/Test CAM 2.mp4","startTimecode":"20:58:44:03","_index_":2},{"name":"Camera 3","type":"Video","volume":"ATEM","projectPath":"Test 3","file":"Video ISO Files/Test CAM 3.mp4","startTimecode":"20:58:44:03","_index_":3},{"name":"Camera 4","type":"Video","volume":"ATEM","projectPath":"Test 3","file":"Video ISO Files/Test CAM 4.mp4","startTimecode":"20:58:44:03","_index_":4}]}"
We use the masterTimecode as the time reference for the frames. videoMode is used to determine the frame rate of the ISO files. Sources with a file attribute are then used to compute the tracks and media references for each file.
Switches
Each line represents a switch, giving out the timecode, and the source we're switching to
{"masterTimecode":"21:01:19:14","mixEffectBlocks":[{"source":2,"_index_":0}]}
Licensing
This plugin is licensed under the Apache License, Version 2.0
Tests
There is a a basic .drp file in sample_data/ that is parsed during the tests. It can be tried using:
# In the root folder of the repo
pip install -e .
# Test an adapter for instance
otioconvert -i some_timeline.drp -o some_timeline.ext
Github Actions (as from example repository)
A set of simple automation scripts are available in the .github/workflows folder.
ci.yaml- runs unit testscreate_draft_release- when a tag is pushed, it creates a draft for a releasedeploy_package.yaml- simple packing an publishing of a plugin package. Make sure you have a valid token for your PyPi user added to your repos secrets.
Metadata
Release files for otio-drp-adapter 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| otio-drp-adapter-0.2.1.tar.gz | 9.9 kB | Without provenance | Details for otio-drp-adapter-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| otio_drp_adapter-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for otio_drp_adapter-0.2.1-py2.py3-none-any.whl |
Total release size: 21.0 kB
Release files / otio-drp-adapter-0.2.1.tar.gz
| Download URL | otio-drp-adapter-0.2.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
099e1816be6b3369ee16bb8d2d7487e701006d09560eacbf2e268132868346fa
|
|
BLAKE2b-256 checksum How to use checksums |
774095a161e60f77d9c3d155dbdbcef229738bcb487993b6e2d080f1370bd934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / otio_drp_adapter-0.2.1-py2.py3-none-any.whl
| Download URL | otio_drp_adapter-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
610e0b151b8c0827f7fcb5ed406e8246f6c7a7c5a7431cc6c85385bd88ce78b1
|
|
BLAKE2b-256 checksum How to use checksums |
52b29755c6b69a16a151c043b5273b26893fb0ca854e2fc76efaf87b5b5074d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Security for otio-drp-adapter 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.