Starting v0.6.0 you can run AMCDX Video Patcher without UI, in other words, you can run it as a command-line app. AMCDX Video Patcher accept as a parameter JSON (it could be JSON string or path to JSON file) for example:AMCDXVideoPathcer /Users/test/test.json
orAMCDXVideoPathcer "{ "processor": "f2f", "params": {...}}"
there are 2 fields: “processor” and “params”
a) processor defines what processor do you want to run. The value should be a String and should have one of 3 values:
1) “f2f” – run File To File processor
2) “frame” – run Frame Editor
3) “mov_meta” – run MOV/MP4 Metadata Editor
b) params define processor parameters. The value should be a JSON object each processor has a different structure.
f2f params
{
"src_file": String,
"dst_file": String,
"src_in_frame": Integer,
"dst_in_frame": Integer,
"duration": Integer,
"src_rect": {
"x": Integer,
"y": Integer,
"width": Integer,
"height": Integer
},
"dst_rect": {
"x": Integer,
"y": Integer,
"width": Integer,
"height": Integer
}
}
src_file | path to the source file (String) |
dst_file | path to the target file (String) |
src_in_frame | Source file IN Point (Integer, frame number) |
dst_in_frame | Target file IN Point (Integer, frame number) |
duration | Number of frames to insert from the Source to the Target file (Integer) |
src_rect | A rectangle of the Source file frame that should be inserted to the Target file frame (*), (**) |
dst_rect | Rectangle of Target file frame where should be inserted rectangle from the Source file (*), (**) |
(*) rect fields are optional if these fields are not set – the full-frame will be processed
(**) rect fields work only for ProRes codec, in VC3/AVCI/XAVC case these properties will be ignored
Frame Editor params
{
"video_file": String,
"png_path": String,
"in_point": Integer,
"duration": Integer,
"mode": String,
"rect": {
"x": Integer,
"y": Integer,
"width": Integer,
"height": Integer,
}
}
video_file | path to the source video file (String) |
png_path | path to png file to apply or a folder where to save PNGs (String) |
in_point | Video file IN Point (Integer, frame number) |
duration | Number of frames to modify with PNG image or Number of frames to save to png (Integer) |
mode | Can be one of 2 values “to_png” or “from_png”(String) to_png means we save selected rectangle to PNG files to the folder set by “png_path” from_png means we modify the selected rectangle by PNG files set by “png_path” |
rect | A rectangle of the Video file that should be modified or saved to PNG |
MOV/MP4 Metadata Editor Params
{
"video_file": String,
"headers_to_the_end": Boolean,
"timecode": {
"in_file": Boolean,
"tc": String,
"drop_flag": Boolean,
"reel": {
"in_file": Boolean,
"text": String
},
},
"nclc": {
"in_file": Boolean,
"primaries": Integer,
"transfer": Integer,
"matrix": Integer
},
"gama": {
"in_file": Boolean,
"gamma": Float
}
"pasp": {
"in_file": Boolean,
"h_spacing": Integer,
"v_spacing": Integer
}
"fiel": {
"in_file": Boolean,
"order": Integer
}
"mdcv": {
"in_file": Boolean,
"preset": Integer,
"max_lum": Float,
"min_lum": Float
}
"clli": {
"in_file": Boolean,
"max_cll": Integer,
"max_fall": Integer
}
}
*All fields are optional
*“in_file” is a Boolean field if it set to false it means Atom will be removed and other fields will be ignored. if “in_file” set to true it means we modify existing atom or add and modify newly added atom
headers_to_the_end | Defines if we should move headers to the end of the file or leave it as it (Boolean, Optional) |
timecode | in_file: if set to true Timecode track will be added (Boolean, Optional) tc: timecode in format “hh:mm:ss:frame” (String, Optional) drop_flag: set DF/NDF (Boolean, Optional) reel: { in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) text: Reel name (String, Optional) } |
nclc | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) primaries: Color Primaries (Integer, Optional) transfer: Transfer Function (Integer, Optional) matrix: Color Matrix (Integer, Optional) |
gama | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) gamma: Gamma value (Float, Optional) |
pasp | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) h_spacing: Pixel width (Integer, Optional) v_spacing: Pixel height (Integer, Optional) |
fiel | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) order: Field Order (Integer, Optional) |
mdcv | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) preset: MDCV Presets (Integer, Optional) max_lum: Max display mastering luminance (Float, Optional) min_lum: Min display mastering luminance (Float, Optional) |
clli | in_file: if set to false atom will be deleted otherwise added or edited existing (Boolean, Optional) max_cll: Max content light level (Integer, Optional) max_fall: Max frame average light level (Integer, Optional) |
0 | Unknown |
1 | ITU-R BT.709 |
2 | Unspecified |
3 | Reserved |
4 | ITU-R BT.470M |
5 | ITU-R BT.601 625 |
6 | ITU-R BT.601 525 |
7 | SMPTE 240M |
8 | FILM |
9 | ITU-R BT.2020 |
10 | SMPTE ST 428-1 |
11 | DCI P3 |
12 | P3 D65 |
0 | Unknown |
1 | ITU-R BT.709 |
2 | Unspecified |
3 | Reserved |
4 | Gamma 2.2 |
5 | Gamma 2.8 |
6 | SMPTE 170M |
7 | SMPTE 240M |
8 | Linear |
9 | Logarithmic (100:1 range) |
10 | Logarithmic (316:1 range) |
11 | IEC 61966-2-4 |
12 | ITU-R BT.1361 (Extended Colour Gamut) |
13 | IEC 61966-2-1 |
14 | ITU-R BT.2020 10 bit |
15 | ITU-R BT.2020 12 bit |
16 | SMPTE ST 2084 (PQ) |
17 | SMPTE ST 428-1 |
18 | ARIB STD-B67 (Hybrid Log Gamma) |
0 | Unknown |
1 | ITU-R BT.709 |
2 | Unspecified |
3 | Reserved |
4 | FCC |
5 | BT470BG |
6 | ITU-R BT.601 |
7 | SMPTE 240M |
8 | YCOCG |
9 | ITU-R BT.2020 Non-constant Luminance |
10 | ITU-R BT.2020 Constant Luminance |
0 | Progressive |
1 | Top Field stored first, Top Field displayed first |
2 | Bottom Field stored first, Bottom Field displayed first |
3 | Top Field stored first, Bottom Field displayed first |
4 | Bottom Field stored first, Top Field displayed first |
0 | REC 709 |
1 | REC 601 – 625 |
2 | REC 601 – 525 |
3 | BT 2020 |
4 | DCI P3 |
5 | P3 D65 |
Samples:
File To File
Frame To PNG
Frame From PNG
Mov Metadata (Remove Gama, Edit nclc)
Mov Metadata (Edit Gama)
This is fantastic. Is it possible to change the Frame Metadata in the CLI? That is possible in the UI but I don’t see the ability to do that with the CLI?
hi Steve,
it’s not implemented in 0.6.7 but will be available in the next release
Kind Regards,
Alex
Hello Alex !
Thank you for building and sharing such a great tool !
I was wondering if the CLI interface could be used to READ the metadata from a .mov/mp4 file ?
I am interested in knowing the setting of an existing file’s NCLC and gama tags via a command line.
Thank you again !
hi Roger,
no its not implemented yet
I will add it to the todo list
Kind Regards,
Alex
Hi, would love to use the CLI version to read out to metadata of a ProRes file, is this possible yet in 0.6.7 version please?
no reading metadata is not implemented (it does implemented but I dont output it anywhere)