VideoToolbox compression quality

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
adrienj
Posts: 2
Joined: Thu Aug 18, 2016 12:09 pm

VideoToolbox compression quality

Post by adrienj »

Description of problem or question:
Now, HandBrake 1.2.0 uses VideoToolbox for hardware-accelerated video encoding and decoding capabilities.
When I select H264 (VideoToolbox) or H265 (VideoToolbox), it's not possible to choose a constant quality, but only an average birate.
Is this a limitation of VideoToolbox?

HandBrake version:
1.2.0

Operating system and version:
macOS 10.13.6 High Sierra
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: VideoToolbox compression quality

Post by s55 »

Yes, it's a limitation of VideoToolbox unfortunately.
Brandonshire
Posts: 8
Joined: Wed Sep 27, 2017 11:48 pm

Re: VideoToolbox compression quality

Post by Brandonshire »

Has anyone put together suggested settings to get the best out of VideoToolbox encodes? The speed increase is really tremendous on my system, but I still want to get as good an encode as possible. I'd like to get the best balance I can, but haven't seen anyone give advice on that front.
Brandonshire
Posts: 8
Joined: Wed Sep 27, 2017 11:48 pm

Re: VideoToolbox compression quality

Post by Brandonshire »

Sorry I guess this should question should probably go into devices and presets. I'll ask over there.
Deleted User 13735

Re: VideoToolbox compression quality

Post by Deleted User 13735 »

Brandonshire wrote: Fri Jan 25, 2019 2:00 am Sorry I guess this should question should probably go into devices and presets. I'll ask over there.
Isn't it a better question for Video Toolbox?
There's only so much you can do with that stuff, and Handbrake presets already have it more than covered.
Brandonshire
Posts: 8
Joined: Wed Sep 27, 2017 11:48 pm

Re: VideoToolbox compression quality

Post by Brandonshire »

If there's a section of the forum dedicated specifically to VideoToolbox I'll happily do that. I just want to make sure I'm asking in the right place (perhaps I'm used to forums that enforce that kind of thing too strictly!).

Anyway, I've played around with it a bit and I have some things to try, but if anyone does have an suggestions for settings to get the best balance of quality, size, and speed I'd love to hear them!
Delago
Posts: 3
Joined: Thu Jan 31, 2019 12:39 am

Re: VideoToolbox compression quality

Post by Delago »

I recently got a 2018 and have been experimenting transcoding x264 MKV to x265 using FFmpeg and HEVC VideoToolbox as I couldn't see any improvement when using HandBreak 1.2.0 other than that expected by the hardware acceleration the Intel CPU provides.

Where are the settings for selecting x265 VideoToolbox on the GUI app or are we discussing the CLI version?

Selecting H265 MKV as a preset does not engage the hardware acceleration in the T2 v2 chip found in the 2018 MacBook and Mini line. I can see the difference in time and CPU load when using FFmpeg directly with the T2.

I can confirm there are few tweaks available in the HEVC videotoolbox codec.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: VideoToolbox compression quality

Post by BradleyS »

The video encoder is set on the main window's video tab. The H265 MKV presets use the x265 encoder, not VT.
Delago
Posts: 3
Joined: Thu Jan 31, 2019 12:39 am

Re: VideoToolbox compression quality

Post by Delago »

Thanks. That falls into the glad it wasn't a rattlesnake category. No luck on using VT. Crashes soon after start. Submitted log on GitHub.

Back to the other method.
Delago
Posts: 3
Joined: Thu Jan 31, 2019 12:39 am

Re: VideoToolbox compression quality

Post by Delago »

Update: Received quick response from developers that this bug has been fixed in their Nightly Build. I can confirm that I don't get the crashes I'd had before when trying to use x265 Videotoolbox.

The test below were selected to get comparable to the original's video quality.
Test file 935.5 720p x264

HandBreak - 1.05 GB 720p VT x265.mp4 in 5 minutes with 65% CPU load.
HandBreak- 218.1 MB H.265 MKV, CQ=26 in 28 minutes with a 97% CPU load.
FFmpeg, ff•Works and VideoToolBox - 793.5 MB x265 MKV in 5 minutes with a 3 to 7% CPU load.

No good choice for my very large library awaiting transcoding. The best size versus quality is the x265 codec but it turns up the heat on my CPU to a constant 97% and takes 6 times longer.

I don't know if I want to spend the $50 to find out how the only package designed to take Apple's VT right now, Compression, does in time/quality/CPU load. It probably doesn't handle MKV anyway.
Supermp3man06
Posts: 1
Joined: Sun Feb 03, 2019 1:44 pm

Re: VideoToolbox compression quality

Post by Supermp3man06 »

First of all thanks to the team for this incredible App, I use it every time I have to compress a video. I have one question for the encoding option. Will you add in the next update the possible to do a videotoolbox 2 pass option ? Thank you.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: VideoToolbox compression quality

Post by s55 »

Not supported on the hardware currently, so no.
mduell
Veteran User
Posts: 8182
Joined: Sat Apr 21, 2007 8:54 pm

Re: VideoToolbox compression quality

Post by mduell »

Hardware encoders are for speed, largely targeting near-realtime applications. They're not efficient, so 2pass isn't a consideration.
User avatar
Ritsuka
HandBrake Team
Posts: 1643
Joined: Fri Jan 12, 2007 11:29 am

Re: VideoToolbox compression quality

Post by Ritsuka »

VideoToolbox can do 2 pass even with the hardware encoder. But FFmpeg (the library we use) doesn't support it yet.
User avatar
s55
HandBrake Team
Posts: 10347
Joined: Sun Dec 24, 2006 1:05 pm

Re: VideoToolbox compression quality

Post by s55 »

Only in the sense that it's doing some additional frame analysis. It's not recognisable as 2-pass in the sense that software encoders do it. Depending on the encode, can actually result in minimal or worse results.
Post Reply