Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

HandBrake for Mac 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.
Post Reply
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

Description of problem or question:

Handbrake 1.4.2 on M1 iMac running OSX 11.6 uses CPU only but not GPU

I just started a conversion of a video and wondered that Handbrake 1.4.2 is using the M1 CPU at 98% but the GPU idles at under 10%.
I checked the settings but I can't find anything I could have missed, and even with googe or the forums here I didnt find a clue.

Pls enlighten me why the GPU isnt used....
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by mduell »

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.
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

Ok I run 1.4.2 on OSX 11.6
I checked both path you tell where to find the activity logs but there are NONE.

Pls tell me where to find them, thank you
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

Heres the activity log - only uses the CPU but no GPU - why?


HandBrake Activity Log for Session: 2021-10-21T07:31:19Z
Handbrake Version: 1.4.2 (2021100300)
PC001239.mp4
Preset: Fast 1080p30
[15:31:19] Compile-time hardening features are enabled
[15:31:20] hb_init: starting libhb thread
[15:31:20] macgui: fr.handbrake.HandBrakeXPCService scanning specifically for title: 1
[15:31:20] CPU:
[15:31:20] - logical processor count: 8
[15:31:20] hb_scan: path=/Volumes/iMac Data/DaVinci Work in progress/Videos in progress/Carwash/PC001239.MOV, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /Volumes/iMac Data/DaVinci Work in progress/Videos in progress/Carwash/PC001239.MOV
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(/Volumes/iMac Data/DaVinci Work in progress/Videos in progress/Carwash/PC001239.MOV/) failed
[15:31:20] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[15:31:20] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/iMac Data/DaVinci Work in progress/Videos in progress/Carwash/PC001239.MOV':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2021-06-11T04:54:43.000000Z
com.apple.quicktime.creationdate: 2021-06-11T12:54:43+08:00
com.apple.quicktime.location.ISO6709: +10.3361+123.9349
com.apple.quicktime.software: ProCamera 14.3.3
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 12 Pro
Duration: 00:00:11.20, start: 0.000000, bitrate: 95955 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 95810 kb/s, 24.99 fps, 25 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2021-06-11T04:54:43.000000Z
handler_name : Core Media Video
vendor_id : [0][0][0][0]
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 124 kb/s (default)
Metadata:
creation_time : 2021-06-11T04:54:43.000000Z
handler_name : Core Media Audio
vendor_id : [0][0][0][0]
[15:31:20] scan: decoding previews for title 1
[15:31:20] scan: audio 0x1: aac, rate=48000Hz, bitrate=124293 Unknown (AAC LC) (2.0 ch) (124 kbps)
[15:31:22] scan: 10 previews, 3840x2160, 24.996 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1
[15:31:22] libhb: scan thread found 1 valid title(s)
[15:31:22] macgui: fr.handbrake.HandBrakeXPCService scan done
[15:31:22] macgui: fr.handbrake.HandBrakeXPCService started encoding PC001239.mp4
[15:31:22] macgui: fr.handbrake.HandBrakeXPCService with preset Fast 1080p30
[15:31:22] Starting work at: Thu Oct 21 15:31:22 2021

[15:31:22] 1 job(s) to process
[15:31:22] Starting Task: Encoding Pass
[15:31:22] work: only 1 chapter, disabling chapter markers
[15:31:22] job configuration:
[15:31:22] * source
[15:31:22] + /Volumes/iMac Data/DaVinci Work in progress/Videos in progress/Carwash/PC001239.MOV
[15:31:22] + title 1, chapter(s) 1 to 1
[15:31:22] + container: mov,mp4,m4a,3gp,3g2,mj2
[15:31:22] + data rate: 95955 kbps
[15:31:22] * destination
[15:31:22] + /Volumes/iMac Data/Schreibtisch ALTE DATEN/HANDBRAKE konvertieren/PC001239.mp4
[15:31:22] + container: MPEG-4 (libavformat)
[15:31:22] + align initial A/V stream timestamps
[15:31:22] * video track
[15:31:22] + decoder: h264 8-bit (yuv420p)
[15:31:22] + bitrate 95810 kbps
[15:31:22] + filters
[15:31:22] + 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)
[15:31:22] + Decomb (mode=39)
[15:31:22] + Framerate Shaper (mode=2:rate=27000000/900000)
[15:31:22] + frame rate: 24.996 fps -> peak rate limited to 30.000 fps
[15:31:22] + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[15:31:22] + source: 3840 * 2160, crop (0/0/0/0): 3840 * 2160, scale: 1920 * 1080
[15:31:22] + Output geometry
[15:31:22] + storage dimensions: 1920 x 1080
[15:31:22] + pixel aspect ratio: 1 : 1
[15:31:22] + display dimensions: 1920 x 1080
[15:31:22] + encoder: H.264 (libx264)
[15:31:22] + preset: fast
[15:31:22] + profile: main
[15:31:22] + level: 4.0
[15:31:22] + quality: 22.00 (RF)
[15:31:22] + color profile: 1-1-1
[15:31:22] * audio track 1
[15:31:22] + decoder: Unknown (AAC LC) (2.0 ch) (124 kbps) (track 1, id 0x1)
[15:31:22] + bitrate: 124 kbps, samplerate: 48000 Hz
[15:31:22] + mixdown: Stereo
[15:31:22] + encoder: AAC (Apple AudioToolbox)
[15:31:22] + bitrate: 160 kbps, samplerate: 48000 Hz
[15:31:22] sync: expecting 280 video frames
[15:31:22] encx264: encoding at constant RF 22.000000
[15:31:22] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: ARMv8 NEON
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[15:31:22] sync: first pts video is 0
[15:31:22] sync: "Kapitel 1" (1) at frame 1 time 0
[15:31:22] sync: first pts audio 0x1 is 0
[15:31:30] reader: done. 1 scr changes
[15:31:32] work: average encoding speed for job is 29.086992 fps
[15:31:33] comb detect: heavy 1 | light 53 | uncombed 226 | total 280
[15:31:33] decomb: deinterlaced 1 | blended 53 | unfiltered 226 | total 280
[15:31:33] vfr: 280 frames output, 0 dropped and 0 duped for CFR/PFR
[15:31:33] vfr: lost time: 0 (0 frames)
[15:31:33] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:31:33] aac-decoder done: 525 frames, 0 decoder errors
[15:31:33] h264-decoder done: 280 frames, 0 decoder errors
[15:31:33] sync: got 280 frames, 280 expected
[15:31:33] sync: framerate min 24.996 fps, max 24.996 fps, avg 24.996 fps
x264 [info]: frame I:2 Avg QP:22.46 size:204536
x264 [info]: frame P:71 Avg QP:24.10 size: 68316
x264 [info]: frame B:207 Avg QP:27.15 size: 11288
x264 [info]: consecutive B-frames: 1.4% 0.0% 0.0% 98.6%
x264 [info]: mb I I16..4: 14.2% 0.0% 85.8%
x264 [info]: mb P I16..4: 1.5% 0.0% 2.1% P16..4: 53.4% 21.7% 13.9% 0.0% 0.0% skip: 7.4%
x264 [info]: mb B I16..4: 2.0% 0.0% 0.1% B16..8: 24.4% 5.6% 0.2% direct:17.4% skip:50.4% L0:40.5% L1:44.9% BI:14.6%
x264 [info]: coded y,uvDC,uvAC intra: 46.9% 54.1% 13.4% inter: 19.4% 22.2% 0.2%
x264 [info]: i16 v,h,dc,p: 19% 42% 27% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 32% 17% 3% 5% 5% 4% 4% 4%
x264 [info]: i8c dc,h,v,p: 66% 23% 10% 1%
x264 [info]: Weighted P-Frames: Y:23.9% UV:0.0%
x264 [info]: ref P L0: 54.8% 45.2%
x264 [info]: ref B L0: 86.6% 13.4%
x264 [info]: ref B L1: 96.5% 3.5%
x264 [info]: kb/s:5424.94
[15:31:33] mux: track 0, 280 frames, 7595947 bytes, 5405.57 kbps, fifo 512
[15:31:33] mux: track 1, 528 frames, 230745 bytes, 164.21 kbps, fifo 1024
[15:31:33] Finished work at: Thu Oct 21 15:31:33 2021

[15:31:33] libhb: work result = 0
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by Woodstock »

[15:31:22] + encoder: H.264 (libx264)
This indicates that you've selected the software encoder for this encode. That won't use the ASIC at all.
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

Where then can I select the Hardware GPU encoder?
Its not really mentioned how to switch to that.
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

Wow and the developers think THAT is a propper way to tell people how to activate the GPU every nowaday computer has.
Why don't they just check if a GPU is there and activate it by default?

But hey, Im just a stupid user and why should I bother others with what is common...
GoetzPhil
Posts: 7
Joined: Wed Oct 20, 2021 9:56 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by GoetzPhil »

And then its not even working...

As you can see I use the Video Toolbox, but still only the CPU is used and the GPU is at 0% - why.

Image
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by rollin_eng »

GoetzPhil wrote: Thu Oct 21, 2021 1:19 pm Wow and the developers think THAT is a propper way to tell people how to activate the GPU every nowaday computer has.
Why don't they just check if a GPU is there and activate it by default?

But hey, Im just a stupid user and why should I bother others with what is common...
Because not everyone wants to use the hardware encoders.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by rollin_eng »

GoetzPhil wrote: Thu Oct 21, 2021 1:25 pm And then its not even working...

As you can see I use the Video Toolbox, but still only the CPU is used and the GPU is at 0% - why.

Image
Can you please post your log for this encode.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by Woodstock »

Not "every computer" has a video compression ASIC, unless your definition of "every computer" only includes M1 Apple computers. If you widen the definition of "every", then the percentage is less than 100%.

The full log of the encode will tell us more than a broken image link. There may be a problem initializing the hardware. You may have selected CPU-intensive filters.
Deleted User 11865

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by Deleted User 11865 »

GoetzPhil wrote: Thu Oct 21, 2021 1:19 pm Wow and the developers think THAT is a propper way to tell people how to activate the GPU every nowaday computer has.
Why don't they just check if a GPU is there and activate it by default?
Because compression efficiency is higher (sometimes significantly) with the software encoders. By default, you'll get a decent quality/filesize ratio at the expense of increased encoding time and CPU usage.
Deleted User 11865

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by Deleted User 11865 »

GoetzPhil wrote: Thu Oct 21, 2021 1:25 pmAs you can see I use the Video Toolbox, but still only the CPU is used and the GPU is at 0% - why.
Because:

(1) GPU encoding doesn't exist; hardware-accelerated encoders use dedicated video encoding hardware which sometimes happens to be located on the GPU, sometimes on the motherboard, or sometimes on a separate chip (e.g. Apple T2 has some video encoding capabilities as well); the GPU itself is never used for video encoding

(2) audio decoding/encoding, video filtering (crop and scale, etc.) and sometimes video decoding also run on the CPU
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by Ritsuka »

Because someone wrote the code to make it uses the Intel QuickSync decoder.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Handbrake 1.4.2 on M1 iMAc uses CPU only but not GPU

Post by s55 »

Why then does it work under windows?
Why does what work under Windows?
Post Reply