Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about adding camera dynamically #1077

Closed
roycw opened this issue May 1, 2024 · 8 comments
Closed

Question about adding camera dynamically #1077

roycw opened this issue May 1, 2024 · 8 comments
Labels
question Further information is requested

Comments

@roycw
Copy link

roycw commented May 1, 2024

Hello,

Is that possible to add feeds dynamically after ONVIF discovery ?

@AlexxIT AlexxIT added the question Further information is requested label May 1, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 1, 2024

I don't understand the question

@roycw
Copy link
Author

roycw commented May 1, 2024

HI Alexx, im running an ONVIF discovery to discover any RTSP feeds on my local LAN then i want to automatically add those feed to any configuration so i can consume them can i add them dynamically via API or any other way, the only way i saw on the docs is exlicitly add my feed to the yaml.

on a dfferebnt note: i ran docker run -i -t alexxit/go2rtc just to get the docker running but visting localhost:1984 doesnt resolve.... am i doing anything wrong ?

@roycw
Copy link
Author

roycw commented May 1, 2024

This is closed. need to forward the port 7000:1984 did the trick

@roycw roycw closed this as completed May 1, 2024
@travisghansen
Copy link

I have a similar need, I want to be able to setup new cameras on the fly like mediamtx where I can just set a new stream key and the device 'just works' as a new stream. Is it possible to allow rtmp clients to stream with arbitrary stream keys and automatically join the config?

@AlexxIT
Copy link
Owner

AlexxIT commented May 12, 2024

New unknown streams are not difficult to add. But I'm not sure if this is good application design

@travisghansen
Copy link

Fair enough. I can explain my use-case a little and you can guide me. I am building an IOT-like device that should 'just work' for users who know pretty much nothing about video. They will be running events like sports events etc and on the fly will be adding new cameras in the venues to either help the operations teams have eyes in different remote areas or to eventually take the stream and broadcast to spectators.

I prefer to be able to tell them to install something like streamlabs on a phone and just put whatever they want as the stream key (ie: dynamic streams) and that using a given url structure that matches the stream key they can just pull up that feed in a browser. mediamtx fulfills this perfectly, but I have other requirements (such as pulling in a stream from a local v4l2 2 device, and possible integration with frigate) that go2rtc seems to better fit. If I can consolidate that would be ideal but if not possible then it's not possible.

@AlexxIT
Copy link
Owner

AlexxIT commented May 12, 2024

Now you can just add 10 or 20 or more empty streams to the config. And use them.
You can also add streams and change the config via the API.
I'll think about adding unknown streams. Maybe it will appear in the future.
Now it is more important to add the permissions logic.

@travisghansen
Copy link

I considered the adding a bunch of streams route, that may be easy enough. I also considered using the api, glad to hear it's an option. Hypothetically I could put a reconcile loop somewhere which queries mediamtx and then updates the go2rtc config via api (should I even need mediamtx in the scenario).

Thanks for the response and consideration! I will play around with a few things and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants