Closed lqbrqt closed 2 months ago
I'm having the same issue with the Docker image;
docker run --rm -it --network=host bluenviron/mediamtx:latest
I get the same error when running
gst-launch-1.0 filesrc location=video.mp4 ! qtdemux name=d d.video_0 ! rtspclientsink location=rtsp://127.0.0.1:8554/mystream
I also can't see any listener on port 8554
lsof -nP -i | grep 8554
If I run not in host mode and expose the ports I get slightly further, specifically getting a new error ERROR: from element /GstPipeline:pipeline0/GstRTSPClientSink:rtspclientsink0: Could not get/set settings from/on resource.
. This way I do see the service listening on TCP 8554.
docker run --rm -it \
-e MTX_PROTOCOLS=tcp \
-e MTX_WEBRTCADDITIONALHOSTS=192.168.x.x \
-p 8554:8554 \
-p 1935:1935 \
-p 8888:8888 \
-p 8889:8889 \
-p 8890:8890/udp \
-p 8189:8189/udp \
bluenviron/mediamtx
Setting protocols=tcp
in rtspclientsink as per https://github.com/bluenviron/mediamtx/issues/2257#issuecomment-1695850914 seems to fix it and the connection succeeds.
Reverting back to host networking, but forcing TCP protocol means we're back to the original issue
docker run --rm -it --network=host -e MTX_PROTOCOLS=tcp -e MTX_WEBRTCADDITIONALHOSTS=192.168.x.x bluen
viron/mediamtx:latest
@XDGFX your issue is unrelated from this one and is a duplicate of #2257
@lqbrqt the runOnReady
command you are using needs to be edited, you need to change $MTX_PATH_DELAY
into ${MTX_PATH}_delay
:
runOnReady: >
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/$MTX_PATH latency=0
! rtpmp4vdepay
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 min-threshold-time=0
! rtspclientsink protocols=tcp location=rtsp://127.0.0.1:8554/${MTX_PATH}_delay
This is because since #3044 environment variables in commands are now replaced by using os.Expand()
instead of strings.ReplaceAll()
.
Which version are you using?
v1.8.0
Which operating system are you using?
Describe the issue
Description
When running MediaMTX v1.5.1 using the same config, GStreamer pipeline starts on event runOnReady. When using MediaMTX v1.8.0 it fails with
In attached files there is a config used with both MediaMTX versions. mediamtx config.txt
Also, in attached files there are logs from both versions of MediaMTX
mtx1.5.log mtx1.8.log
Describe how to replicate the issue
Camera used in reproduction pipeline is AXIS 221
Did you attach the server logs?
yes
Did you attach a network dump?
no