Opened 4 months ago

Closed 6 days ago

#7609 closed defect (needs_more_info)

rw_timeout dont work in RTSP

Reported by: jidckii Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: rtsp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The rw_timeout option does not work with the rtsp protocol

ffmpeg version:

ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --arch=amd64 --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-ldl --prefix=/usr/local
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
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100

playback example:

# ffprobe  -rw_timeout 20000000  http://example.com/hls/camera1.m3u8
[hls,applehttp @ 0x559fd994b640] Opening 'http://example.com/hls/camera1-1544594784.ts' for reading
[hls,applehttp @ 0x559fd994b640] Opening 'http://example.com/hls/camera1-1544594787.ts' for reading
Input #0, hls,applehttp, from 'http://example.com/hls/camera1.m3u8':
  Duration: N/A, start: 41406.580044, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 0


ffprobe -rw_timeout 20000000 rtmp://camera3_restreamer/live/camera3
Input #0, flv, from 'rtmp://camera3_restreamer/live/camera3':
  Metadata:
    encoder         : Lavf58.20.100
  Duration: N/A, start: 1122798.806000, bitrate: N/A
    Stream #0:0: Subtitle: text
    Stream #0:1: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 23.67 fps, 23.67 tbr, 1k tbn


# ffprobe  -rw_timeout 20000000  rtsp://192.168.0.101
Option rw_timeout not found.

Change History (4)

comment:1 follow-up: Changed 4 months ago by cehoyos

  • Component changed from avutil to undetermined
  • Keywords rw_timeout removed
  • Priority changed from critical to normal

Please test current FFmpeg git head and please do not test ffprobe if the issue is also reproducible with ffmpeg and provide the command line you tested together with the complete, uncut console output.

comment:2 in reply to: ↑ 1 Changed 4 months ago by jidckii

Replying to cehoyos:

Please test current FFmpeg git head and please do not test ffprobe if the issue is also reproducible with ffmpeg and provide the command line you tested together with the complete, uncut console output.

Okay )
Here is an example from the last snapshot and using ffmpeg:

# ffmpeg -version
ffmpeg version N-92677-gdd7d603 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --arch=amd64 --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-ldl --prefix=/usr/local
libavutil      56. 24.101 / 56. 24.101
libavcodec     58. 42.100 / 58. 42.100
libavformat    58. 24.100 / 58. 24.100
libavdevice    58.  6.101 / 58.  6.101
libavfilter     7. 46.101 /  7. 46.101
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100



#  ffmpeg -rw_timeout 20000000 -rtsp_transport tcp -i rtsp://192.168.0.121 -c copy -f mpegts udp://127.0.0.1:1234
Option rw_timeout not found.

# ffmpeg  -rtsp_transport tcp -i rtsp://192.168.0.121 -c copy -f mpegts udp://127.0.0.1:1234
Input #0, rtsp, from 'rtsp://192.168.0.121':
  Metadata:
    title           : 
  Duration: N/A, start: 0.040000, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
Output #0, mpegts, to 'udp://127.0.0.1:1234':
  Metadata:
    title           : 
    encoder         : Lavf58.24.100
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x555c168340c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mpegts @ 0x555c168340c0] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
frame=   90 fps= 36 q=-1.0 Lsize=    1029kB time=00:00:04.36 bitrate=1933.5kbits/s speed=1.75x    
video:944kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.984775%
Exiting normally, received signal 2.



#  ffmpeg -rw_timeout 20000000 -i http://example.org/hls/cam2.m3u8 -c copy -f mpegts udp://127.0.0.1:1234
[hls,applehttp @ 0x55f27d002340] Opening 'http://example.org/hls/cam2-1544608827.ts' for reading
[hls,applehttp @ 0x55f27d002340] Opening 'http://example.org/hls/cam2-1544608830.ts' for reading
Input #0, hls,applehttp, from 'http://example.org/hls/cam2.m3u8':
  Duration: N/A, start: 55449.860044, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 0
Output #0, mpegts, to 'udp://127.0.0.1:1234':
  Metadata:
    encoder         : Lavf58.24.100
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuvj420p(pc, bt709), 1920x1080, q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[http @ 0x55f27d00a200] Opening 'http://example.org/hls/cam2-1544608833.ts' for reading
[http @ 0x55f27d00a200] Opening 'http://example.org/hls/cam2-1544608836.ts' for reading
[http @ 0x55f27d07e4c0] Opening 'http://example.org/hls/cam2.m3u8' for reading
[http @ 0x55f27d00a200] Opening 'http://example.org/hls/cam2-1544608839.ts' for reading
^Came=  300 fps= 50 q=-1.0 size=    3091kB time=00:00:11.96 bitrate=2117.3kbits/s speed=2.01x  


comment:3 Changed 12 days ago by Jun

Could you have a try with -stimeout ?

comment:4 Changed 6 days ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.