Handbrake Stopped Working Reliably

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Handbrake Stopped Working Reliably

Post by dwiercioch »

Description of problem or question:
I have started having problems with handbrake the last several days after many years of flawless service. It is unable to convert many files for no apparent reason. Usually I just got a conversion that has failed but occasionally, it causes my entire desktop to reboot. I'm not sure if I was seeing the problem before handbrake's last update, but I am definitely seeing the problem now. The source files are coming out of makemkv and are no different than what I've been doing flawlessly for years. Now seems to fail about 80% of the time. Tried a complete uninstall and reinstall of handbrake to no avail. Any help would be GREATLY appreciated!


Steps to reproduce the problem (If Applicable):
Just running a usual conversion.



HandBrake version (e.g., 1.0.0):
Version 1.7.3



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 11 Home with latest patches, version 23H2



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

 # Starting Encode ...

[11:27:12] base preset: Dan's New Default Preset
[11:27:12] Remote Process started with Process ID: 8184 using port: 8037. Max Allowed Instances: 1
[11:27:12] Worker: Starting HandBrake Engine ...
[11:27:12] Worker: Parent Process Id 22336
[11:27:12] Worker: Starting Web Server on port 8037 ...
[11:27:12] Worker: Starting Listener: 1
[11:27:12] Worker: Server Started
[11:27:12] Worker: Disconnected worker monitoring enabled!
[11:27:12] Compile-time hardening features are enabled
[11:27:12] nvenc: version 12.2 is available
[11:27:12] nvdec: is available
[11:27:12] CUDA Version: 8.9
[11:27:12] vcn: not available on this system
[11:27:13] qsv: is available on this system
bhb thread
[11:27:13] Starting work at: Tue Mar 05 11:27:13 2024
[11:27:13] 1 job(s) to process
[11:27:13] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0,
        "Encoder": "av_aac",
        "Gain": 0,
        "Mixdown": 1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "Mono",
        "Track": 0,
        "DitherMethod": 0
      },
      {
        "DRC": 0,
        "Encoder": "copy:ac3",
        "Gain": 0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Name": "Mono",
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:mp3",
      "copy:truehd",
      "copy:flac",
      "copy:eac3"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "E:\\The Roaring Twenties T03-420-06(1).mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 4,
    "Path": "E:\\Video\\THE ROARING TWENTIES BR\\THE ROARING TWENTIES_t03.mkv",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.0",
    "MultiPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "medium",
    "Profile": "high",
    "Quality": 23,
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[11:27:13] CPU: Intel(R) Core(TM) i9-14900K
[11:27:13]  - logical processor count: 32
[11:27:13] Intel Quick Sync Video support: yes, gpu list: 1
[11:27:13] Intel Quick Sync Video integrated adapter with index 1
[11:27:13] Impl mfx-gen library path: C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_effe9612081e9042\libmfx64-gen.dll
[11:27:13]  - Intel Media SDK hardware: API 2.9 (minimum: 1.3)
[11:27:13]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes) av1 (8bit: yes, 10bit: yes)
[11:27:13]  - H.264 encoder: yes
[11:27:13]     - preferred implementation: hardware (2) via D3D11
[11:27:13]     - capabilities (hardware):  lowpower breftype icq vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[11:27:13]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[11:27:13]     - preferred implementation: hardware (2) via D3D11
[11:27:13]     - capabilities (hardware):  lowpower bpyramid icq vsinfo masteringinfo cllinfo opt1
[11:27:13]  - AV1 encoder: no
[11:27:13] hb_scan: path=E:\Video\THE ROARING TWENTIES BR\THE ROARING TWENTIES_t03.mkv, title_index=4
Input #0, matroska,webm, from 'E:\Video\THE ROARING TWENTIES BR\THE ROARING TWENTIES_t03.mkv':
  Metadata:
    title           : THE ROARING TWENTIES
    encoder         : libmakemkv v1.17.6 (1.3.10/1.5.2) win(x64-release)
    creation_time   : 2024-03-05T04:06:06.000000Z
  Duration: 00:04:34.91, start: 0.000000, bitrate: 34671 kb/s
  Stream #0:0(eng): Video: h264 (High), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn
    Metadata:
      BPS-eng         : 34477733
      DURATION-eng    : 00:04:34.907966666
      NUMBER_OF_FRAMES-eng: 8239
      NUMBER_OF_BYTES-eng: 1184771301
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.6 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2024-03-05 04:06:06
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s (default)
    Metadata:
      title           : Mono
      BPS-eng         : 192000
      DURATION-eng    : 00:04:32.864000000
      NUMBER_OF_FRAMES-eng: 8527
      NUMBER_OF_BYTES-eng: 6548736
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.17.6 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2024-03-05 04:06:06
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[11:27:13] scan: decoding previews for title 4
[11:27:13] scan: audio 0x1: ac3, rate=48000Hz, bitrate=192000 English (AC3, 1.0 ch, 192 kbps)
[11:27:14] using container PAR 1:1
[11:27:14] scan: 10 previews, 1920x1080, 29.970 fps, autocrop = 0/0/232/220, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[11:27:14] scan: supported video decoders: avcodec hwaccel
[11:27:14] libhb: scan thread found 1 valid title(s)
[11:27:14] Skipping subtitle scan.  No suitable subtitle tracks.
[11:27:14] Starting Task: Encoding Pass
[11:27:14] work: skipping crop/scale filter
[11:27:14] work: track 1, dithering not supported by codec
[11:27:14] work: only 1 chapter, disabling chapter markers
[11:27:14] job configuration:
[11:27:14]  * source
[11:27:14]    + E:\Video\THE ROARING TWENTIES BR\THE ROARING TWENTIES_t03.mkv
[11:27:14]    + title 4, chapter(s) 1 to 1
[11:27:14]    + container: matroska,webm
[11:27:14]    + data rate: 34671 kbps
[11:27:14]  * destination
[11:27:14]    + E:\The Roaring Twenties T03-420-06(1).mp4
[11:27:14]    + container: MPEG-4 (libavformat)
[11:27:14]      + align initial A/V stream timestamps
[11:27:14]  * video track
[11:27:14]    + decoder: h264 8-bit (yuv420p)
[11:27:14]    + filters
[11:27:14]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[11:27:14]      + Decomb (mode=39)
[11:27:14]      + Framerate Shaper (mode=0)
[11:27:14]        + frame rate: same as source (around 29.970 fps)
[11:27:14]    + Output geometry
[11:27:14]      + storage dimensions: 1920 x 1080
[11:27:14]      + pixel aspect ratio: 1 : 1
[11:27:14]      + display dimensions: 1920 x 1080
[11:27:14]    + encoder: H.264 (libx264)
[11:27:14]      + preset:  medium
[11:27:14]      + profile: high
[11:27:14]      + level:   4.0
[11:27:14]      + quality: 23.00 (RF)
[11:27:14]      + color profile: 1-1-1
[11:27:14]      + chroma location: left
[11:27:14]  * audio track 1
[11:27:14]    + name: Mono
[11:27:14]    + decoder: English (AC3, 1.0 ch, 192 kbps) (track 1, id 0x1)
[11:27:14]      + bitrate: 192 kbps, samplerate: 48000 Hz
[11:27:14]    + mixdown: Mono
[11:27:14]    + encoder: AAC (libavcodec)
[11:27:14]      + bitrate: 160 kbps, samplerate: 48000 Hz
[11:27:14]  * audio track 2
[11:27:14]    + name: Mono
[11:27:14]    + decoder: English (AC3, 1.0 ch, 192 kbps) (track 1, id 0x1)
[11:27:14]      + bitrate: 192 kbps, samplerate: 48000 Hz
[11:27:14]    + AC3 Passthru
[11:27:14] sync: expecting 8238 video frames
[11:27:14] encx264: min-keyint: 30, keyint: 300
[11:27:14] encx264: encoding at constant RF 23.000000
[11:27:14] encx264: unparsed options: level=4.0:vbv-bufsize=31250:vbv-maxrate=25000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 UnalignedStack
x264 [info]: profile High, level 4.0, 4:2:0, 8-bit
[11:27:14] sync: first pts video is 0
[11:27:14] sync: "Chapter 1" (1) at frame 1 time 0
[11:27:14] sync: first pts audio 0x1 is 0
[11:27:14] sync: first pts audio 0x1 is 0

