bastidest / video-stream-http-proxy

Reads multiple video streams (e.g. RTSP) and outputs low-latency DASH streams, accessible via a HTTP connection, viewable via a simple web interface.
MIT License
1 stars 1 forks source link

Camera Groups/Tabs #33

Open Sammy1Am opened 4 months ago

Sammy1Am commented 4 months ago

Hey there, I haven't actually installed and tried this yet (hopefully will have some time tonight), but it looks like it perfectly fits my use-case so I'm really excited about it.

Preemptively (so I know what I'm getting into when I do try it out), it looks like there is just a single page with all the cameras on it. For my situation I have at least two different groups of users that would be interested in different cameras (and ideally I would like to prevent users from viewing cameras they shouldn't be via Traefik/Authelia). Do you have any suggestions for breaking the cameras into two groups?

I could just run two separate instances of the container, but that seems a little inconvenient.

I'm willing to do some coding to get it to work. As a hack, do you think it would work if I just duplicated the index.ts file and changed this line to read a different list of sources?

If things work out, as a more long term solution, what are your thoughts on having a group attribute on each camera and allowing index.ts to filter based on a query string or path (e.g. http://localhost?group=outside or http://localhost/outside)? This would allow me to control access to cameras more granularly, and group them conveniently.

bastidest commented 4 months ago

Wow, someone stumbled over this project :smile:

it looks like there is just a single page with all the cameras on it

This is correct. Currently there is only one (main) page, which shows all cameras

I could just run two separate instances of the container, but that seems a little inconvenient.

I think this is the most reliable option which does not require any changes in the code would be to start multiple container instances with different configuration files. This would correctly handle the start/stop logic of the camera streams. I know it's a bit clunky and I would prefer a "group" logic in the nodejs code.

what are your thoughts on having a group attribute on each camera and allowing index.ts to filter based on a query string or path (e.g. http://localhost?group=outside or http://localhost/outside)? This would allow me to control access to cameras more granularly, and group them conveniently.

That sounds reasonable and straightforward. Personally I would prefer to select the group in the path (http://localhost/outside), since access control in the reverse proxy would be easier. Just to list my requirements for this feature:

I would like to prevent users from viewing cameras they shouldn't be via Traefik/Authelia

Something that you might trip over: The only reverse proxy that was able to reliably terminate websocket connections on IPv6 + handle the low latency streams was nginx. I ran into issues with Caddy. I did not try Traefik tho.

Sammy1Am commented 4 months ago

Thanks, I'll give things a test and let you know how I get on. I'm glad I did stumble on it; I'm using Frigate to manage some cameras but it maintains a constant connection to them (for object detection and such, which is fine), so for the cameras I don't need recorded/object-detected I was looking for a friendlier UI.

I've successfully run RTSP through Traefik, so I'm optimistic.