limit ffmeg % use of CPU (as part of video downloadhelper + companion app use)

317 views
Skip to first unread message

Kumquat

unread,
Mar 6, 2023, 5:38:27 AM3/6/23
to Video DownloadHelper Q&A
Is there a way to limit how much CPU % ffmeg (as part of video downloadhelper + companion app) can be allowed to use? (on MAC OS, chrome)

Video Downloadhelper + companion app is working well for me, with the exception of it maxing out my CPU; thereby stalling my system and causing extremely high CPU heat.

I don't wish to bake my computer, so would happily take a slower download speed to mitigate this problem.

I plan to look into dusting the internals fans of the laptop (incase they are clogged), however, I figure there must be a way to limit how much CPU ffmeg is allowed to use?

I have tried fiddling with "turbo boost" and "police app" to this end, by limiting chrome, but no luck so far.

Alternatively, if there is a similar extension one can recommend for downloading videos with password protection I would be all ears.

Apologies if this has doubled up a previous question.

Many thanks

Wild Willy

unread,
Mar 6, 2023, 6:30:45 AM3/6/23
to Video Download Helper Google Group
This sounds a bit odd. My experience is with Firefox on Windows so maybe things don't
work the same as your Chrome on Mac. The way Windows works is it will give an
application as much CPU as is available, up to 100%. But if you try to do something else
in another window, Windows knocks the CPU hog back & makes sure the new task gets a fair
share of CPU. When I run ffmpeg itself, not the captive one distributed with VDH/CoApp,
it also uses up all available CPU, up to 100%. My case fans can blow up a hurricane
depending on what I'm doing with it. But the rest of my system remains responsive. Once
ffmpeg is done, the fans go back to a lower speed & CPU usage drops. My philosophy is
that case fans are there to cool the system when it's under heavy use. I'm glad they're
working. I basically don't worry & be happy. So if your system isn't forcing the
applications to be sociable, there might be a tuning issue you need to look into on your
operating system.

Sociable is a computer science term I learned a long time ago. I tried to find a decent
reference for you but my Google searches kept turning up references to social networks &
such things having nothing to do with what I'm talking about. An application is said to
be sociable when it allows other applications on the same computer to have their fair
share of system resources. It is one of the primary goals of an operating system to
enforce sociability among the applications running on the system. This is why I
encourage you to look into tuning your system.

I'm wondering if you're doing a simple Download in VDH or a Download and Convert. I
believe Download and Convert is actually not a very good idea. You see, there are 2
distinct operations in there: the Download, the Conversion. Let's say the file gets
downloaded but the conversion fails for whatever reason. You will be left with nothing.
If you do a simple Download, you will have a usable file. You can then do the conversion
in VDH as a separate operation. If it fails, you still have the file. You can try to
figure out why the conversion failed & then try it again without having to download the
file again.

My thought is that the download operation went fine & it is actually the conversion that
is using up the CPU on your system.

Or not. It's just a guess.

Kumquat

unread,
Mar 10, 2023, 9:08:14 PM3/10/23
to Video DownloadHelper Q&A
Hi Willy,

Thanks very much for giving this a look and some thought.

Your explanation of sociable applications make perfect sense. The way you describe the system working in your first paragraph is similar to how it does on my own system; I suspect the application is being sociable, but I'm hitting trouble because of how hot the CPU becomes when running at 100% - so more an issue of overheating.

For this reason, I will be looking to to try and get the fans dusted ( I break warranty if I do it myself being a laptop) - but, I would also love a way to prevent the programs from maxing out the CPU. Is there a way I can prevent them from taking more than 50% of the CPU resources?  In a backhand way this should prevent the system them from overworking itself and getting too hot ( while I try and sort out the cause of the overheating). I don't need the downloads in the shortest time possible, I honestly would much prefer to take it at a slower rate and keep the computer working in a comparatively comfortable range rather than pushing it's resources.

You could be completely correct with the conversion being the issue- I have no idea how to separate it from the application process though. 

Unfortunately I have not found any alternative program that allows me to download password enabled videos. Open to any recommendations if you have them though!

Many Thanks

Wild Willy

unread,
Mar 10, 2023, 10:08:44 PM3/10/23
to Video DownloadHelper Q&A
Assuming you're on Windows, you can go into the Task Manager & lower the priority on any given task.  Just pop up the context menu on anything listed there, cascade out the Set Priority selection, & choose a task priority.  I'm not sure that will particularly do anything.  I believe when you set something to a low priority, that has a meaningful impact only when you are trying to do a few or a lot of other things.  If nothing is competing with the low priority task, I'm not sure it is limited in its use of CPU.  It goes ahead & uses up what's available since nothing else is trying to use CPU.  I think.  I'm not entirely sure.  I have occasionally noticed that certain tasks are set to low priority, like a scheduled antivirus full system scan or something like that.  I have not personally used the feature to try to limit a task's system usage.

There's also the Set Affinity selection on the same Task Manager popup menu.  That overrides the operating system's choice of which CPU cores the task can use on a multi-CPU system.  Again, I'm not sure that really does anything because I think any given task uses only one CPU core at a time anyway.