[11:27:13] hb_init: starting li

[11:27:37] Worker process exited!
[11:27:37] Worker process exit was not expected.

 # Job Failed (-12)
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake Stopped Working Reliably

Post by s55 »

If your seeing system reboots, then it's likely your hardware is going bad.

Couple things you can do.
- Run MemTest86+ for a few passes to validate that the RAM is still table.
- Run Prime95 or Cinebench and monitor System voltages / Temperatures to make sure they are all in line.
- Don't overclock and disable any motherboard overclock features.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

Thanks. I'll give that a try.

It's a pretty new machine - only about a month old - but has been working great up to now. There is no overclocking or any other tweaking. My previous machine ran this combination of software for many years on an AMD processor. Let's see what I find when I stress test the hardware a little...
User avatar
Ritsuka
HandBrake Team
Posts: 1658
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake Stopped Working Reliably

Post by Ritsuka »

There are been a few reports of such issues on Intel CPU with many efficiency cores. But no one in the developer team has one to test so there isn't much at the moment we can do.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

dwiercioch wrote: Wed Mar 06, 2024 12:06 amIt's a pretty new machine - only about a month old - but has been working great up to now. There is no overclocking or any other tweaking. My previous machine ran this combination of software for many years on an AMD processor. Let's see what I find when I stress test the hardware a little...
You have to watch for "out of the box" "overclocking" including higher power limits defaulted by the motherboard manufacturer. My view on the situation is that motherboards have very little differentiation between brands at the same feature-driven tier, so some of them are pushing the out of the box configuration beyond the defaults, so they can get some differentiation in the release-day benchmarks.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

