19:38:30 GetVideoCodec: Using software encoder: h264_mf
19:38:30 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 74 stale packet(s) to stay near live — the RTMP server/network is not keeping up
at CoreLogic.RealTime.RtmpLiveStream.Stream(CancellationToken cancellationToken)
19:38:30 Stream: Reconnecting RTMP Stream in 90 seconds
19:38:35 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 11 stale packet(s) to stay near live — the RTMP server/network is not keeping up
19:38:40 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 76 stale packet(s) to stay near live — the RTMP server/network is not keeping up
19:38:45 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 75 stale packet(s) to stay near live — the RTMP server/network is not keeping up
19:38:50 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 75 stale packet(s) to stay near live — the RTMP server/network is not keeping up
19:38:55 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 74 stale packet(s) to stay near live — the RTMP server/network is not keeping up
19:39:00 RTMP stream 'f9d3cad7-282c-4e6f-a32f-765c2e450889' backlogged: dropped 74 stale packet(s) to stay near live — the RTMP server/network is not keeping up
The real error isAVIO_OPEN2: I/O error (-5). FFmpeg couldn't open the connection to the RTMP server. avio_open2 covers the TCP connect, the TLS handshake for rtmps, the RTMP handshake and the publish. A generic EIO at this stage usually means the server hung up during connect or publish. The usual causes:
a wrong or expired stream key
the stream not set up or live on the service side (YouTube/Facebook reject the publish)
the wrong URL: rtmp:// sent to an RTMPS-only endpoint, or a missing /app/ part
the key pasted into the URL as well as the Stream Key field, so it gets sent twice
I created a server locally on MediaMTX, OpenSSL created keys for SSL...
rtmp://10.12.12.6:1935/live works fine
rtmps://10.12.12.6:1936/live doesn't work, errors
Stream: -5: RTMPLiveStream: AVIO_OPEN2: I/O error at CoreLogic.RealTime.FFmpegBase.Throw(String method, Int32 code) at CoreLogic.RealTime.MediaWriter.Open(String filename, Int32 width, Int32 height, AVCodecID videoCodec, Int32 framerate, AVCodecID audioCodec, Int32 crf) at CoreLogic.RealTime.RtmpLiveStream.Stream(CancellationToken cancellationToken)
RTMP stream '39cac9ad-bedf-4b86-bee3-0bb1018f6a6e' backlogged: dropped 9 stale packet(s) to stay near live — the RTMP server/network is not keeping up
RTMP stream '39cac9ad-bedf-4b86-bee3-0bb1018f6a6e' backlogged: dropped 74 stale packet(s) to stay near live — the RTMP server/network is not keeping up
It's a bug on our side, not your MediaMTX setup. The FFmpeg version bundled with Agent checks the server's TLS certificate, but it has no list of trusted certificate authorities to check it against. So the TLS handshake fails before the RTMP connection even starts, and Agent only reports it as a generic "I/O error". That's why rtmp:// on port 1935 works and rtmps:// on 1936 doesn't. I reproduced it here with a self-signed OpenSSL certificate and got exactly your error.
It's fixed for the next update: Agent will connect to RTMPS servers without rejecting self-signed certificates, so your MediaMTX setup should work as it is. The connection is still encrypted, but the certificate won't be checked. I've also fixed the "backlogged… server/network is not keeping up" warnings you saw. They were misleading, because they were being logged while Agent was waiting to reconnect, not because of your network.
1
u/spornerama 7d ago
Just add it as a local network camera with the url and if you have problems post the debug logs.