Is there any plan to add support for MediaMTX? #61
-
Is there any plan to add support for MediaMTX? Using FFmpeg to stream to MediaMTX via WHIP fails with the following error: [root]# ./ffmpeg -rtsp_transport tcp -i "rtsp://192.168.2.128:8554/mediamtx/a" -c:v copy -c:a libopus -ar 48000 -ac 2 -f whip "http://192.168.2.189:8889/testx/c/whip"
ffmpeg version N-120839-gc2d17c4db8-20250826 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 15.1.0 (crosstool-NG 1.27.0.79_8f49ec5)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-zlib --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libfreetype --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-vulkan --enable-libshaderc --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-libplacebo --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-libzmq --enable-lv2 --enable-libvpl --enable-openal --enable-liboapv --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-libvvenc --enable-whisper --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs='-ldl -lgomp' --extra-ldflags=-pthread --extra-ldexeflags=-pie --cc=x86_64-ffbuild-linux-gnu-gcc --cxx=x86_64-ffbuild-linux-gnu-g++ --ar=x86_64-ffbuild-linux-gnu-gcc-ar --ranlib=x86_64-ffbuild-linux-gnu-gcc-ranlib --nm=x86_64-ffbuild-linux-gnu-gcc-nm --extra-version=20250826
libavutil 60. 10.100 / 60. 10.100
libavcodec 62. 13.101 / 62. 13.101
libavformat 62. 4.101 / 62. 4.101
libavdevice 62. 2.100 / 62. 2.100
libavfilter 11. 5.100 / 11. 5.100
libswscale 9. 2.100 / 9. 2.100
libswresample 6. 2.100 / 6. 2.100
Input #0, rtsp, from 'rtsp://192.168.2.128:8554/mediamtx/a':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.105313, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720, 25 fps, 24.92 tbr, 90k tbn, start 0.162144
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, start 0.105313
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libopus @ 0x55672eacd340] No bit rate set. Defaulting to 96000 bps.
[WHIP muxer @ 0x55672eb01100] DTLS handshake timeout=5000ms, cost=5038ms, elapsed=5047ms, state=7
[WHIP muxer @ 0x55672eb01100] Dispose resource http://192.168.2.189:8889/testx/c/whip/51485dd2-6e5c-4735-b0f0-aac6c7498a1f ok
[out#0/whip @ 0x55672eb0b880] Could not write header (incorrect codec parameters ?): Connection timed out
[af#0:1 @ 0x55672eaca280] Error sending frames to consumers: Connection timed out
[af#0:1 @ 0x55672eaca280] Task finished with error code: -110 (Connection timed out)
[af#0:1 @ 0x55672eaca280] Terminating thread with return code -110 (Connection timed out)
[out#0/whip @ 0x55672eb0b880] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=-1.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:05.07
Conversion failed! For comparison, streaming to MediaMTX via WHIP using OBS is successful. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 18 replies
-
Beta Was this translation helpful? Give feedback.
-
That's root reason, please give more details, use
|
Beta Was this translation helpful? Give feedback.
Fix in latest commit https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20579, you could increase the buffer_size to avoid the send block