Opened 8 weeks ago

Last modified 8 weeks ago

#7512 new defect

FFMPEG/FFPLAY LIBSRT Caller does not reconnect on sender reset

Reported by: jlsantiago0 Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: libsrt, reconnect
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Run FFMPEG streaming TS in SRT:Listener mode. Run another FFMPEG or FFPLAY as SRT:Caller to the first FFMPEG in listener mode. Then Stop and restart the first FFMPEG. Then second one in caller mode does not reconnect after the first FFMPEG has restarted.

NOTE: VLC in caller mode to the first FFMPEG:Listener will reconnect after the restart after the listener restarts.

How to reproduce:

FFMPEG Built with libsrt enabled.

# Step One: Run FFMPEG in listener Mode streaming MPEG2TS:
$ ffmpeg -re -i /mnt/share/content/ts/001.ts  -codec copy -f mpegts 'srt://:12345?mode=listener' -stream_loop -1

# Step Two: Run FFMPEG or FFPLAY in caller mode:
$ ffmpeg -i srt://10.66.133.30:12345 -codec copy -f null
$ ffplay srt://10.66.133.30:12345

# Step Three: Terminate the FFMPEG|Listener from Step One with CTRL-C and restart it. Note that if you have an FFMPEG/FFPLAY caller that was connected before, it will not reconnect. But if you are using VLC as the caller it will reconnect.

ffmpeg version: git-master

built on Linux, OSX, Windows

Change History (1)

comment:1 Changed 8 weeks ago by jlsantiago0

FFMPEG Output:

[jsantiago@jlsserver2 /mnt/share/open/ffmpeg/201810/ffmpeg-201810-linux]$ ./ffmpeg -re -i /mnt/share/content/ts/001.ts  -codec copy -f mpegts 'srt://:12345?mode=listener' -stream_loop -1

ffmpeg version n4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-23)
  configuration: --extra-version=VF --prefix=/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/ffmpeg --cc=/usr/bin/gcc --objcc=/usr/bin/gcc --cxx=/usr/bin/g++ --ar=/usr/bin/ar --nm=/usr/bin/nm --target-os=linux --arch=x86_64 --cpu=x86_64 --enable-pic --enable-static --enable-shared --enable-rpath --disable-appkit --enable-avfilter --enable-zlib --enable-bzlib --enable-runtime-cpudetect --enable-hardcoded-tables --disable-doc --disable-audiotoolbox --disable-videotoolbox --disable-amf --disable-cuda --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-nvdec --disable-nvenc --disable-vdpau --x86asmexe=/mnt/share/extendcs/harps30/build/centos6-64/ort/tools/nasm/bin/nasm --enable-libsrt --enable-openssl --sdl2-config=/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/sdl2/lib/../bin/sdl2-config --disable-vaapi --extra-cflags='-I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/zlib/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/bzip2/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/lzma/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/haisrt/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/openssl/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/sdl2/include -I/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/vaapi/include -DVFBUILD_DISABLE_INTMATH_OPTIMIZATIONS=1' --extra-ldflags='-L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/zlib/lib -L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/bzip2/lib -L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/lzma/lib -L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/haisrt/lib -L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/openssl/lib -L/mnt/share/extendcs/harps30/build/centos6-64/ort/stage/sdl2/lib' --extra-libs='-pthread -lhaisrt -lcrypto -lssl -lstdc++ -ldl' --disable-stripping --enable-optimizations
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mpegts, from '/mnt/share/content/ts/001.ts':
  Duration: 00:02:00.36, start: 3629.384800, bitrate: 3184 kb/s
  Program 1 
    Stream #0:0[0x31]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 720x240 [SAR 16:27 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x32]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 121 kb/s
Output #0, mpegts, to 'srt://:12345?mode=listener':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m, progressive), 720x240 [SAR 16:27 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 121 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.04 bitrate=   0.0kbits/frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.14 bitrate=   0.0kbits/
...
Last edited 8 weeks ago by jlsantiago0 (previous) (diff)
Note: See TracTickets for help on using tickets.