ffmpeg-kit
ffmpeg-kit copied to clipboard
Throttle CPU usage
Is your feature request related to a problem? Please describe. I need to use ffmpeg while still doing other expensive things like video recording and analyzing. It sometimes works but on many devices and in many cases running ffmpeg commands causes the video recording to freeze.
Describe the solution you'd like I would like some way to limit the amount of CPU used by ffmpeg. Normally speed is good but in my case it is not really needed.
Describe alternatives you've considered I have tried to give a low thread priority to the thread calling the ffmpeg-kit execute command. I have also tried the FFMPEG argument "-threads 1" without effects.
Platform I am using Android.
Additional context
There are only two alternatives to limit the cpu usage that I know of:
-
-threads
option onffmpeg
to specify number of cores that will be used byffmpeg
- Running synchronous
FFmpegKit
API methods on a thread that has low priority
If the -threads 1
doesn't improve the situation then try the second one.
Thank you for your suggestions. So the native call to FFMPEG should respect the thread priority used when running synchronous FFmpegKit API methods?
I have however tried both of those alternatives, separately and together, without success. I will continue to try different variations, and try to dig into what happens.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This is still an issue
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.