harlanc/xiu

RTSP server doesnt work with UDP transport

Opened this issue · 0 comments

XIU version
For example: v0.13.0

Describe the bug
RTSP server doesnt work with UDP transport.

To Reproduce
start xiu with:cargo run -- -t 8554
push with:./ffmpeg.exe -re -i /d/out.mkv -codec copy -f rtsp -rtsp_transport udp rtsp://172.19.116.34:8554/1
play with:./ffplay.exe rtsp://172.19.116.34:8554/1 -rtsp_transport udp
--neither--
push with:./ffmpeg.exe -re -i /d/out.mkv -codec copy -f rtsp -rtsp_transport tcp rtsp://172.19.116.34:8554/1
play with:./ffplay.exe rtsp://172.19.116.34:8554/1 -rtsp_transport udp
xiu logs:

[2024-08-30T02:56:53Z INFO  xrtsp::session::server_session] handle_play error: pack error: bytes write error: bytes io error: io error
[2024-08-30T02:56:53Z ERROR streamhub] Transmiter send error: send video error
[2024-08-30T02:56:53Z ERROR streamhub] Transmiter send error: send audio error
[2024-08-30T02:56:53Z ERROR streamhub] Transmiter send error: send audio error
[2024-08-30T02:56:53Z ERROR streamhub] Transmiter send error: send audio error

--neither--
push with:./ffmpeg.exe -re -i /d/out.mkv -codec copy -f rtsp -rtsp_transport udp rtsp://172.19.116.34:8554/1
play with:./ffplay.exe rtsp://172.19.116.34:8554/1 -rtsp_transport tcp
but works with:
push with:./ffmpeg.exe -re -i /d/out.mkv -codec copy -f rtsp -rtsp_transport tcp rtsp://172.19.116.34:8554/1
play with:./ffplay.exe rtsp://172.19.116.34:8554/1 -rtsp_transport tcp

Expected behavior
UDP transport works.