Opened 4 months ago

Last modified 4 months ago

#7648 new defect

rw_timeout not working with libsrt

Reported by: amzandu Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: libsrt timeout
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

libsrt rw_timeout not working. Connection dies in 5 seconds if connection is interrupted regardless of timer setting.

root@ubuntu:/usr/local/bin# ffmpeg -i srt://109.74.198.42:5001?transtype=file\&rcvlatency=15000 -c copy -f mpegts udp://172.20.2.192:5000
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --disable-shared --pkg-config-flags=--static --extra-libs='-lpthread -lm' --enable-libsrt
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100

Input #0, mpegts, from 'srt://109.74.198.42:5001?transtype=file&rcvlatency=15000':

Duration: N/A, start: 1.400000, bitrate: N/A
Program 1

Metadata:

service_name : Service01
service_provider: FFmpeg

Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 854x480, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 89 kb/s

Output #0, mpegts, to 'udp://172.20.2.192:5000':

Metadata:

encoder : Lavf58.20.100
Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 854x480, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 89 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Press [q] to stop, ? for help
[srt @ 0x3d12c00] Connection was broken.kB time=00:00:40.86 bitrate=1580.2kbits/s speed=1.44x
srt://109.74.198.42:5001?transtype=file&rcvlatency=15000: Unknown error occurreds speed=1.22x
frame= 1003 fps= 30 q=-1.0 Lsize= 7902kB time=00:00:40.98 bitrate=1579.4kbits/s speed=1.22x
video:6712kB audio:492kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.699963%

Change History (2)

comment:1 Changed 4 months ago by amzandu

  • Keywords libsrt timeout added

comment:2 Changed 4 months ago by amzandu

the uri parser in libsrt.c seems to be parsing for "timeout" instead of "rw_timeout". after correcting testing shows that rw_timeout can be reduced below five seconds but cannot be increased above 5 seconds.

Note: See TracTickets for help on using tickets.