TODO: Brief description
- generate - dummy content streaming over SRT for performance tests
- receive - receiving SRT streaming to null for performance tests
- route - route packets between two sockets (UDP/SRT) uni- or bidirectionally
- forward - forward packets bidirectionally between two SRT connections
- file send - segment-based file/folder sender (requires C++17:
-DENABLE_CXX17=ON
) - file receive - segment-based file/folder receiver (requires C++17:
-DENABLE_CXX17=ON
)
Collecting SRT statistics in CSV format.
- C++14 compliant compiler (GCC 4.8+)
- cmake (as a build configuration system)
- OpenSSL (for encryption - required by SRT)
- Pthreads (use pthreads4w on Windows - required by SRT)
mkdir -p projects/srt/srt-xtransmit
cd projects/srt
git clone https://github.com/maxsharabayko/srt-xtransmit.git srt-xtransmit
cd srt-xtransmit
git submodule init
git submodule update
Tip: There is another way to do this which is a little simpler, however. If you pass --recurse-submodules
to the git clone
command, it will automatically initialize and update each submodule in the repository, including nested submodules if any of the submodules in the repository have submodules themselves.
Tip: If you already cloned the project and forgot --recurse-submodules
, you can combine the git submodule init
and git submodule update
steps by running git submodule update --init
. To also initialize, fetch and checkout any nested submodules, you can use the foolproof git submodule update --init --recursive
.
3. Install submodules dependencies, in particular, SRT library dependencies
Install CMake dependencies and set the environment variables for CMake to find openssl:
Ubuntu 18.04
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential
CentOS
TODO
MacOS
brew install cmake
brew install openssl
export OPENSSL_ROOT_DIR=$(brew --prefix openssl)
export OPENSSL_LIB_DIR=$(brew --prefix openssl)"/lib"
export OPENSSL_INCLUDE_DIR=$(brew --prefix openssl)"/include"
On macOS, you may also need to set
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
for pkg-config to find openssl. Run brew info openssl
to check the exact path.
Ubuntu 18.04 / CentOS
mkdir _build && cd _build
cmake ../
cmake --build ./
MacOS
mkdir _build && cd _build
cmake ../ -DENABLE_CXX17=OFF
cmake --build ./
Comprehensive Windows build instructions can be found in the corresponding wiki page.
vcpkg
package manager is the recommended way to build pthreds and OpenSSL dependencies on Windows.
Before building the project with cmake, checkout the desired SRT library version.
After
git submodule init
git submodule update
go to srt submodule and checkout, e.g. v1.3.4
cd submodule/srt
git checkout v1.3.4
srt-xtransmit generate "srt://127.0.0.1:4200?transtype=live&rcvbuf=1000000000&sndbuf=1000000000" --msgsize 1316 --sendrate 15Mbps --duration 10s --statsfile stats-snd.csv --statsfreq 100ms
srt-xtransmit receive "srt://:4200?transtype=live&rcvbuf=1000000000&sndbuf=1000000000" --msgsize 1316 --statsfile stats-rcv.csv --statsfreq 100ms
srt-xtransmit generate "srt://127.0.0.1:4200?transtype=file&messageapi=1&payloadsize=1456&rcvbuf=1000000000&sndbuf=1000000000&fc=800000" --msgsize 1456 --num 1000 --statsfile stats-snd.csv --statsfreq 1s
srt-xtransmit receive "srt://:4200?transtype=file&messageapi=1&payloadsize=1456&rcvbuf=1000000000&sndbuf=1000000000&fc=800000" --msgsize 1456 --statsfile stats-rcv.csv --statsfreq 1s
Send all files in folder "srcfolder", and receive into a current folder "./".
Requires C++17 compliant compiler with support for file_system
(GCC 8 and higher). See compiler support matrix.
Build with -DENABLE_CXX17=ON
build option to enable (default -DENABLE_CXX17=OFF).
srt-xtransmit file send srcfolder/ "srt://127.0.0.1:4200" --statsfile stats-snd.csv --statsfreq 1s
srt-xtransmit file receive "srt://:4200" ./ --statsfile stats-rcv.csv --statsfreq 1s