Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th September 2022, 22:26   #1  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Handbrake Very Slow

Hello Gals and Guys -

I'm not sure if this is the correct forum so feel free to move it if needed. I've been using Handbrake to code .m2ts files into Mp4s for some times now. In 2020 I bought a new faster PC and installed Handbrake. It worked great, but earlier this year I got a new SSD and had to re-install Windows. Now Handbrake is extremely slow, particularly the first pass, which used take less than five minutes now clocks in just under three hours. It's also takes its time when dropping a video in to scan. The second pass seems to take the about the same of time, but before it took 40 minutes give or take to code a video where it now takes three and halfiish hours. The only thing different is the the re-installing of the OS. All I can come up with is when I used to use RipBot, I installed some codecs, two of which were Haali and Mastroka, but I can't remember the third code and I dumped the files after I got my new PC as I was no longer using RipBot, so I could not put them on with the new SSDs and it''s sluggish ever since. Anyone have an idea of where I can look to come up with a fix for this? Thanks for any help.
zazon is offline   Reply With Quote
Old 10th September 2022, 21:37   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
If M.2 SSD then perfect cooling becomes an absolute must.
I ran into that, purchasing a laptop system from a configurator that forgot to install the tiny thermal pad under each M.2 SSD.
System broke down with motherboard failure, not knowing what was the cuplrit.
I complained, got a new motherboard under warranty, with thermal pads supplied as manufacturer designed.

Applied these pads while retrofitting my M.2 SSDs
System worked, but still bigger transfers somehow took their toll...

Only using HWinfo while doing bigger transfers showed the traces of death.
Short transfer bursts were withstood well. >1GB/s over more than 1 min the writing SSDs went over +75°C ,
then rates went belly up, then corruption because of emergency braking.

Reading the tiny SSD sticker:
3,3V 3A(!) means 10W of consumption and these 10W got to be dissipated well.

In the end I had to purchase a full set of thermal pad blanks of all thicknesses from 0,5 to 4mm,
then pad each and every accessible SSD area to motherboard, top bracket, even plastic parts.
Then 3,5/7Gb/s were steady, temperatures went from +45°C to +51°C, then +65°C and stayed there.

A hint: once such SSD crosses a certain thermal point of no return
(I guess around +70°C) then temperature stays there almost forever, even if transfer is stopped !

Thermal padding, and padding, and padding...
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 4th October 2022 at 09:34.
Emulgator is offline   Reply With Quote
Old 11th September 2022, 02:02   #3  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thank you for the reply. I appreciate the help. I could understand heating thing, but it's the dropping the file into Handbrake and the normally short first pass that have gone gone haywire. The longer second pass functions as it did before. It's a 2.5" drive and nothing else runs poorly. I have Premiere Elements and that seems to work normally. May I ask what are some codecs that are used with RipBot? Perhaps it'll jog the memory. Thanks again.
zazon is offline   Reply With Quote
Old 11th September 2022, 15:33   #4  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
You may just run Taskmanager for SSD transfer activity and HW info for watching SSD temp.
If no SSD approaches +68°C then my point is moot.

(Just at that moment I had to pause a 1TB transfer that began with 1,5GB/s
and after 30% stalled down to snail's pace, exactly at +68C reported SSD temperature.
I manually set fans to 4800rpm and after 3 min commence transfer.
BTW, encoding does not call for such transfer rates)

P.S Today just 3min parsing of a 350GB .mov file for Libav indexing called for 70% SSD transfer load.
Consequence: +65°C on that M.2 SSD. Still ok, but +68°C see rates plummeting.

P.P.S And now my aborted 4K renders came out to be M.2 SSD overheat related as well:
Vegas rendering a 1TB .mov (4K apch), this makes a 1TB temp file.
After finishing rendering Vegas tries to allocate the same space again, and writes 1TB to the same disk.
After 2 failed attempts I found I had to render out 30min pieces, and 50% of these failed as well.

Today it became clear after the 4th attempt: The same overheating syndrome.
Transfer rates plummet until complete standstill, Vegas can not finish the final transfer, waits forever, stalls or/and closes.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 13th September 2022 at 14:40.
Emulgator is offline   Reply With Quote
Old 18th September 2022, 23:00   #5  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thanks for the reply. I checked my disk temps and they're running around 32°C. I did notice when in Task Manager my CPU is running around 10% or less with the occasional short spike into 30-40% range, but quickly goes back to 10% or under. Thanks again.
zazon is offline   Reply With Quote
Old 19th September 2022, 17:17   #6  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
How long does your second pass take? If it's at least as long as the first pass, you're likely gated by source reading or processing somehow. If that's the case, the passes should take around the same amount of time, but the second pass would show higher CPU use. Maybe something that used to happen in hardware is now in software after your reinstall?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 20th September 2022, 01:52   #7  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thank you for the reply. When I first got the PC in 2020, I swapped in the SSD and installed Windows 10, the first pass used to take less than five minutes and the second pass took 30 to 40 minutes. Since replacing my SSD and again installing Windows 10, the first pass takes almost three hours, but the second pass takes the same 30-40 minutes. The only thing I could come up with is the drivers I used to install with RipBot, that I installed when I first got the PC, but have since deleted so could not use them this time. I didn't really change much for the install, except maybe newer versions of software that were available. I updated through Windows, so perhaps I missed something there.I wonder if I install the video driver directly from the manufacturer if that would help? Thanks again.
zazon is offline   Reply With Quote
Old 26th September 2022, 21:34   #8  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by zazon View Post
Thank you for the reply. When I first got the PC in 2020, I swapped in the SSD and installed Windows 10, the first pass used to take less than five minutes and the second pass took 30 to 40 minutes. Since replacing my SSD and again installing Windows 10, the first pass takes almost three hours, but the second pass takes the same 30-40 minutes. The only thing I could come up with is the drivers I used to install with RipBot, that I installed when I first got the PC, but have since deleted so could not use them this time. I didn't really change much for the install, except maybe newer versions of software that were available. I updated through Windows, so perhaps I missed something there. I wonder if I install the video driver directly from the manufacturer if that would help? Thanks again.
This is a weird behavior!