As for download vs convert, you can monitor the download phase in the Resource Monitor on the Network tab.  VDH will show up there under the name net.downloadhelper.coapp-win-64.exe.  When that entry disappears from that tab of the Resource Monitor, it means VDH has stopped downloading anything.  Actually, it's a bit less clear than that.  The measurement numbers in the Resource Monitor are averages over the trailing 60 seconds.  So when VDH (or anything else for that matter) ends, the numbers decay over the course of a minute.  There is a graphic representation of line load in the upper right corner of the Resource Monitor display.  That will show the graph line representing data transfer dropping off a cliff when a download ends before the numbers in the body of the display go to 0 & the entry for the task disappears.  Once the download ends, any aggregation that might be necessary begins.  This is more likely the phase that takes up CPU.  Aggregation can't be avoided.  At least, aggregation is not always necessary.  In my experience, even for rather large files, aggregation does not take an overly long time.  On the other hand, if you are converting something, that's a choice you can make.  Converting is something like changing MKV to MP4.  Since VLC plays pretty much every conceivable format, I have hardly ever converted anything.  If you're worried about overheating your system during conversions, well, don't do them.

I'm surprised that you are having overheating problems.  Cleaning the case fans is certainly a good idea.  But it may be that your CPU is just not powerful enough for the demands you are placing on it.  But I would be surprised if that were the case because these days, most CPUs are multi-core & plenty fast.  But I have barely any experience with laptops so I can't make any definitive analysis for that situation.  All I know is that my system, which is an ordinary desktop PC in a case with case fans plus a fan glued to the CPU chip, I hear the fans speeding up every so often when I'm doing things.  My case has a fan at the front, a fan in the power supply, the CPU fan, & a fan in the video card.  I'm not sure the fan in the video card is always on.  I would imagine it isn't needed too much.  But the PSU & case fans are always spinning, I believe, even if slowly.  They would speed up, along with the CPU fan, when my system gets really loaded up.  The fans sometimes sound like they're really blowing up a hurricane.  That can go on for prolonged periods.  But eventually, the task causing it ends & the fans go back to the nearly imperceptible hum that is the normal equilibrium state.  My system is several years old & still works fine.

I can't say whether you're just being a bit too worried about something that isn't actually worrisome.  Maybe your service tech who will do your warranty cleaning can offer a more educated opinion.  I suggested the don't worry be happy solution before.  You might discuss that with your tech person.  You might try one of the things that causes the overheating while you are in the shop for that maintenance.  Let the tech observe what you are seeing & get a better idea of whether you really should be worried.

mjs

unread,
Mar 11, 2023, 11:39:13 PM3/11/23
to Video DownloadHelper Q&A
The ffmpeg in VDH is not used for downloading but for conversion of the media. There is download and convert and convert local files.
You haven't explained if you're just downloading only or if you're using download and convert.
Actually the conversion features require a license otherwise it will write a watermark in the video and this is really heavy on cpu usage.

If it is just downloading only , I have noticed on HLS downloads the cpu usage goes up and the fan starts blowing harder.
You could try changing the following settings :

Concurrent chunk downloads
Prefetch chunks count

The default is 4 on both of them, try dropping the number down to 3 or lower and see if it makes a difference.

Wild Willy

unread,
Mar 12, 2023, 3:22:31 AM3/12/23
to Video DownloadHelper Q&A
Conversion is going to be CPU intensive with or without a license.  In another thread we've (mjs & I) been working on the past couple of days, I did a repair of a video VDH had downloaded.  The duration of the video was just under 2 hours.  It took just under 3 hours to repair its frame rate.  That was using plain ffmpeg without reference to VDH.  My CPU fans were blowing above normal speed for the whole 3 hours.  That operation is very similar to what you'd get if you do a conversion using VDH.  A conversion with VDH would also be a long process.  The only effect of the license is that without one, the duration of the conversion would be longer due to the writing of the watermark.  I'm not sure by what factor but I would surmise it would double the time it would take.  So the thing I did might take 6 hours if I were doing something comparable in VDH.  But I don't think the CPU load at any given instant would be higher.  It would just take longer.  Personally, in a case like that, I'd be happy if the CPU usage were higher in order to get it done sooner.

Even though that repair operation took 3 hours, my CPU load was only about 15%.  That doesn't sound like much but it was enough to catch the attention of the fans in my system.  Normal CPU load for me is in the 5-7% range & that gives me nearly silent fans.  Even though there was more CPU available to chew up, ffmpeg used only 15%.  This is why I think it's odd that you have been seeing 100% CPU usage.

Maybe it's time for you to share some URLs.  Also, tell us exactly what you are doing: Download or Download and Convert.  Let us try to replicate your results.  Let's see what sort of CPU usage we get when we try to do the same thing you've been doing that pushes your system to 100% CPU.  I'm not entirely convinced ffmpeg (the captive one inside VDH) is the culprit here.  So let's get a clearer problem report.
Reply all
Reply to author
Forward
0 new messages