The following warning appears after sending what seems to be a random number of video frames. (no obvious pattern. e.g. 5, 6, 200+, 1000+, 5000+, etc). The video frames still can be received by mediamtx until the warning appears.
(abc.exe:20984): GLib-GIO-WARNING **: hh:mm:ss:miliseconds (../gio/goutputstream.c:398):g_output_stream_writev: run time check failed: (res || (error == NULL || *error != NULL))
Around the same time it appears, mediamtx would also provide this log.
INF [RTSP] [conn [::1]:50498] closed: read tcp [::1]:8554->[::1]:50498: wsarecv: An existing connection was forcibly closed by the remote host.
At this point, mediamtx would destroy the rtsp session and no more encoded video frames can be sent to mediamtx.
My gstreamer pipeline is as follows:
gchar* pipe = g_strdup_printf(
"appsrc name=src is-live=true ! video/x-raw,format=RGB ! "
"videoconvert ! video/x-raw,format=NV12,width=%d,height=%d ! "
"nvh265enc name=encoder preset=p6 tune=ultra-low-latenct bframes=0 gop-size=30 ! "
"video/x-h265,stream-format=byte-stream,alignment=au ! "
“rtspclientsink location=%s protocols=tcp latency=0”,
WIDTH,HEIGHT,RTSPURL);
My source provides RGB8 video frames.
Things tested:
-
The issue disappears when the rtspclientsink protocol=udp (the warning disappears and mediamtx no longer produces that log)
-
Tried adding h265parse with config-interval=1 (but the warning still appeared)
-
Changed the speed at which I supplied the video frames (1hz-20hz). The warning still eventually appeared.
-
When there is no receiver reading from mediamtx, the warning can still appear.
-
Tried adding queues after encoding/parsing with leaky=downstream but the warning still appeared.
-
Tried using x264enc (and the corresponding changes to use a 264 encoder) and the warning does disappear.
Any guidance for this matter would be appreciated. Thank you.