void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.16k forks source link

ffmpeg RTMP server functionality broken when built with `--enable-librtmp` #52353

Open TinfoilSubmarine opened 1 month ago

TinfoilSubmarine commented 1 month ago

Is this a new report?

Yes

System Info

Void 6.6.52_1 x86_64 AuthenticAMD uptodate rrmFFFFFFFFFFFFFFFFFFFFFFFF

Package(s) Affected

ffmpeg6-6.1.2_2

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

Running ffmpeg -listen 1 -i rtmp://192.168.1.235:1935/test -f h264 - | ffplay - should listen for an incoming stream, then display a video.

Actual behaviour

$ ffmpeg -listen 1 -i rtmp://192.168.1.235:1935/test -f h264 - | ffplay -                                                                                                                                                    
ffmpeg version 6.1.2ffplay version 6.1.2 Copyright (c) 2003-2024 the FFmpeg developers
  built with gcc 13.2.0 (GCC)
 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --enable-gpl --enable-gnutls --disable-stripping --enable-libcdio --enable-version3 --enable-runtime-cpudetect --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-shared --enable-static --enable-libxcb --enable-libpulse --enable-libfreetype --enable-libmodplug --enable-libspeex --enable-libcelt --enable-libass --enable-libopus --enable-librtmp --enable-libjack --disable-libopencore_amrnb --disable-libopencore_amrwb --disable-libopenjpeg --enable-libbluray --enable-postproc --enable-opencl --enable-libvmaf --enable-libx265 --enable-libv4l2 --enable-libaom --enable-libbs2b --enable-libvidstab --enable-libdav1d --enable-libsrt --enable-librist --enable-libwebp --enable-vulkan --enable-libdrm --enable-libsvtav1 --enable-vaapi --enable-vdpau --disable-libzimg --disable-libmysofa --enable-libvpl --enable-nvenc --enable-nvdec
  configuration: --prefix=/usr --disable-debug --enable-gpl --enable-gnutls --disable-stripping --enable-libcdio --enable-version3 --enable-runtime-cpudetect --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-shared --enable-static --enable-libxcb --enable-libpulse --enable-libfreetype --enable-libmodplug --enable-libspeex --enable-libcelt --enable-libass --enable-libopus --enable-librtmp --enable-libjack --disable-libopencore_amrnb --disable-libopencore_amrwb --disable-libopenjpeg --enable-libbluray --enable-postproc --enable-opencl --enable-libvmaf --enable-libx265 --enable-libv4l2 --enable-libaom --enable-libbs2b --enable-libvidstab --enable-libdav1d --enable-libsrt --enable-librist --enable-libwebp --enable-vulkan --enable-libdrm --enable-libsvtav1 --enable-vaapi --enable-vdpau --disable-libzimg --disable-libmysofa --enable-libvpl --enable-nvenc --enable-nvdec
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
RTMP_Connect0, failed to connect socket. 111 (Connection refused)
[in#0 @ 0x55c4d2f5eb40] Error opening input: Unknown error occurred
Error opening input file rtmp://192.168.1.235:1935/test.
Error opening input files: Unknown error occurred
fd:: Invalid data found when processing input 0KB sq=    0B f=0/0

Steps to reproduce

  1. Have ffmpeg listen for an RTMP stream: ffmpeg -listen 1 -i rtmp://192.168.1.235:1935/test -f h264 - | ffplay -
  2. Stream something to the RTMP url.
  3. See error above.
TinfoilSubmarine commented 1 month ago

I have tested with a build of ffmpeg omitting --enable-librtmp and can confirm this error does not occur.

tm512 commented 1 month ago

At least in the past, librtmp builds also had connectivity issues while streaming (would randomly disconnect), prompting me to make my personal builds with it disabled. At this point I'm not sure if librtmp offers any useful features that ffmpeg's native RTMP doesn't yet have.