Page 1 of 1

VideoToolbox compression quality

Posted: Sun Dec 30, 2018 8:26 pm
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

Re: VideoToolbox compression quality

Posted: Sun Dec 30, 2018 8:31 pm
by s55
Yes, it's a limitation of VideoToolbox unfortunately.

Re: VideoToolbox compression quality

Posted: Fri Jan 25, 2019 1:57 am
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.

Re: VideoToolbox compression quality

Posted: Fri Jan 25, 2019 2:00 am
by Brandonshire
Sorry I guess this should question should probably go into devices and presets. I'll ask over there.

Re: VideoToolbox compression quality

Posted: Fri Jan 25, 2019 3:04 am
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.

Re: VideoToolbox compression quality

Posted: Fri Jan 25, 2019 2:24 pm
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!

Re: VideoToolbox compression quality

Posted: Thu Jan 31, 2019 12:58 am
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.

Re: VideoToolbox compression quality

Posted: Thu Jan 31, 2019 4:42 am
by BradleyS
The video encoder is set on the main window's video tab. The H265 MKV presets use the x265 encoder, not VT.

Re: VideoToolbox compression quality

Posted: Thu Jan 31, 2019 5:42 pm
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.

Re: VideoToolbox compression quality

Posted: Thu Jan 31, 2019 8:20 pm
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.

Re: VideoToolbox compression quality

Posted: Sun Feb 03, 2019 1:48 pm
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.

Re: VideoToolbox compression quality

Posted: Sun Feb 03, 2019 2:58 pm
by s55
Not supported on the hardware currently, so no.

Re: VideoToolbox compression quality

Posted: Sun Feb 03, 2019 5:11 pm
by mduell
Hardware encoders are for speed, largely targeting near-realtime applications. They're not efficient, so 2pass isn't a consideration.

Re: VideoToolbox compression quality

Posted: Sun Feb 03, 2019 5:43 pm
by Ritsuka
VideoToolbox can do 2 pass even with the hardware encoder. But FFmpeg (the library we use) doesn't support it yet.

Re: VideoToolbox compression quality

Posted: Sun Feb 03, 2019 5:49 pm
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.