9 The Advanced Media Control Protocol (AMCP) is the main communication protocol used to control and query CasparCG Server 2.0.
\r
11 * All communication is presumed to be encoded in UTF-8.
\r
12 * Each command has to be terminated with both a carriage return and a linefeed character. For example:
\r
17 * The whole command string is case insensitive.
\r
18 * Since the parameters in a command is separated by spaces, you need to enclose the parameter with quotation marks if you want it to contain spaces.
\r
20 =======================
\r
21 Backwards Compatibility
\r
22 =======================
\r
24 The AMCP 2.0 protocol implementation is mostly backward compatible with the previous CasparCG 1.7.1 AMCP Protocol and CasparCG 1.8.0 AMCP Protocol. This is achieved by providing default values for parameters used by the AMCP 2.0 protocol.
\r
30 * The ''CLEAR'' command will also clear any visible template graphic in the specified container.
\r
36 Since bare quotation marks are used to keep parameters with spaces in one piece, there has to be another way to indicate a quotation mark in a string. Enter special sequences. They behave as in most programming languages. The escape character is the backslash \ character. In order to get a quotation mark you enter \" in the command.
\r
39 * \\" Quotation mark
\r
43 These sequences apply to all parameters, it doesn\'t matter if it\'s a file name or a long string of xml-data.
\r
45 =====================
\r
46 Command Specification
\r
47 =====================
\r
49 Commands are documented as regular expression with the extension of {} which indicate default values for optional parameters.
\r
58 Loads a producer in the background and prepares it for playout.
\r
59 If no layer is specified the default layer index will be used.
\r
64 (?<video-channel>\d+)
\r
65 (-(?<layer>\d+))?{0}
\r
66 (?<producer>[\d\w]+)
\r
68 (?<transitions>CUT|MIX|PUSH|WIPE|SLIDE)
\r
70 (?<tween>(linear|easein|and-more))?{LINEAR}
\r
71 (?<direction>LEFT|RIGHT)?{RIGHT}
\r
74 (?<parameters>.*)?{}
\r
78 LOADBG 1-1 MY_VIDEO PUSH 20 easeinesine LOOP SEEK 200 LENGTH 400 AUTO FILTER hflip
\r
83 Loads a producer to the foreground and displays the first frame.
\r
84 If no layer is specified the default layer index will be used.
\r
89 (?<video-channel>\d+)
\r
90 (-(?<layer>\d+))?{0}
\r
91 (?<producer>[\d\w]+)
\r
93 (?<transitions>CUT|MIX|PUSH|WIPE|SLIDE)
\r
95 (?<tween>(linear|easein|and-more))?{LINEAR}
\r
96 (?<direction>LEFT|RIGHT)?{RIGHT}
\r
99 (?<parameters>.*)?{}
\r
103 LOAD 1-1 MY_VIDEO PUSH 20 easeinesine LOOP SEEK 200 LENGTH 400 AUTO FILTER hflip
\r
108 Moves producer from background to foreground and starts playing it. If a transition (see LOADBG) is prepared, it will be executed.
\r
109 If additional parameters (see LOADBG) are provided then the provided producer will first be loaded to the background.
\r
110 If no layer is specified the default layer index will be used.
\r
115 (?<video-channel>\d+)
\r
116 (-(?<layer>\d+))?{0}
\r
117 (?<producer>[\d\w]+)
\r
119 (?<transitions>CUT|MIX|PUSH|WIPE|SLIDE)
\r
121 (?<tween>(linear|easein|and-more))?{LINEAR}
\r
122 (?<direction>LEFT|RIGHT)?{RIGHT}
\r
125 (?<parameters>.*)?{}
\r
129 PLAY 1-1 MY_VIDEO PUSH 20 easeinesine LOOP SEEK 200 LENGTH 400 AUTO FILTER hflip
\r
135 Pauses foreground clip.
\r
140 (?<video-channel>\d+)
\r
141 (-(?<layer>\d+))?{0}
\r
150 Removes foreground clip. If no layer is specified the default layer index will be used.
\r
155 (?<video-channel>\d+)
\r
156 (-(?<layer>\d+))?{0}
\r
165 Removes both foreground and background clips. If no layer is specified then all layers in the specified video-channel are cleared.
\r
170 (?<video-channel>\d+)
\r
171 (-(?<layer>\d+))?{0}
\r
180 Calls a producers specific function.
\r
185 (?<video-channel>\d+
\r
186 (-(?<layer>\d+))?{0}
\r
187 (?<function>[\d\w]+)
\r
188 (?<parameters>.*)?{}
\r
197 Swaps layers between channels (both foreground and background will be swapped). If layers are not specified then all layers in respective video-channel will be swapped.
\r
202 (?<video-channel1>\d+)
\r
203 (-(?<layer1>\d+))?
\r
204 (?<video-channel2>\d+)
\r
205 (-(?<layer2>\d+))?
\r
215 Adds consumer to output.
\r
220 (?<video-channel1>\d+)
\r
221 (?<consumer>[\d\w]+)
\r
226 ADD 1 FILE output.mov CODEC DNXHD
\r
227 ADD 1 DECKLINK DEVICE 1
\r
232 Removes consumer from output.
\r
237 (?<video-channel1>\d+)
\r
238 (?<consumer>[\d\w]+)
\r
244 REMOVE 1 DECKLINK DEVICE 1