keshavdv / unifi-cam-proxy

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

[Feature] Add NVENC support #129

Closed Fanman03 closed 2 years ago

Fanman03 commented 2 years ago

Would it be possible to add a command line option to use NVENC with FFMPEG? I've noticed that this proxy can be quite CPU heavy and I wonder if GPU acceleration would solve the problem. I compiled a version of FFMPEG with CUDA enabled, but this proxy still appears to use the CPU for encoding.

GhostlyCrowd commented 2 years ago

Add -hwaccel cuda to your ffmpeg-args see if that works

Fanman03 commented 2 years ago

Add -hwaccel cuda to your ffmpeg-args see if that works

I have tried that, however running the proxy still loads the CPU quite heavily and no processes show up in nvidia-smi.

keshavdv commented 2 years ago

Can you share the output of the proxy logs to confirm your customized args are actually being injected into ffmpeg? Can you also try running the command that gets printed manually to test whether the argument makes a difference outside of the proxy?

stale[bot] commented 2 years 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.

xrh0905 commented 6 months ago

Are you using docker? Docker require lots of configure to work with nvidia graphic cards.