Debian Codegraph @

README.md

raw symbols SCIP
1 ![librist logo](docs/librist_logo.png)
2
3 # libRIST
4
5 A library that can be used to easily add the RIST protocol to your application.
6
7 This code was written to comply with the Video Services Forum (VSF) Technical Recommendations TR-06-1, TR-06-2, and TR-06-3. The protocol goes by the codename "RIST"
8
9 The canonical repository URL for this repo is https://code.videolan.org/rist/librist
10
11 This project is partially funded by the SipRadius LLC.
12
13 ## Goal and Features
14
15 The goal of this project is to provide a RIST library for **most platforms**.
16
17 ### Supported Standards
18
19 - **VSF TR-06-1** (Simple Profile) - Full support
20 - **VSF TR-06-2** (Main Profile) - Full support including:
21 - PSK Encryption (AES-128 and AES-256)
22 - SRP (Secure Remote Password) passphrase exchange
23 - Bidirectional connection initiation
24 - Multipath support (load balanced or redundant link bonding)
25 - One-to-many distribution (media server mode)
26 - Multiplexing and TUN interface support
27 - Null packet deletion/suppression
28 - **VSF TR-06-3** (Advanced Profile) - Baseline.Direct conformance including:
29 - Native control plane (Keep-Alive, RTT Echo, NACK Bitmask/Range)
30 - Full 32-bit sequence numbering
31 - PSK encryption (AES-CTR mode 1, per-packet Nonce/IV)
32 - SRP (Secure Remote Password) passphrase exchange
33 - Future Nonce Announcement for zero-latency key rotation
34 - Flow ID hierarchy (Outer/Inner/Sub) mapped to stream-id
35 - LZ4 payload compression with automatic receiver detection
36 - Flow Attribute messages (periodic JSON session metadata)
37 - Type 8 GRE-over-AP encapsulation for Section 9 interoperability
38
39 ### Additional Features
40
41 - Pluggable transport abstraction for non-POSIX platforms (WebAssembly, userspace stacks)
42 - Packet Split/Merge for payloads exceeding path MTU
43 - YAML configuration file support for ristsender/ristreceiver
44 - Prometheus metrics exporter with OpenMetrics format
45 - MPEG-TS null packet suppression byte tracking
46 - Differentiated bandwidth statistics (normal/retry/rejected traffic)
47 - Session timeout API and callbacks
48 - Ephemeral listening ports
49 - Cross-platform TUN interface support in the library (macOS utun, Linux /dev/net/tun, Windows stub)
50 - `data_fd` forwarding API: attach any file descriptor (socket, FIFO, TUN fd) and let librist handle the data path
51
52 ## Dependencies
53
54 None. This library has no external runtime dependencies on any OS other than normal core OS libraries.
55
56 ## License
57
58 **libRIST** is released under a very liberal license, a contrario from the other VideoLAN projects, so that it can be embedded anywhere, including non-open-source software; or even drivers, to allow the creation of hybrid decoders.
59
60 The reasoning behind this decision is the same as for libvorbis, see [RMS on vorbis](https://lwn.net/2001/0301/a/rms-ov-license.php3).
61
62 ## Library sweet spot (optimal use cases with current defaults)
63
64 - Buffer sizes from 50 ms to 30 seconds
65 - Networks with round trip times from 0ms to 5000ms
66 - Bitrates from 0 to 1 Gbps
67 - Packet size should be kept under the path's MTU (typically 1500). Payloads exceeding the MTU can be handled with the built-in split/merge feature (`?split=auto`).
68 - Bi-directional communication available (not one-way systems like satellite)
69
70 If you have an application that needs to operate outside the sweet spot described above, you will need to modify some constants in the rist-private.h header and/or use some of the more obscure API calls to fine tune the library for your use case.
71
72 # Roadmap
73
74 ### Completed
75
76 - Complete C implementation of the RIST protocol
77 - Stable and documented public API
78 - VSF TR-06-1 (Simple Profile) full compliance
79 - VSF TR-06-2 (Main Profile) full compliance
80 - VSF TR-06-3 (Advanced Profile) Baseline.Direct conformance
81 - Cross-platform support (Linux, macOS, Windows, FreeBSD, WebAssembly)
82 - PSK encryption and SRP passphrase exchange
83 - Multipath and multiplexing support
84 - Pluggable transport abstraction
85 - Packet Split/Merge
86 - LZ4 payload compression
87 - Prometheus metrics integration
88
89 ### In Progress
90
91 - Improve C code base with [various tweaks](https://code.videolan.org/rist/librist/wikis/to-do)
92 - Expanded platform testing and optimization
93 - Language bindings and wrappers
94
95 ### Planned
96
97 - VSF TR-06-3 (Advanced Profile) additional conformance levels (DTLS, Fragmentation)
98
99 # Tools
100
101 The library includes several command-line utilities:
102
103 - **ristsender** - RIST sender application
104 - **ristreceiver** - RIST receiver application
105 - **rist2rist** - RIST relay/proxy application
106 - **udp2udp** - UDP relay application
107 - **risttunnel** - Point-to-point IP tunnel over RIST (bidirectional, ARQ, crypto)
108 - **ristsrppasswd** - Generate SRP verifier lines for authentication
109 - **prometheus-exporter** - Prometheus metrics endpoint (when built with libmicrohttpd)
110
111 All tools support YAML configuration files for easier deployment.
112
113 # Contribute
114
115 Currently, we are looking for help from:
116 - C developers,
117 - asm developers,
118 - platform-specific developers,
119 - testers.
120
121 Our contributions guidelines are quite strict. We want to build a coherent codebase to simplify maintenance and achieve the highest possible speed.
122
123 Notably, the codebase is in pure C and asm.
124
125 We are on Telegram, on the rist_users and librist_developers channels.
126
127 See the [contributions document](CONTRIBUTING.md).
128
129 ## CLA
130
131 There is no CLA.
132
133 VideoLAN will only have the collective work rights.
134
135 ## CoC
136
137 The [VideoLAN Code of Conduct](https://wiki.videolan.org/CoC) applies to this project.
138
139 # Compile using meson/ninja (linux, osx and windows-mingw)
140
141 1. Install [Meson](https://mesonbuild.com/) (0.51 or higher), [Ninja](https://ninja-build.org/)
142 2. Alternatively, use "pip3 install meson" and "pip3 install ninja" to install them
143 3. Run `mkdir build && cd build` to create a build directory and enter it
144 4. Run `meson ..` to configure meson, add `--default-library=static` if static linking is desired
145 5. Run `ninja` to compile
146
147 # Compile using meson/ninja (windows - Visual Studio 2019/2022)
148
149 1. Open a cmd window and type "pip3 install meson" to install meson through Python Package Index
150 2. Run "x64 Native Tools Command Prompt for VS 2019.exe" (or VS 2022)
151 3. cd to the folder where you downloaded or cloned the librist source code
152 4. Run the command "meson setup build --backend vs2019" (or vs2022)
153 5. Run the command "meson compile -C build"
154 6. The compiled library and the tools will be in the build and build/tools folders respectively
155 7. Alternatively, open librist.sln and build the applications manually if you prefer to use the VS IDE
156
157 # Build with Docker
158
159 1. Simply do a `docker build` on the Dockerfile in the 'common' subdirectory
160
161 # Install with HomeBrew on MacOS
162
163 1. Assuming HomeBrew is already setup, enter "brew install librist" in a terminal.
164 2. libRIST will be installed in /usr/local, except on Arm64-based Macs, where the root is /opt/homebrew. Make sure to have the bin folder (/usr/local/bin or /opt/homebrew/bin, respectively) in your PATH.
165
166 # Support
167
168 This project is partially funded by SipRadius LLC.
169
170 This company can provide support and integration help, should you need it.
171
172
173 # FAQ
174
175 ## Why do you not improve SRT rather than starting a new project?
176
177 - Although SRT provides a similar solution, it is the result of the vision and design of a single company, Haivision, and it is maintained almost exclusively by Haivision paid developers. RIST on the other hand, was the collective design work of a large group of experts (companies) that have been providing packet recovery services for many years. From its conception, RIST has been based on clear and open standards. Just from SipRadius installations alone, top tier broadcasters have over 4000 RIST point-to-point links running 24/7h.
178
179 Here is a table of comparison of the two protocols:
180
181 ![librist logo](docs/RIST_vs_SRT.png)
182
183 ## Is libRIST an acronym?
184
185 - Yes, libRIST stands for Library - Reliable Internet Stream Transport
186
187 ## Can I help?
188
189 - Yes. See the [contributions document](CONTRIBUTING.md).
190
191 ## I am not a developer. Can I help?
192
193 - Yes. We need testers, bug reporters, and documentation writers.
194
195 ## What about the packet recovery patents?
196
197 - This code was written to comply with the Video Services Forum (VSF) Technical Recommendations TR-06-1, TR-06-2, and TR-06-3 and as such is free of any patent royalty payments
198
199 ## Will you care about <my_arch>? <my_os>?
200
201 - We do, but we don't have either the time or the knowledge. Therefore, patches and contributions welcome.
202
203 ## How can I test it?
204
205 - We have included command line utilities for windows/linux/osx inside this project. They are compiled and placed into the tools folder under the build folder.
206
207 - The Wiki has good information on the use of these utilities https://code.videolan.org/rist/librist/-/wikis/LibRIST%20Documentation