I don't use Handbrake much, so I'm fuzzy on its internals. The most likely thing that could cause that behavior is if there is some heavy preprocessing happening, which gets cached on the first pass and so doesn't need to be repeated.

What happens if you do a single-pass encode? That'll be a very useful clue.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 27th September 2022, 18:45   #9  |  Link
HD MOVIE SOURCE
Registered User
 
HD MOVIE SOURCE's Avatar
 
Join Date: Mar 2021
Location: North Carolina
Posts: 138
I just luckily ran into this. I had a bunch of .nets installed on both of my PCs, which is a requirement for Handbrake to work. What I did was delete all of the .net software from my PC, I had lots.

I downloaded the latest 6.09 (SDK 6.0.401) https://dotnet.microsoft.com/en-us/download/dotnet/6.0

I clicked installers, windows x64, installed it, and for some reason my encodes are 20% faster. I'm wondering if I had a bug where Handbrake was somehow using an older version of .net. I'm not sure, but for me this worked. Maybe give it a try.
HD MOVIE SOURCE is offline   Reply With Quote
Old 29th September 2022, 01:19   #10  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thank you for the replies. I think Handbrake used to offer the opportunity to do one pass coding and I looked through the settings, but I could not find a way to do it now. Unless I missed it, which is completely plausible.

I just ran Windows Update when I did install and I don't think I installed dotnet manually. I did find some registry keys saying dotnet 2 point something, but not 6.09, so I downloaded and installed it. It made no difference.

Interestingly, I tried a .vob file for fun. It also seemed slow when I dropped it into Handbrake/. The first was pass was better at only two and a half hours, but given that it's much smaller, it didn't really feel like a win. Thanks again.
zazon is offline   Reply With Quote
Old 29th September 2022, 01:27   #11  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by zazon View Post
Thank you for the replies. I think Handbrake used to offer the opportunity to do one pass coding and I looked through the settings, but I could not find a way to do it now. Unless I missed it, which is completely plausible.
Handbrake definitely has some way to do CRF encoding. Maybe called "quality" or something. It'd be a mode where you only entered peak bitrate, not overall bitrate.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th September 2022, 19:01   #12  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thanks for the reply. You were right it does have a single pass and I missed it, but it still keeps doing a first pass subtitle scan, which is super long, so it didn't make much of a difference in practical terms to uncheck it:





It did run much faster on my laptop, which has a third of the horsepower, though is running Linux. Thanks again.
zazon is offline   Reply With Quote
Old 30th September 2022, 20:18   #13  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Posts: 343
Have you checked the drive you read the source movie from with CrystalDiskMark yet to rule that out as a bottleneck ?
rwill is offline   Reply With Quote
Old 1st October 2022, 04:21   #14  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by zazon View Post
Thanks for the reply. You were right it does have a single pass and I missed it, but it still keeps doing a first pass subtitle scan, which is super long, so it didn't make much of a difference in practical terms to uncheck it:
OH! If it's doing OCR for subtitles, that will take a long time. You should be able to save that file and reuse it for further encodes of the same title.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd October 2022, 02:07   #15  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
Thanks for the replies. CrystalDiskMark says my drive is 98% healthy, so I'm assuming that's not the issue.

Ever since I started using Handbrake 10+ years ago, it's worked normally. I don't think I did something to turn on subtitles, so is there some way I can turn this off? I looked through the setting, but I think we all my know track record on that one. I tried setting it to English and unchecking forced subtitles, but that did not help. Thanks again.
zazon is offline   Reply With Quote
Old 4th October 2022, 09:39   #16  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
2hr40min Subtitle scan. Well that was it then I guess...
No Handbrake user here, so I can give no hints, but it should be configurable:
https://handbrake.fr/docs/en/1.5.0/a...-defaults.html
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 4th October 2022 at 09:44.
Emulgator is offline   Reply With Quote
Old 8th October 2022, 01:30   #17  |  Link
zazon
Registered User
 
Join Date: Sep 2004
Posts: 72
I'm not sure how cause I ran it yesterday with the same results, but it somehow fixed itself:





I tried again and it still worked. I don't know perhaps one of the fixes finally kicked in, but sometimes it's better to be lucky than good. I was thinking about installing Windows 11 to see if that was any better, so I dodged a bullet on that one. Thanks to all who replied.
zazon is offline   Reply With Quote
Old 8th October 2022, 01:55   #18  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
All's well that ends well, I suppose.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Tags
codec, handbrake, mp4, slow

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.