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

Limit the maximal number of threads #32

Closed
luowyang opened this issue Aug 14, 2023 · 1 comment
Closed

Limit the maximal number of threads #32

luowyang opened this issue Aug 14, 2023 · 1 comment

Comments

@luowyang
Copy link
Contributor

VideoCap::open() sets the number of threads to whatever is returned by std::thread::hardware_concurrency() in this line. However, on machines with many cores the number of threads will exceed the maximum recommended by FFmpeg (which is 16 as defined here). This may degrade performance, and FFmpeg will issue an annoying warning says "Using a thread count greater than 16 is not recommended". It may be wiser to follow the recommendation and limit the number of threads to no larger than 16.

@LukasBommes
Copy link
Owner

Thanks for the contribution @luowyang. I will include this with the next release.

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

No branches or pull requests

2 participants