Skip to content

Commit 181ec4b

Browse files
Keukhangitbook-bot
authored andcommitted
GITBOOK-528: Added support for selecting a specific track among tracks with the same VariantName during push
1 parent e78a313 commit 181ec4b

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

docs/push-publishing.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,49 +35,70 @@ The RTMP protocol only supports H264 and AAC codecs.
3535

3636
### StreamMap
3737

38-
`<StreamMap>` is used for automatically pushing content based on user-defined conditions. The XML file path should be specified relative to `<ApplicationPath>/conf`.
38+
`<StreamMap>` is used to automatically push content based on user-defined conditions. The XML file path must be specified relative to `<ApplicationPath>/conf`.
3939

40-
`<StreamName>` is used to match output stream names and supports the use of wildcard characters. `<VariantNames>` can be used to select specific tracks. Multiple variants can be specified using commas (','). The `<Protocol>` supports `rtmp`, `mpegts`, and `srt`. You enter the destination address in the `<Url>` and `<StreamKey>` field, where macros can also be used.
40+
`<StreamName>` is used to match output stream names and supports wildcard characters.
41+
42+
`<VariantNames>` can be used to select specific tracks. Multiple variants can be specified by separating them with commas (,). \
43+
If multiple tracks with the same `VariantName` exist in the output stream, a specific track can be selected by appending a `:[Index]` suffix.
44+
45+
`<Protocol>` supports `rtmp`, `mpegts`, and `srt`. The destination address is specified in the `<Url>` and `<StreamKey>` fields, and macros can be used.
4146

4247
<pre class="language-xml"><code class="lang-xml">&#x3C;?xml version="1.0" encoding="UTF-8"?>
4348
&#x3C;PushInfo>
49+
&#x3C;!-- RTMP -->
4450
&#x3C;Push>
4551
&#x3C;!-- [Must] -->
4652
&#x3C;Enable>true&#x3C;/Enable>
53+
4754
&#x3C;!-- [Must] -->
4855
&#x3C;StreamName>stream_a_*&#x3C;/StreamName>
56+
4957
&#x3C;!-- [Optional] -->
5058
&#x3C;VariantNames>video_h264,audio_aac&#x3C;/VariantNames>
59+
&#x3C;!-- Select a specific track among tracks with the same VariantName -->
60+
&#x3C;!-- &#x3C;VariantNames>video_h264:0,audio_aac:1&#x3C;/VariantNames> -->
61+
5162
&#x3C;!-- [Must] -->
5263
&#x3C;Protocol>rtmp&#x3C;/Protocol>
64+
5365
&#x3C;!-- [Must] -->
5466
&#x3C;Url>rtmp://1.2.3.4:1935/app/${SourceStream}&#x3C;/Url>
55-
&#x3C;!-- &#x3C;Url>rtmp://1.2.3.4:1935/app/${Stream}&#x3C;/Url> -->
67+
&#x3C;!-- &#x3C;Url>rtmp://1.2.3.4:1935/app/${<a data-footnote-ref href="#user-content-fn-1">Stream</a>}&#x3C;/Url> -->
68+
5669
&#x3C;!-- [Optional] -->
57-
&#x3C;StreamKey>&#x3C;/StreamKey>
5870
&#x3C;!-- &#x3C;StreamKey>some-stream-key&#x3C;/StreamKey> -->
5971
<strong> &#x3C;/Push>
60-
</strong> &#x3C;Push>
72+
</strong>
73+
&#x3C;!-- SRT -->
74+
&#x3C;Push>
6175
&#x3C;!-- [Must] -->
6276
&#x3C;Enable>true&#x3C;/Enable>
77+
6378
&#x3C;!-- [Must] -->
6479
&#x3C;StreamName>stream_b_*&#x3C;/StreamName>
80+
6581
&#x3C;!-- [Optional] -->
6682
&#x3C;VariantNames>&#x3C;/VariantNames>
83+
6784
&#x3C;!-- [Must] -->
6885
&#x3C;Protocol>srt&#x3C;/Protocol>
86+
6987
&#x3C;!-- [Must] -->
7088
&#x3C;Url>srt://1.2.3.4:9999?streamid=srt%3A%2F%2F1.2.3.4%3A9999%2Fapp%2Fstream&#x3C;/Url>
71-
&#x3C;/Push>
89+
&#x3C;/Push>
90+
91+
&#x3C;!-- MPEG-TS -->
7292
&#x3C;Push>
7393
&#x3C;!-- [Must] -->
7494
&#x3C;Enable>false&#x3C;/Enable>
95+
7596
&#x3C;!-- [Must] -->
7697
&#x3C;StreamName>stream_c_*&#x3C;/StreamName>
77-
&#x3C;!-- [Optional] -->
78-
&#x3C;VariantNames>&#x3C;/VariantNames>
98+
7999
&#x3C;!-- [Must] -->
80100
&#x3C;Protocol>mpegts&#x3C;/Protocol>
101+
81102
&#x3C;!-- [Must] -->
82103
&#x3C;Url>udp://1.2.3.4:2400&#x3C;/Url>
83104
&#x3C;/Push>
@@ -97,3 +118,5 @@ Push can be controlled using the REST API. Please refer to the documentation bel
97118
{% content-ref url="rest-api/v1/virtualhost/application/push.md" %}
98119
[push.md](rest-api/v1/virtualhost/application/push.md)
99120
{% endcontent-ref %}
121+
122+
[^1]:

0 commit comments

Comments
 (0)