-
QuestionIn the examples of using regex, the positional variable like Something like: paths:
"~^proxy_([a-z0-9]+)_(.+)$":
source: rtsp://$G1-server:8554/$G2
sourceOnDemand: yes All requests addressed to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
From my testing, it very much seems like no. I was about to post my own discussion but am adding to this one instead. I found this PR as well as the couple of threads surrounding it. https://github.com/bluenviron/mediamtx/pull/2799/files I am realizing however that what I'm trying to do still might not function. All IP's mentioned here are internal private IP's that do not translate to anything, so left in place. All screenshots of cameras are public cameras.
I have a MediaMTX running in k8s with the above bit of yaml, and if I port-forward MediaMTX to my localhost and send a request following the path structure I dictate above, I get the above "no one is publishing". I am fairly certain at least the transport layer all checks out, as I can ffmpeg the same target and save a file to disk in the container that is full of data. I've realized that everyone in #824 is specifically rewriting everything in the trailing path of the URL and not the hostname itself as I'm trying right here. Based on the name of the PR I linked in the beginning, I'm thinking it makes sense that what I am doing could be described as "dynamic sources" from regex paths, and what was implemented was specifically "static sources". Context: I was wanting to use a Container in the cloud running my VPN+MediaMTX. It would then proxy requests from my webpapp front end to any of the IP cameras I have access to from across my VPN, ideally I was hoping to use various FFMPEG transformations, reducing transport from Edge -> Cloud for example, as I cannot change the configuration of the cameras. I have read that aler9 told other folks to "use NGINX or traefik, etc, if you want to proxy every request" but I am also hoping to leverage transformations using MediaMTX to fetch various qualities, reduce transmission costs, act as a translation layer for interfacing with various camera hardware, etc. |
Beta Was this translation helpful? Give feedback.
-
Thanks, that works! |
Beta Was this translation helpful? Give feedback.
Hello Matthew,
Yes i probably said that but only in the context of HTTP-based protocols (HLS and WebRTC), this surely doesn't apply to RTSP.
Open an issue or a discussion and provide full details and server logs, otherwise it's impossible to replicate the issue.
Regarding the question of using regexp variables to dynamically set the host, credentials or port of a URL, i provided an answer here: #3012
Regarding the question of using regexp variables to dynamically set the protocol, this is currently unsupported, and i've created a feature requ…