|
|
A few notes first:
|
|
|
|
|
|
- If you do not have a test stream handy, use ffmpeg to generate a test stream, as in the command line below. The following generates a 720P/24FPS pattern for 65536 seconds. Adjust the rates, resolution and duration to suit your needs. We also suggest testing transporting the stream from the source to your desktop IP address _without_ RIST at first ( and to the port that you expect to route to), if possible, to ensure that there will be no routing problems.
|
|
|
|
|
|
ffmpeg -f lavfi -re -fflags +genpts -i testsrc=duration=65536:size=1280x720:rate=24 -f mpegts "udp://127.0.0.1:8193?pkt_size=1316"
|
|
|
|
|
|
- You will find various tips regarding buffer size etc. in the ristsender/receiver pages. In some of the examples below, we use a hypothetical round trip time of 35ms, which is approximately that of a New York/Los Angeles routing.
|
|
|
|
|
|
- When testing multicast, always make sure that the switches/routers along the way will pass it.
|
|
|
|
|
|
- When ristreceiver and the client view (such as vlc or ffmpeg) are on different hosts, it's always best to have receiver and the desktop host connected to the same switch, both for multicast testing, and to ensure the least amount of possible problems are added to the test path.
|
|
|
|
|
|
- Remember to set up port forwarding on the receiver side should your test require it.
|
|
|
|
|
|
| Example 1: Simple Profile: sends a udp stream to a routable address using defaults. |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://@127.0.0.1:8192' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=2560' -p 0 -v 4 |
|
|
|
| _The above sets bandwidth to 2.5Gbps, which should cover a 2Gbps stream easily._ |
|
|
|
| _and on the receiver side, run vlc 4.0 or a command line below. Note that on the receiver side, we place an @ sign in front of the destination address, because it is the receiver/host's own address._ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=2560' -o 'udp://192.168.x.x:8192' -p 0 -v 4 |
|
|
|
|
|
|
| Example 2: Basic tuning - send udp stream, main profile to routable address, assuming roundtrip 35ms |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://127.0.0.1:8192?stream-id=1000' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=2560&buffer-min=245&buffer-max=1000&rtt-min=40&rtt-max=500&reorder-buffer=60&congestion-control=1' -p 1 -v 4 |
|
|
|
| _and the receiver:_ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=2560&buffer-min=245&buffer-max=1000&rtt-min=40&rtt-max=500&reorder-buffer=60&congestion-control=1' -o 'udp://192.168.x.x:8192?stream-id=1000' -p 1 -v 4 |
|
|
|
|
|
|
| Example 3: Multi stream input - send two udp streams, main profile, to a routable address using defaults. |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://127.0.0.1:8192?stream-id=1000,udp://127.0.0.1:8193?stream-id=2000' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=5120&congestion-control=1' -p 1 -v 4 |
|
|
|
| _On the receiver side, note the use of the "stream ID's" to distinguish between streams on the output side. In testing, you can open two instances of vlc or ffmpeg to view both streams simultaneously._ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=5120&congestion-control=1' -o 'udp://192.168.x.x:8192?stream-id=1000, udp://192.168.x.x:8193?stream-id=2000' -p 1 -v 4 |
|
|
|
|
|
|
| Example 4: Multicast input, multi stream - receives two udp streams, main profile, send to routable address. |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://237.225.224.1:8192?miface=eth1&stream-id=1000,udp://225.225.224.15:8193?miface=eth1&stream-id=2000' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=5120&congestion-control=1' -p 1 -v 4 |
|
|
|
| _Note: remember that ristreceiver and client viewers will probably need to be connected to the same switch!_ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=5120&buffer-min=245&buffer-max=1000&rtt-min=40&rtt-max=500&reorder-buffer=60&congestion-control=1' -o 'udp://237.225.224.1:8194?miface=eth0&stream-id=1000,udp://225.225.224.15:8195?miface=eth0&stream-id=2000' -p 1 -v 4 |
|
|
|
|
|
|
| Example 5. Pre shared key Encryption - sends one udp stream, main profile, to routable address with encryption (no authorization). |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://127.0.0.1:8192?stream-id=1000' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase' -p 1 -v 4 |
|
|
|
| _and on the receiver side_ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase' -o 'udp://192.168.x.x:8192' -p 1 -v 4 |
|
|
|
|
|
|
| Example 6. Multiple targets - sends one udp stream, main profile, to two routable addresses, with encryption but not authorization. |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://127.0.0.1:8192?stream-id=1000' -o 'rist://123.123.123.123:8200?cname=SENDER01&bandwidth=2560&weight=0&congestion-control=1&aes-type=128&secret=SecretPassPhrase,rist://123.23.23.23:8400?cname=SENDER02&bandwidth=2560&weight=0&congestion-control=1&aes-type=128&secret=OtherSecretPassPhrase' -p 1 -v 4 |
|
|
|
| _and the two receiver sides:_ |
|
|
|
| ristreceiver -i 'rist://@123.123.123.123:8200?cname=RECEIVER01&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase' -o 'udp://192.168.x.x:8192' -p 1 -v 4 |
|
|
|
| ristreceiver -i 'rist://@123.23.23.23:8400?cname=RECEIVER02&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase' -o 'udp://192.168.x.x:8192' -p 1 -v 4 |
|
|
|
|
|
|
| Example 6. Sender listens, pre shared key encryption, no authorization: Send one udp stream on request to any authorized receiver, main profile, with encryption. See "[Authentication and the ristsrppasswd Utility](https://code.videolan.org/rist/librist/-/wikis/Authentication-and-the-ristsrppasswd-Utility)" for additional information. |
|
|
|
| ------ |
|
|
|
| ristsender -i 'udp://127.0.0.1:8192?stream-id=1000&mux-mode=1' -o 'rist://@111.111.111.111:8600?cname=SENDER01&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase' -p 1 -v 4 --srpfile /my/path/srp_pass.txt |
|
|
|
| _Sample receiver:_ |
|
|
|
| ristreceiver -i 'rist://@111.111.111.111:8600?cname=SENDER01&bandwidth=2560&congestion-control=1&aes-type=128&secret=SecretPassPhrase&username=MyUserName&password=MyPassword'-o 'udp://192.168.x.x:8300' -p 1 -v 4 | |