keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.73k stars 237 forks source link

specify a device directly #311

Closed adminy closed 1 year ago

adminy commented 1 year ago

Description

I want to use the Pi camera, which is a device such as /dev/video11 I could wrap it with ffmpeg and an rtsp server ... but my understanding is that this lib already calls ffmpeg, so rather than doing this layers wondering if instead I can just pass the device path and options, to save the pi from doing too much work.

How to solve the problem

Provide a flag to specify a linux video device such as a camera. On pi this also gives options like hardware acceleration when using h264 encoding so perhaps extra flags if necessary to select resolution and codec.

basically make these lines optional:

https://github.com/keshavdv/unifi-cam-proxy/blob/main/unifi/cams/base.py#L63-L68

Describe alternatives you've considered

package video device in rtsp and then send it to get packaged again.

Additional context

raspberry pi camera supports hardware acceleration for encoding via ffmpeg. This is for h264 codec, there are options to let you choose resolution, h264 profile, etc.

stale[bot] commented 1 year 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.