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

如何限制ffmpeg转码 cpu使用率 #157

Closed
zzw122333 opened this issue Aug 16, 2021 · 5 comments
Closed

如何限制ffmpeg转码 cpu使用率 #157

zzw122333 opened this issue Aug 16, 2021 · 5 comments

Comments

@zzw122333
Copy link

jave2如何通过参数限制cpu使用率?
类似实现如下:
FFmpeg -i IN –threads 2 OUT

@a-schild
Copy link
Owner

English please

@JJ-Jiajia
Copy link

How to limit CPU usage through parameters? just like "FFmpeg -i IN –threads 2 OUT"

@a-schild
Copy link
Owner

You can do this via the EncodingAttributes as below

attrs.setDecodingThreads(2);
attrs.setEncodingThreads(2);

@naffan2014
Copy link

jave2如何通过参数限制cpu使用率?
类似实现如下:
FFmpeg -i IN –threads 2 OUT

根据a-schild的回复,他说jave是控制不了cpu使用率的。因为jave只是封装了ffmpeg的语句的使用方法,他并没有对ffmpeg的线程做控制。

@a-schild
Copy link
Owner

a-schild commented Nov 6, 2021

Closed due to missing feedback

@a-schild a-schild closed this as completed Nov 6, 2021
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

4 participants