Package: otio-drp-adapter
OpenTimelineIO drp adapter pluginThis 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 UsageInstallationThe adapter is not included in OTIO, but is published on Pypi as otio-drp-adapter, so either you can clone the repository and runpip install ., or just install it using pip / PyPi (it will install OpenTimelineIO if needed):pip install otio-drp-adpaterUsageIf you have a .drp file from the Blackmagic ATEM ISO, you can useotioconvert -i Video.drp -o Video.kdenliveonce 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 ArgumentsYou can use arguments with otio tools (-a param=value) to modify the adapter's behaviour.main_mix=FalseThis 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=FalseInstead 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 formatNote: 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.MetadataThe 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 themasterTimecodeas the time reference for the frames.videoModeis 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.SwitchesEach 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}]}LicensingThis plugin is licensed under theApache License, Version 2.0TestsThere 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 repopipinstall-e.# Test an adapter for instanceotioconvert-isome_timeline.drp-osome_timeline.extGithub Actions (as from example repository)A set of simple automation scripts are available in the.github/workflowsfolder.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 repossecrets.