Can pipeline use `mediamtx`media server

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU 3090
• DeepStream Version 7.1 DOCKER

in some python example use create_rtsp_server

i have create a media server use mediamtx

how the pipeline can link to the mediamtx server
now is

source.link(pgie)
pgie.link(queue_tee)
queue_tee.link(tee)
tee.link(queue_msgconv)
queue_msgconv.link(msgconv)
msgconv.link(queue_msgbroker)
queue_msgbroker.link(msgbroker)
tee.link(queue_tiler)
queue_tiler.link(converter)

converter.link(nvtiler)
nvtiler.link(nvosd)
nvosd.link(nvvidconv_encoder)
nvvidconv_encoder.link(filter_encoder)
filter_encoder.link(encoder)
encoder.link(rtppay)
rtppay.link(rtsp_sink)

another question rtsp pipeline is too long, can i Simplify it?

rtspclientsink= Gst.ElementFactory.make(“rtspclientsink”, “rtspclientsink1”)
rtspclientsink.set_property(“location”, “rtsp://localhost:8554/mystream”)

push to mediamtx

rtppay.link(rtspclientsink)

Watch the video

rtsp://localhost:8554/mystream
or
http://mediamtx_ip:8888/mystream
or
http://mediamtx_ip:8889/mystream