Rules
Rules control which streams the output transport stream carries, and on which PIDs. Each rule has a Match expression, which selects streams, and an Action, which defines the action that MediaConnect applies to the selected streams. For each elementary stream that the Program Map Table (PMT) lists, MediaConnect:
-
Checks the rules in order.
-
Applies the action of the first rule that matches, and skips the remaining rules.
-
Applies the Default action if no rule matches.
You write match expressions and actions as short text expressions. In the console, you can also choose common ones from a list. Match expressions and actions are case-sensitive, so write them exactly as shown in the following tables.
Match expressions
| Match expression | Parameter | Selects |
|---|---|---|
|
|
|
The streams of that type, for example |
|
|
A PID |
The stream on that PID, for example |
|
|
A stream type and a position, counting from 0 |
The stream at that position among the streams of that type, in order of PID
number. For example, |
|
|
One or more language codes |
The streams whose language matches one of the codes, for example
|
You can combine match expressions using the logical operators &&
(and), || (or), and ! (not) to create advanced match expressions.
For example, type(audio) && !language(eng) selects the audio streams
that aren't in English. MediaConnect applies ! first, then &&,
and then ||. Use parentheses to group expressions.
Note
Keep the following in mind when you write match expressions:
-
Each match expression can have up to 256 characters and up to 4 levels of nesting.
-
In the MediaConnect console, the Language option accepts three-letter language codes. To match a language value in a different format, choose Custom and enter the value in double quotes.
-
In the MediaConnect console, to define advanced match expressions, choose Custom for Match expression.
Actions
| Action | Parameter | What it does |
|---|---|---|
|
|
None |
Keeps the stream on its input PID. |
|
|
None |
Replaces the stream's packets with null packets. The output bitrate and packet timing stay the same. |
|
|
None |
Removes the stream's packets. The output bitrate goes down, and the packet timing changes. |
|
|
A PID |
Moves the stream to that PID, for example |
|
|
First and last PID |
Moves the matching streams to the PIDs in that range, in order of stream type
(video, audio, and then metadata) and then PID number. For example,
|
|
|
None |
Moves the stream to the next free PID in the auto map range, in the same order
across all streams that use |
Note
If the PID is already in use or the range is full, MediaConnect drops the stream.