|
| 1 | +--- |
| 2 | +id: srt_ingest |
| 3 | +title: nanoStream Cloud SRT Ingest Guide |
| 4 | +sidebar_label: SRT Ingest |
| 5 | +--- |
| 6 | + |
| 7 | +# **Introduction** |
| 8 | + |
| 9 | +Thank you for your interest in SRT (Secure Reliable Transport) streaming on nanoStream cloud. We are glad that you can start using this new feature. |
| 10 | + |
| 11 | +> ## **Feedback** |
| 12 | +> We welcome any feedback that can help us improve the service. Send an email to [support@nanocosmos.de](mailto:support@nanocosmos.de) with subject **SRT feedback program** and do share with us the following information: |
| 13 | +> - Encoding or streaming software being used and hardware equipment setup. |
| 14 | +> - Video and audio encoding, or streaming parameters being used. For example: format, resolution, bit-rate, and so on. |
| 15 | +> - Full test results with description of expected outcomes and issues encountered. |
| 16 | +> - All issues reported must contain a time frame in UTC and relevant stream names. |
| 17 | +
|
| 18 | + |
| 19 | +# **SRT Setup Guide** |
| 20 | + |
| 21 | +The SRT setup will require creating a new stream or making use of an existing stream in your organization account for publishing and viewing. In this workflow, SRT streaming protocol will be used for ingest while playing back with H5Live player or RTMP protocol. *SRT playback* is not supported at the moment. |
| 22 | + |
| 23 | +## **Ingest** |
| 24 | + |
| 25 | +### Supported Formats and Codecs |
| 26 | + |
| 27 | +| | | |
| 28 | +|-------------------|--------------------------------------------------------| |
| 29 | +| **Stream format** | MPEG-TS | |
| 30 | +| **Track count** | Single channel of video and/or single channel of audio | |
| 31 | +| **Video codec** | H.264 | |
| 32 | +| **Audio codec** | AAC | |
| 33 | + |
| 34 | +### Server Domains and Port |
| 35 | + |
| 36 | +| Global domain (preferred) | bintu-srt.nanocosmos.de | |
| 37 | +|---------------------------|----------------------------| |
| 38 | +| **Europe domain** | bintu-srt-eu.nanocosmos.de | |
| 39 | +| **North America domain** | bintu-srt-us.nanocosmos.de | |
| 40 | +| **South America domain** | bintu-srt-sa.nanocosmos.de | |
| 41 | +| **Port number** | 5000 | |
| 42 | + |
| 43 | +### SRT Stream Id |
| 44 | + |
| 45 | +SRT stream id format definition: `prefix:streamname[:postfix]` |
| 46 | +- prefix: `push` for ingest or publish action |
| 47 | +- streamname: existing Bintu stream name in the form `XXXXX-YYYYY` |
| 48 | +- suffix: `record` to enable VOD recording of a live stream (optional) |
| 49 | + |
| 50 | +**Stream Id limitations** |
| 51 | + |
| 52 | + - The SRT protocol specification limits the Stream Id length to 512 characters. |
| 53 | + - Allowed character set in SRT Stream Ids: `a-z`,`A-Z`,`0-9`,`?`,`&`,`=`,`-`,`_`,`,` plus delimiter `:`. |
| 54 | + - Colon delimiter `:` is permited on the stream id, **not** on stream name **nor** stream name parameters. |
| 55 | + - Percent sign `%` is only allowed in the context of URL encoding. |
| 56 | + |
| 57 | +**Stream Id examples** |
| 58 | + |
| 59 | +Replace `XXXXX-YYYYY` with an existing Bintu stream name. |
| 60 | + |
| 61 | +Basic push: \ |
| 62 | +`push:XXXXX-YYYYY` |
| 63 | + |
| 64 | +Push with vod recording: \ |
| 65 | +`push:XXXXX-YYYYY:record` |
| 66 | + |
| 67 | +Push with stream name parameters: \ |
| 68 | +`push:XXXXX-YYYYY?param1=one¶m2=two` |
| 69 | + |
| 70 | +Push with stream name parameters and VOD recording: \ |
| 71 | +`push:XXXXX-YYYYY?param1=one¶m2=two:record` |
| 72 | + |
| 73 | +> **Note:** |
| 74 | +> Some streaming applications where the SRT stream id needs to be configured as part of a URL, |
| 75 | +> for example _OBS Studio_, may require the stream name parameters to use URL encoding. |
| 76 | +> The URL encoding can be applied to the entire Stream Id or stream name parameters only. |
| 77 | +> The URL encoded parts will be decoded accordingly on the server side.<br> |
| 78 | +> See the following examples: |
| 79 | +
|
| 80 | +Push with URL encoded stream id: <br> |
| 81 | +`push%3AXXXXX-YYYYY%3Fparam1%3Done%26param2%3Dtwo` |
| 82 | + |
| 83 | +Push with URL encoded stream name parameters: <br> |
| 84 | +`push:XXXXX-YYYYY%3Fparam1%3Done%26param2%3Dtwo` |
| 85 | + |
| 86 | +Push with URL encoded stream name parameters and VOD recording:<br> |
| 87 | +`push:XXXXX-YYYYY%3Fparam1%3Done%26param2%3Dtwo:record` |
| 88 | + |
| 89 | +### Ingest Parameters |
| 90 | + |
| 91 | +| | | |
| 92 | +|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| |
| 93 | +| **SRT mode** | caller | |
| 94 | +| **SRT transmission type** | live | |
| 95 | +| **SRT latency** | Default is **500ms**. Higher values can be used to maintain more buffer and will help to reduce packet drop in lossy transmission situations. | |
| 96 | +| **SRT timeout** | Recommended is **1 second**. Higher values can solve connect issues in case of longer routing distances or high round trip times (RTT). | |
| 97 | +| **SRT stream id** | See [Above](#srt-stream-id). | |
| 98 | + |
| 99 | +### Example of Setup using OBS Studio |
| 100 | + |
| 101 | +OBS Studio is able to support SRT streaming in versions 25.0 or newer and has the flexibility of fine tuning capabilities. |
| 102 | +You can refer more here: [SRT Protocol Streaming Guide](https://obsproject.com/de/kb/srt-protocol-streaming-guide#stream-with-srt. "OBS SRT Protocol Streaming Guide") |
| 103 | + |
| 104 | +> **Note:**<br> |
| 105 | +> OBS expects timeout and latency values in microseconds, that is, seconds ⨉ 1000000. |
| 106 | +
|
| 107 | +### Ingest Address |
| 108 | +#### **Global Ingest Domain (Recommended)** |
| 109 | + |
| 110 | +Setup server with: |
| 111 | +```http |
| 112 | +srt://bintu-srt.nanocosmos.de:5000?mode=caller&latency=500000&timeout=1000000&transtype=live&streamid=push:XXXXX-YYYYY |
| 113 | +``` |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +#### **For Europe Domain** |
| 118 | + |
| 119 | +Setup server with: |
| 120 | +```http |
| 121 | +srt://bintu-srt-eu.nanocosmos.de:5000?mode=caller&latency=500000&timeout=1000000&transtype=live&streamid=push:XXXXX-YYYYY |
| 122 | +``` |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +#### **For North America Domain** |
| 127 | + |
| 128 | +Setup server with: |
| 129 | +```http |
| 130 | +srt://bintu-srt-us.nanocosmos.de:5000?mode=caller&latency=500000&timeout=1000000&transtype=live&streamid=push:XXXXX-YYYYY |
| 131 | +``` |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | +#### **For South America Domain** |
| 136 | + |
| 137 | +Setup server with: |
| 138 | +```http |
| 139 | +srt://bintu-srt-sa.nanocosmos.de:5000?mode=caller&latency=500000&timeout=1000000&transtype=live&streamid=push:XXXXX-YYYYY |
| 140 | +``` |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | +Whereby `XXXXX-YYYYY` is an existing Bintu stream name in your organization account and `latency`, and`timeout` values provided in **microseconds**. |
| 145 | + |
| 146 | +### **Stream Transcoding and ABR** |
| 147 | + |
| 148 | +If your organization account has transcoding feature enabled you may set up ABR with SRT. Just use the pass-through stream name for SRT ingest. |
| 149 | + |
| 150 | +## **Playback** |
| 151 | + |
| 152 | +SRT playback is not supported at the moment. |
| 153 | +Playback is possible using the H5live Player or through RTMP protocol. |
| 154 | + |
| 155 | +### **Using H5Live Player** |
| 156 | + |
| 157 | +For a single bit-rate stream, the ingested stream can be played out with the following playback URL: |
| 158 | + |
| 159 | + |
| 160 | +```http |
| 161 | +https://demo.nanocosmos.de/nanoplayer/release/nanoplayer.html?entry.rtmp.streamname=XXXXX-YYYYY |
| 162 | +``` |
| 163 | + |
| 164 | +Whereby `XXXXX-YYYYY` is the Bintu stream name previously set up for SRT ingest. |
| 165 | + |
| 166 | +For ABR playback, you can setup a stream group on the latest dashboard v3. |
| 167 | +Find more information following the video guide in the link: |
| 168 | + |
| 169 | +[How To Setup Streamgroups Through V3 Dashboard](./how_to_setup_streamgroups.md) |
| 170 | + |
| 171 | +For the corresponding stream group setup, find the player configuration here: |
| 172 | + |
| 173 | +[Stream group configuration](../nanoplayer/nanoplayer_feature_stream_group_configuration.md) |
| 174 | + |
| 175 | +If you are on a secure Bintu organization account, you will find information on playback with secure parameters here: |
| 176 | + |
| 177 | +[Secure playback with H5Live](../nanoplayer/nanoplayer_token_security.md) |
| 178 | + |
| 179 | +### **Using RTMP** |
| 180 | + |
| 181 | +Following, an example using RTMP protocol playback with _ffplay_ from the _ffmpeg_ project on the command line: |
| 182 | + |
| 183 | +```sh |
| 184 | +ffplay rtmp://bintu-play.nanocosmos.de/play/XXXXX-YYYYY |
| 185 | +``` |
| 186 | +Whereby `XXXXX-YYYYY` is the Bintu stream name that was configured in the SRT ingest. |
0 commit comments