ffmpeg thread explosion #667
kenmcgaugh
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I noticed that when playing back a sequence with lots of quicktimes (via ffmpeg) that OpenRV's thread count explodes. This also causes the memory usage to go up quite a bit too. ProRes appears to be the worst, but I also tested other codecs (that support multithreading) and they all suffer from the same problem.
As an example, I loaded a sequence of 25 ProRes quicktimes, and by the time they had all been played the number of threads was 726. If I set the RV_MOVIEFFMPEG_ARGS env var to "--codecThreads 1" then the number of threads is stable at 49. This is on an macbook pro (M1 Pro) with 8 cores. There also appears to be quite a hit on memory as well, with 10GB for the first one and 7.5GB with the env var set. My cache size is set to 5GB.
This is with the reader threads set to 2, and the problem gets worse with every reader thread added which is unfortunate as I'm seeing a lot of value is using more reader threads.
What do people think about changing OpenRV such that if the RV_MOVIEFFMPEG_ARGS env var isn't explicitly setting the codecThreads that it will default to 1 instead of letting ffmpeg decide how many threads to use? I already have this working in my local version and would be happy to submit a pull request but I wanted to check here first.
Beta Was this translation helpful? Give feedback.
All reactions