Follow up. I have run a memory test (for several hours) as well as a Prime 95 test (for maybe an hour). Neither showed any errors although I could see my CPU temps were getting up to about 100C on the Prime 95 test. Not really what else I'm looking for in terms of stability.

I have a Gigabyte Z790 Aorus Master X motherboard with the latest firmware in conjunction with all fairly high-end components. There has been no overclocking. There is nothing in the event logs that I can see to give me a clue. The system seems pretty stable otherwise, but when I run the latest version of handbrake I now almost always get a system reboot very quickly.

As a test, I downloaded version 1.7.1 of handbrake. Not exactly sure how to run it properly since there doesn't seem to be an installation script for it. What I did was run the handbrake worker exe first and then run the handbrake GUI. Although I still occasionally get a file conversion that ends prematurely with a very nebulous error message that the worker process has ended prematurely, there are no longer any system crashes (yet) and I can usually get it to work if I simply run the job again.

Perhaps this is the problem with certain Intel CPUs that Ritsuka mentioned?

For now, I will have to stay on this rev of handbrake and hope the handbrake folks get this fixed.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

The fix needs to come from Intel/Gigabyte, not HB. HB can't (intentionally) make your computer suddenly reboot.

Here's a story about the broader 13/14th gen Intel stability issues and workarounds.
User avatar
Ritsuka
HandBrake Team
Posts: 1658
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake Stopped Working Reliably

Post by Ritsuka »

Yes, if the system reboots, it's not HandBrake's fault.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

mduell - Thanks for the link. Sounds like I may need to wait for a firmware update from Gigabyte. I'm not knowledgeable enough to know how to tweak the motherboard settings to address the problem myself.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

It's hit or miss running handbrake now.

Is there any insight about the message in the log mean when it says:

[12:18:11] Worker process exited!
[12:18:11] Worker process exit was not expected.

# Job Failed (-12)


I am now getting that error a lot even with my prior version of handbrake. If I am persistent and keep resubmitting, i can usually get it to complete eventually, but this is annoying to say the least. Is there any insight about what I can possibly do short of pinning my hopes on an Intel or Gigabyte update? It's frustrating because this machine was built specifically to be able to run handbrake in the way I was running on my previous box (e.g., a Threadripper-based machine) in order to convert my large collection of video discs. I'd hate to have to start experimenting with another tool.
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Handbrake Stopped Working Reliably

Post by rollin_eng »

First try the latest version and install it normally.

I would try other encoders, maybe some of the hardware ones and see if you have the same issue.
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake Stopped Working Reliably

Post by s55 »

Afraid not. Any time a system reboots out the blue, it's almost always a driver / OS failure or hardware. If nothing can be found in the windows event viewer, then there is a strong chance it's a hardware fault. If the cpu screws up an instruction, it will usually cause a segfault which you can only analyse with developer tools. That said, if it's caused by the CPU getting it wrong, then it won't help.

Video encoding is one of the most intensive things you can do on a system so if it's not 100% stable, video encoding usually shows it up. That's why you won't always see it with other stress test tools. It's not quite as intensive.

