Marker metadata extraction and conversion tool for Final Cut Pro.
Download the latest release of the CLI universal binary here.
VERSION=0.2.0 # replace this with the git tag of the version you need
git clone https://github.com/TheAcharya/MarkersExtractor.git
cd MarkersExtractor
git checkout "tags/$VERSION"
swift build -c release
Once the build has finished, the markers-extractor-cli
executable will be located at .build/release/
.
$ markers-extractor-cli --help
OVERVIEW: Tool to extract markers from Final Cut Pro FCPXML(D).
https://github.com/TheAcharya/MarkersExtractor
USAGE: markers-extractor-cli [<options>] <fcpxml-path> <output-dir>
ARGUMENTS:
<fcpxml-path> Input FCPXML file / FCPXMLD bundle.
<output-dir> Output directory.
OPTIONS:
--export-format <airtable, midi, notion>
Metadata export format. (default: notion)
--enable-subframes Enable output of timecode subframes.
--image-format <png, jpg, gif>
Marker thumb image format. 'gif' is animated and
additional options can be specified with --gif-fps
and --gif-span. (default: png)
--image-quality <0...100>
Image quality percent for JPG. (default: 85)
--image-width <w> Limit image width keeping aspect ratio.
--image-height <h> Limit image height keeping aspect ratio.
--image-size-percent <1...100>
Limit image size to % keeping aspect ratio. (default
for GIF: 50)
--gif-fps <0.1...60.0> GIF frame rate. (default: 10.0)
--gif-span <sec> GIF capture span around marker. (default: 2.0)
--id-naming-mode <projectTimecode, name, notes>
Marker naming mode. This affects Marker IDs and image
filenames. (default: projectTimecode)
--include-outside-clip-boundaries
Include markers that are outside the bounds of a
clip. Also suppresses related log messages.
--exclude-exclusive-roles <video, audio>
Exclude markers that have specified role type but
only if the opposite role type is absent.
--label <id, name, type, checked, status, notes, position, clipName, clipFilename, clipDuration, videoRole, audioRole, eventName, projectName, libraryName, iconImage, imageFileName>
Label to overlay on thumb images. This argument can
be supplied more than once to apply multiple labels.
--label-copyright <text>
Copyright label. Will be appended after other labels.
--label-font <name> Font for image labels. (default: Menlo-Regular)
--label-font-size <pt> Maximum font size for image labels, font size is
automatically reduced to fit all labels. (default: 30)
--label-opacity <0...100>
Label opacity percent (default: 100)
--label-font-color <#RRGGBB / #RGB>
Label font color (default: #FFF)
--label-stroke-color <#RRGGBB / #RGB>
Label stroke color (default: #000)
--label-stroke-width <w>
Label stroke width, 0 to disable. (default: auto)
--label-align-horizontal <left, center, right>
Horizontal alignment of image labels. (default: left)
--label-align-vertical <top, center, bottom>
Vertical alignment of image labels. (default: top)
--label-hide-names Hide names of image labels.
--create-done-file Create a file in output directory on successful
export. The filename can be customized using
--done-filename.
--done-filename <done.json>
Done file filename. Has no effect unless
--create-done-file flag is also supplied. (default:
done.json)
--folder-format <short, medium, long>
Output folder name format. (default: medium)
--log <log> Log file path.
--log-level <trace, debug, info, notice, warning, error, critical>
Log level. (default: info)
--quiet Disable log.
--no-media Bypass media. No thumbnails will be generated.
--media-search-path <media-search-path>
Media search path. This argument can be supplied more
than once to use multiple paths. (default: same
folder as fcpxml(d))
--version Show the version.
-h, --help Show help information.
After trying to run markers-extractor-cli
for the first time, the process will be blocked by macOS's Gatekeeper, and a system dialog will appear which includes
"markers-extractor-cli" can't be opened because the developer cannot be verified...
markers-extractor-cli
to run, go to System Preferences, Security & Privacy, General, and look in the bottom right corner for a button to click.markers-extractor-cli
, it should run successfully.For ease of use, usage and creation of .sh
files is recommended.
fcpxml(d)
and media files. Make sure your fcpxml(d)
and media file have identical filename. Output is where your Marker Data Set will be generated..sh
.fcpxmld
file.#!/bin/sh
TOOL_PATH="/Users/xxx/Desktop/MarkersExtractor/markers-extractor-cli"
FCPXML_PATH="/Users/xxx/Desktop/MarkersExtractor/Render/zzz.fcpxmld"
OUTPUT_DIR="/Users/xxx/Desktop/MarkersExtractor/Output"
ERROR_LOG="/Users/xxx/Desktop/MarkersExtractor/log.txt"
$TOOL_PATH "$FCPXML_PATH" "$OUTPUT_DIR" --export-format notion --image-format png --create-done-file --log-level debug --log $ERROR_LOG
myscript.sh
within your MarkersExtractor folder.chmod +x /Users/xxx/Desktop/MarkersExtractor/myscript.sh
sh /Users/xxx/Desktop/MarkersExtractor/myscript.sh
.sh
files for different modes and configurations.PNG Mode with Labels
#!/bin/sh
TOOL_PATH="/Users/xxx/Desktop/MarkersExtractor/markers-extractor-cli"
FCPXML_PATH="/Users/xxx/Desktop/MarkersExtractor/Render/zzz.fcpxmld"
OUTPUT_DIR="/Users/xxx/Desktop/MarkersExtractor/Output"
ERROR_LOG="/Users/xxx/Desktop/MarkersExtractor/log.txt"
$TOOL_PATH "$FCPXML_PATH" "$OUTPUT_DIR" --export-format notion --image-format png --label "name" --label "type" --label "notes" --label "position" --label-copyright "Road Runner & Coyote Productions" --label-font Menlo-Regular --label-align-horizontal left --label-font-size 30 --label-font-color E6ffff00 --label-stroke-color 003366 --label-stroke-width 3 --log-level debug --log $ERROR_LOG
GIF Mode with Labels
#!/bin/sh
TOOL_PATH="/Users/xxx/Desktop/MarkersExtractor/markers-extractor-cli"
FCPXML_PATH="/Users/xxx/Desktop/MarkersExtractor/Render/zzz.fcpxmld"
OUTPUT_DIR="/Users/xxx/Desktop/MarkersExtractor/Output"
ERROR_LOG="/Users/xxx/Desktop/MarkersExtractor/log.txt"
$TOOL_PATH "$FCPXML_PATH" "$OUTPUT_DIR" --export-format notion --image-format gif --image-size-percent 50 --create-done-file --label "name" --label "type" --label "notes" --label "position" --label-copyright "Road Runner & Coyote Productions" --label-font Menlo-Regular --label-align-horizontal left --label-font-size 20 --label-font-color ffff00 --label-stroke-color 003366 --label-stroke-width 4 --log-level debug --log $ERROR_LOG
PNG Mode + Name Mode with Labels
#!/bin/sh
TOOL_PATH="/Users/xxx/Desktop/MarkersExtractor/markers-extractor-cli"
FCPXML_PATH="/Users/xxx/Desktop/MarkersExtractor/Render/zzz.fcpxmld"
OUTPUT_DIR="/Users/xxx/Desktop/MarkersExtractor/Output"
ERROR_LOG="/Users/xxx/Desktop/MarkersExtractor/log.txt"
$TOOL_PATH "$FCPXML_PATH" "$OUTPUT_DIR" --export-format notion --image-format png --id-naming-mode name --label "name" --label "type" --label "notes" --label "position" --label-font-color ffff00 --log-level debug --log $ERROR_LOG
To use this package in a SwiftPM project, you need to set it up as a package dependency:
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(
url: "https://github.com/TheAcharya/MarkersExtractor.git",
from: "0.2.0"
)
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "MarkersExtractor", package: "MarkersExtractor")
]
)
]
)
Check out MarkersExtractorCLI.swift to see how to use the main extractor class.
Original Idea and Workflow by Vigneswaran Rajkumar
Maintained by Steffan Andrews (0.2.0 ...)
Initial Work by Vladilen Zhdanov (0.1.0 ... 0.1.1)
Licensed under the MIT license. See LICENSE for details.
For bug reports, feature requests and other suggestions you can create a new issue to discuss.
Code contributions are welcome. See CONTRIBUTING for details before contributing.
link |
Stars: 18 |
Last commit: 4 weeks ago |
--exclude-exclusive-roles <video, audio>
CLI flag (#5)--label-hide-names
CLI flag to hide label names on thumbnail images (#16)--done-filename <filename>
CLI argument to customize done filename (#17)--media-search-path <path>
argument to allow custom media search path(s) (#20)--export-format airtable
) (#21)--export-format midi
) (#23)--enable-subframes
CLI flag to show subframes in all timecode strings (#29)--include-outside-clip-boundaries
CLI flag (#34)--folder-format
CLI flag (#35)--no-media
CLI flag (#40)--id-naming-mode
and --label
CLI arguments now take short-form label IDs (#15)Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics