librist v0.2.10 is broken on Windows, all profiles
It seems that librist v0.2.10 is completely broken on Windows.
It started with TSDuck users complaining that the rist
plugin no longer worked on Windows while it still correctly worked on Linux or macOS. I rebuilt and tested librist v0.2.10 on Windows and tested it with the standard tools ristsender
and ristreceiver
instead of TSDuck.
Indeed, ristsender
and ristreceiver
no longer work on Windows. Depending on the parameters, either the communication is immediately broken or the sender and receiver continue to exchange short messages (seen using Wireshark) but the actual data are never transmitted.
Build RIST lib and tools using VS 2022 on Windows
git clone https://code.videolan.org/rist/librist.git
mkdir build
meson setup --backend vs2022 --buildtype release --default-library both build librist
meson compile -C build
cp build/librist.dll build/tools
Working test configuration on Linux
Let's start with testing a working configuration on Linux.
On Ubuntu 24.04.1 LTS with RIST packages (librist4, librist-dev, rist-tools) version 0.2.10+dfsg-2, we start the following three commands in three terminal windows. The first one generates a stream of UDP packets, containing TS packets on PID 100.
tsp -v -b 10,000 -I craft --pid 100 -P regulate -O ip -e 127.0.0.1:7770
ristsender -i udp://@127.0.0.1:7770 -o rist://127.0.0.1:7772
ristreceiver -i rist://@127.0.0.1:7772 -o udp://127.0.0.1:7774
Using Wireshark, we observe the following UDP traffic:
- Port 7770: UDP payload size 1316, raw TS packets with PID 100
- Port 7772:
- To 7772: some UDP payload size 1340, 24-byte header and TS packets
- To 7772: many UDP payload size 64, 80, 84, 16
- From 7772: many UDP payload size 104, 80, 16
- Port 7774: UDP payload size 1316, raw TS packets with PID 100
So, everything work as expected.
Test on Windows
We start the same UDP source. Wireshark observes the traffic on port 7770.
tsp -v -b 10,000 -I craft --pid 100 -P regulate -O ip -e 127.0.0.1:7770
Starting the sender:
build/tools/ristsender.exe -i udp://@127.0.0.1:7770 -o rist://127.0.0.1:7772
1726148312.186011|0.0|[INFO] Starting ristsender version: v0.2.10 libRIST library: v0.2.10 API version: 4.4.0
1726148312.186011|0.0|[INFO] Assigning stream-id 0 to this input
1726148312.187610|0.0|[INFO] Starting in Main Profile Mode
1726148312.187610|0.0|[INFO] RIST Sender Library v0.2.10
1726148312.187610|0.0|[INFO] Link configured with maxrate=100000 bufmin=1000 bufmax=1000 reorder=15 rttmin=5 rttmax=500 congestion_control=1 min_retries=6 max_retries=20
1726148312.187610|0.2648927858752|[INFO] Encryption is disabled for this peer
1726148312.190139|0.2648927858752|[INFO] URL parsed successfully: Host 127.0.0.1, Port 7772
1726148312.191118|0.2648927858752|[INFO] Starting in URL connect mode (368)
1726148312.191118|0.2648927858752|[INFO] Configured the starting socket receive buffer size to 1048576 Bytes.
1726148312.191118|0.2648927858752|[INFO] Configured the starting socket send buffer size to 1048576 Bytes.
1726148312.193140|0.2648927858752|[INFO] Peer cname is WINSYS
1726148312.193140|0.2648927858752|[INFO] Setting max nacks per cycle to 88
1726148312.193140|0.2648927858752|[INFO] Setting buffer size to 2000ms (Max buffer size + 2 * Max RTT)
1726148312.193140|0.2648927858752|[INFO] Advertising flow_id 711167996 and peer_id 1, 32768/1969
1726148312.193140|0.2648927858752|[INFO] Initialized Sender Peer, connecting to receiver ...
1726148312.193140|0.2648927858752|[INFO] Active Peer Information, IP:Port => 127.0.0.0:7772 (0), id: 1, ports: 32768->1969
1726148312.193140|0.2648927858752|[INFO] Enabling keepalive for peer 1
1726148312.194118|0.2648927858752|[INFO] Successfully Authenticated peer 1
1726148312.194118|0.0|[INFO] URL parsed successfully: Host 127.0.0.1, Port 7770
1726148312.194118|0.0|[INFO] Input socket is open and bound 127.0.0.1:7770
1726148312.194118|0.2648927858752|[INFO] Starting master sender loop at 5 ms max jitter
1726148312.199901|0.0|[INFO] {"sender-stats":{"peer":{"flow_id":711167996,"id":1,"cname":"","type":"data","stats":{"quality":100,"sent":4,"received":0,"retransmitted":0,"bandwidth":0,"retry_bandwidth":0,"bandwidth_skipped":0,"bloat_skipped":0,"retransmit_skipped":0,"rtt":0,"avg_rtt":5,"retry_buffer_size":1,"cooldown_time":0}}}}
Press any key to continue . . .
1726148312.208422|0.2648927858752|[INFO] Triggering protocol loop termination
1726148312.210900|0.2648927858752|[INFO] Exiting master sender loop
1726148312.211404|0.2648927858752|[INFO] Starting peers cleanup, count 1
1726148312.211404|0.0|[INFO] [CLEANUP] Removing peer data received event
1726148312.211404|0.0|[INFO] [CLEANUP] Removing peer handshake/ping timer
1726148312.211404|0.0|[INFO] [CLEANUP] Closing peer socket on port 32768
1726148312.211404|0.0|[INFO] [CLEANUP] cleanup done for peer 1
1726148312.211404|0.2648927858752|[INFO] Peers cleanup complete
1726148312.211404|0.2648927858752|[INFO] Freeing oob fifo queue
1726148312.211404|0.2648927858752|[INFO] Removing oob_queue_lock
1726148312.211404|0.2648927858752|[INFO] Freeing up context memory allocations
The sender process continues to run but no traffic is observed on port 7772.
Note the "Press any key to continue . . ." message. I entered a RETURN several times, just in case.
Starting the receiver:
build/tools/ristreceiver.exe -i rist://@127.0.0.1:7772 -o udp://127.0.0.1:7774
1726148345.832888|0.0|[INFO] Starting ristreceiver version: v0.2.10 libRIST library: v0.2.10 API version: 4.4.0
1726148345.833937|0.0|[INFO] Starting in Main Profile Mode
1726148345.834480|0.0|[INFO] RIST Receiver Library version:v0.2.10
1726148345.834480|2050184024128.0|[INFO] Starting in receiver mode
1726148345.834480|0.0|[INFO] Link configured with maxrate=100000 bufmin=1000 bufmax=1000 reorder=15 rttmin=5 rttmax=500 congestion_control=1 min_retries=6 max_retries=20
1726148345.834480|2050184024128.0|[INFO] Encryption is disabled for this peer
1726148345.837168|2050184024128.0|[INFO] URL parsed successfully: Host 127.0.0.1, Port 7772
1726148345.837673|2050184024128.0|[INFO] Starting in URL listening mode (socket# 348)
1726148345.837673|2050184024128.0|[INFO] Configured the starting socket receive buffer size to 1048576 Bytes.
1726148345.837673|2050184024128.0|[INFO] Configured the starting socket send buffer size to 1048576 Bytes.
1726148345.841509|2050184024128.0|[INFO] Peer cname is WINSYS@127.0.0.1:7772
1726148345.841509|2050184024128.0|[INFO] New peer with id #0 was configured with maxrate=100000/0 bufmin=1000 bufmax=1000 reorder=15 rttmin=5 rttmax=500 congestion_control=1 min_retries=6 max_retries=20
1726148345.841509|2050184024128.0|[INFO] Initialized Receiver Peer, listening mode ...
1726148345.841509|2050184024128.0|[INFO] Active Peer Information, IP:Port => 127.0.0.0:7772 (1), id: 1, ports: 7772->1969
1726148345.841509|0.0|[INFO] URL parsed successfully: Host 127.0.0.1, Port 7774
1726148345.841509|0.0|[INFO] Output socket is open and bound 127.0.0.1:7774
1726148345.842519|2050184024128.0|[INFO] Starting receiver protocol loop with 5 ms timer
Press any key to continue . . .
DESTROY
1726148346.906640|2050184024128.0|[INFO] Triggering protocol loop termination
1726148346.907657|2050184024128.0|[INFO] Exiting master receiver loop
1726148346.907657|2050184024128.0|[INFO] Starting Flows cleanup
1726148346.907657|2050184024128.0|[INFO] Flows cleanup complete
1726148346.907657|2050184024128.0|[INFO] Starting Peers cleanup
1726148346.907657|0.0|[INFO] [CLEANUP] Removing peer data received event
1726148346.907657|0.0|[INFO] [CLEANUP] Closing peer socket on port 7772
1726148346.907657|0.0|[INFO] [CLEANUP] cleanup done for peer 1
1726148346.907657|2050184024128.0|[INFO] Peers cleanup complete
1726148346.907657|2050184024128.0|[INFO] Freeing main data buffers
1726148346.907657|2050184024128.0|[INFO] Removing peerlist_lock
1726148346.907657|2050184024128.0|[INFO] Freeing oob fifo queue
1726148346.907657|2050184024128.0|[INFO] Removing oob_queue_lock
1726148346.907657|2050184024128.0|[INFO] Removing data fifo signaling variables (condition and mutex)
The receiver process terminates after the last message.
Other tests, with other profiles, exhibit different symptoms. But none work correctly.