You might want to look for and disable "Intel Turbo Boost" related features in the BIOS or anything that puts the CPU in a power saving mode. That may help.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

The mystery error -12 has been around since they separated the encoding process from the gui.

You can try limiting encoder threads to try to work around your hardware problem; try threads=8 and experiment higher or lower from there.
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake Stopped Working Reliably

Post by s55 »

-12 Just means the worker closed before we expected it to.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

How do you get the error from the worker?
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake Stopped Working Reliably

Post by s55 »

If anything happens in a way we can detect (i.e a non crash condition), it'll be in the log. If the process say segfaults, The UI shows that as a -12 but we don't know why.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

More.

I'm really trying to get this to work because it is essentially shutting me down at the moment. I tried more experimenting and I've gotten to the point where I can get a somewhat consistent error message in the Windows Application log. Here it is:

Faulting application name: HandBrake.Worker.exe, version: 1.7.1.0, time stamp: 0x65310000
Faulting module name: hb.DLL, version: 0.0.0.0, time stamp: 0x655e4f58
Exception code: 0xc0000005
Fault offset: 0x00000000012515ba
Faulting process id: 0x0xC3C
Faulting application start time: 0x0x1DA701BC2AFDA6D
Faulting application path: C:\Users\dwier\OneDrive\Desktop\HandBrake\HandBrake.Worker.exe
Faulting module path: C:\Users\dwier\OneDrive\Desktop\HandBrake\hb.DLL
Report Id: 745520c7-9bb1-442c-bb2b-bcbd3d784f49
Faulting package full name:
Faulting package-relative application ID:

Event ID 1000
Task Category: Application Crashing Events
Level: Error



I'm using version 1.7.1 of Handbrake because the latest version causes an almost immediate system reboot. I've also gone in the bios and disabled Intel Turbo Boost but that didn't seem to help.

Does anyone know how to interpret this?
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

Have you tried limiting the encoder threads in the current release? Perhaps even start at 1.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

Thanks for your continued interest in this.

If you mean the advanced setting for "maximum number of simultaneous encodes", it is currently set to 1 when these errors occurred. This was what it was set at when I first started.

As part of my troubleshooting, I also set it to 4 and then to 8 (the max handbrake would allow) with no apparent effect. It is back at 1 now.

I'm trying to get support from Gigabyte, but I'm having problems registering so I can even ask a question.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

No, I mean in the video encoder advanced settings, since you're using x264 use threads=1.

Simultaneous encodes should also be set to 1 given your instability issues.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

Sorry - I'm not sure what you mean then. I looked in Preferences:Advanced (which is where I set the number of simultaneous encodes. Nothing else sounds like the setting you want me to change.

Then I looked on the video tab, but don't see this control there either. I see something called an Encoder Level. Is that what you mean? It's currently set to 4.0.

I looked through all the other tabs, too. I must be blind. What am I doing wrong?
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

More: I also downloaded and ran Intel's own processor test which includes its own stress test. Everything passes.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

In preferences, enable the advanced options box for video encoders.

On the video tab, put threads=1 in that box.
dwiercioch
Posts: 23
Joined: Tue Mar 05, 2024 7:03 pm

Re: Handbrake Stopped Working Reliably

Post by dwiercioch »

Now I think I finally understand. You wanted me to explicitly type "threads=1" into the empty box. I was looking for an explicit widget. I've never entered anything in that box before because I never needed to (not to mention I didn't know what I actually *could* enter there).

I did what you suggested but it seemed to have no effect. It fails the same way after a few seconds. According to task manager, it still seems like it is hitting all of the i9's cores if I believe the performance graphs.

Sigh.

On the bright side, I was finally able to enter a trouble ticket to Gigabyte. I ended up having to use an alternate email address for some reason. (This is the second time I've had to do something like that in the last few weeks. Weird. It's like that email is being blocked sometimes.) No response from them yet. In the meantime, I am stuck. Not sure what options I have if I can't get this resolved. As I said, I built this expensive machine specifically to run handbrake. I have a LOT of video to encode.

Any other ideas?
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake Stopped Working Reliably

Post by mduell »

Can you post the encoding log from when you tried threads=1? There will be some CPU usage other than the video encoder but I wouldn't expect to use all cores on an i9.
Post Reply