Macros
Reading time ~7 minutes
An automatic macros substitution feature can be especially useful when, for example, creating multiple files via Cinegy Convert. Automated file naming helps prevent name conflicts and maintain a logical storage structure. This article explains how to use various macros in Cinegy products and where they apply.
Supported Macro Types
The following macro types are supported:
Type | Description |
---|---|
Metadata |
These macros will be translated by the system into corresponding metadata values, taken, for example, from Cinegy Archive or a source file. |
Environment |
These macros will be translated by the system into corresponding Windows OS environment variable values. |
Automatically generated |
These macros will be translated by the system into automatically generated values like time, date, GUID, etc. |
Metadata Macros
The metadata macros allow fetching values from different objects. For example, the following logical groups can be named:
Please see the following sections for additional details on each metadata object source.
Source Macros
The following macros are supported:
Macro | Description |
---|---|
{src.name} |
Translates into the full file name for file sources or the node name for Cinegy Archive sources. |
{src.shortname} |
Translates into the file name without extension for file sources or the node name for Cinegy Archive sources. |
{src.ext} |
Translates into the file extension for file sources or the empty string for Cinegy Archive sources. |
{src.location} |
Translates into the full file path without the file name for file sources or the location in the database for Cinegy Archive sources. |
{src.meta.internal_name} |
Translates into the value of the defined custom metadata field. |
{src.video.aspect.ratio} |
Translates into the video aspect ratio. |
{src.video.format} |
Translates into the video TV format, including frame size, frame rate, and aspect ratio. |
{src.video.frame.rate} |
Translates into the video frame rate. |
{src.video.height} |
Translates into the video height value. |
{src.video.width} |
Translates into the video width value. |
{src.audioX.bits.per.sample} |
Translates into the bits per sample value of the corresponding audio track. |
{src.audioX.channels} |
Translates into the number of channels value, where X is the zero-based index of the corresponding audio track. |
{src.audioX.format} |
Translates into the format of the corresponding audio track. |
{src.audioX.sample.rate} |
Translates into the sample rate value of the corresponding audio track. |
Cinegy PCS Task Macros
The following macros are supported:
Macro | Description |
---|---|
{task.id} |
Translates into the conversion task ID. |
{task.name} |
Translates into the conversion task name. |
{task.priority.value} |
Translates into the conversion task priority as a numeric value. |
{task.priority.name} |
Translates into the conversion task priority name, e.g., High, Medium, Low, etc. |
{task.created} |
Translates into the conversion task creation date and time. |
{task.handled} |
Translates into the conversion task processing start date and time. |
{task.creator.name} |
Translates into the application name that creates the conversion task. |
{task.creator.host} |
Translates into the computer name on which the conversion task is created. |
{task.handler.name} |
Translates into the application name in which the conversion task is processed. |
{task.handler.host} |
Translates into the computer name on which the conversion task is processed. |
Cinegy Archive Job Macros
The following macros are supported:
Macro | Description | ||
---|---|---|---|
{job.id} |
Translates into the Cinegy Archive job node ID. |
||
{job.name} |
Translates into the Cinegy Archive job node name. |
||
{job.creator.name} |
Translates into the name of the user who created the Cinegy Archive job node.
|
||
{job.created} |
Translates into the Cinegy Archive job node creation date and time. |
||
{job.modifier.name} |
Translates into the name of the user who edited the Cinegy Archive job node.
|
||
{job.modified} |
Translates into the Cinegy Archive job node editing date and time. |
||
{job.comment} |
Translates into the Cinegy Archive job node comment. |
||
{job.description} |
Translates into the Cinegy Archive job node description. |
||
{job.error} |
Translates into the Cinegy Archive job node error. |
||
{job.meta.internal_name} |
Translates into the name of the custom metadata field created for the Cinegy Archive job node. |
The example below illustrates a typical scenario for using additional symbols for the {job.creator.name} macro:
-
In the target folder path
C:\Temp
, define the job node creator namejob.creator.name == Munich / user
. -
Define the file name
FileName == "Some Name" {job.creator.name}
.
The output will be the following: The "user.mxf" (mp4, etc.) will be created in the "Some Name Munich" folder. The file can be found in the following location: C:\Temp\ Some Name munich.
The same scenario is typical for the {job.modifier.name} macros.
Cinegy Archive Roll Macros
The following macros are supported:
Macro | Description |
---|---|
{roll.created} |
Translates into the Cinegy Archive roll node creation date and time. |
{roll.creator.name} |
Translates into the name of the user who created the Cinegy Archive roll node. |
{roll.id} |
Translates into the identifier created for the Cinegy Archive roll node. |
{roll.modified} |
Translates into the Cinegy Archive roll node editing date and time. |
{roll.modifier.name} |
Translates into the name of the user who edited the Cinegy Archive roll node. |
{roll.name} |
Translates into the Cinegy Archive roll node name. |
Cinegy Archive Clip Macros
The following macros are supported:
Macro | Description |
---|---|
{clip.created} |
Translates into the Cinegy Archive clip node creation date and time. |
{clip.creator.name} |
Translates into the name of the user who created the Cinegy Archive clip node. |
{clip.id} |
Translates into the identifier created for the Cinegy Archive clip node. |
{clip.modified} |
Translates into the Cinegy Archive clip node editing date and time. |
{clip.modifier.name} |
Translates into the name of the user who edited the Cinegy Archive clip node. |
{clip.name} |
Translates into the Cinegy Archive clip node name. |
Environment Variables
Environment variables used as placeholder for various system paths, folder and file names, are also supported.
The syntax is as follows:
{env.somevariable}
.
For example, the {env.USERPROFILE}
environment variable represents the path to the folder containing user profile settings.
You can use environment variables when defining various paths and folders.
Important
|
For more details on supported environment variables, refer to the MSDN website. |
Automatically Generated Macros
The following macros are supported:
Macro | Description |
---|---|
{uid:format} |
Translates into the UID. The "format" parameter is optional. Refer to the table below for the UID format specifiers. |
{time:format} |
Translates into the time. The "format" parameter is optional. Refer to the table below for the time format specifiers. |
UID Format Specifiers
The following table shows the accepted format specifiers for the UID format parameter:
Specifier | Return value format | Example |
---|---|---|
N |
32 digits |
00000000000000000000000000000000 |
D |
32 digits separated by hyphens |
00000000-0000-0000-0000-000000000000 |
B |
32 digits separated by hyphens, in braces |
{00000000-0000-0000-0000-000000000000} |
P |
32 digits separated by hyphens, in parentheses |
(00000000-0000-0000-0000-000000000000) |
X |
Four hexadecimal values in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces |
{0x00000000,0x0000,0x0000, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} |
Time and Date Format Specifiers
The following table describes the standard date and time format specifiers:
Specifier | Return value format | Example |
---|---|---|
d |
Short date |
4/14/2025 |
D |
Long date |
Monday, April 14, 2025 |
f |
Full date/time (short time) |
Monday, April 14, 2025 3:12 PM |
F |
Full date/time (long time) |
Monday, April 14, 2025 3:12:57 PM |
g |
General date/time (short time) |
4/14/2025 3:12 PM |
G |
General date/time (long time) |
4/14/2025 3:12:57 PM |
M, m |
Month/day |
April 14 |
O, o |
Round-trip date/time |
2025-04-14T15:12:57.0000000-07:00 |
R, r |
RFC1123 |
Mon, 14 Apr 2025 15:12:57 GMT |
s |
Sortable date/time |
2025-04-14T15:12:57 |
t |
Short time |
3:12 PM |
T |
Long time |
3:12:57 PM |
u |
Universal sortable date/time |
2025-04-14 15:12:57Z |
U |
Universal full date/time |
Monday, April 14, 2025 3:12:57 PM |
Y, y |
Year and month |
April, 2025 |
Note
|
Time and date format macros are resolved and displayed according to the regional formatting settings specified for the current OS in the Control Panel (Control Panel → Region → Formats). |
Important
|
All examples are given for the en-US culture. Refer to the MSDN article for details about date and time representations for different cultures. |
The custom date and time format is also supported.
For example, hh:mm:ss tt
will display 03:12:57 PM.
Important
|
For a full list of custom date and time format specifiers, refer to the MSDN article. |