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

Run FFmpeg in a separate process to leverage hardware acceleration #21

Closed
blakeblackshear opened this issue Apr 6, 2019 · 4 comments · Fixed by #51
Closed

Run FFmpeg in a separate process to leverage hardware acceleration #21

blakeblackshear opened this issue Apr 6, 2019 · 4 comments · Fixed by #51

Comments

@blakeblackshear
Copy link
Owner

I was looking into support for hardware accelerated decoding and realized that OpenCV doesn’t use the hardware acceleration built into FFmpeg. I did some basic tests, and it makes a substantial difference. On the laptop where I am running frigate, decoding a 25FPS 1080p stream uses about 25% of a single CPU. Switching FFmpeg to use hardware acceleration drops that to <2%. I can read raw frames form a separate FFmpeg process like this. Once I add support for this, even low powered machines should be able to perform object detection on many cameras.

@blakeblackshear
Copy link
Owner Author

I am running all containers on CoreOS, and the kernel doesnt support video drivers. I will either need to build a custom CoreOS image like this or use a separate machine.

@chelming
Copy link

I too am running CoreOS and am extremely interested in where you get with this!

@blakeblackshear
Copy link
Owner Author

At the moment, I think it is more likely that I will run this on a separate device. I love CoreOS for the seamless automatic updates, and maintaining a custom OS build would defeat the purpose for me.

@chelming
Copy link

what about forking something like this? https://github.com/src-d/coreos-nvidia

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

Successfully merging a pull request may close this issue.

2 participants