roleoroleo / sonoff-hack

Custom firmware for Sonoff GK-200MP2B camera
GNU General Public License v3.0
200 stars 45 forks source link

Customizing RTSP url for ONVIF for proxies #84

Closed iointerrupt closed 2 months ago

iointerrupt commented 2 years ago

I have an RTSP proxy server (live555) running on a raspberry pi where I send all my RTSP camera streams. The reason for this is that a lot of the cameras are on WiFi 2.4ghz and the ONVIF/RTSP clients are on 5ghz or hard-wired. If we have multiple clients directly accessing the streams from the cameras, which are usually unicast, that creates additional redundant traffic on the 2.4ghz channel. Additionally, each connection increases the load on cameras that are resource limited. By having the live555 proxy on my PI, there is only 1 connection to each camera. All the clients connect to the proxy for the stream. Live555 automatically tears down the stream when the last client disconnects. I noticed that the ONVIF daemon that loads, specifies the url for the video stream that gets passed on to the clients. Can we customize the RTSP URL so it can point to a proxy?

roleoroleo commented 2 years ago

If a script "/mnt/mmc/startup.sh" exists, the boot runs it at the end of the procecedure. So you could create a startup.sh script that:

iointerrupt commented 2 years ago

Perfect! I'll just create a startup.sh that will kill the daemon, sed the temporary conf that and restart the daemon.

Thank you.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.