Handbrake Gpu Acceleration Mac



A GPU-accelerated ripper with the handy ability to set the number of CPU cores it uses, WinX DVD Ripper can rip your DVD to a file in around five minutes at full speed. Using it is as simple as loading the disk, selecting the output folder, and pressing the big, blue 'Run' button. GPU acceleration is a process in which highly computational tasks, like complex image processing, are offloaded to GPU (from a CPU) so that the realtime playback is maintained and the CPU is free to do other tasks. The basic hardware of a GPU has more transistors which take up a lot of data processing when compared to CPU. See full list on handbrake.fr.

News: GPU acceleration of Nvidia NVENC and AMD VCE has been added to HandBrake 1.2.0

Video transcoding used to be a CPU intensive and time-consuming process. Now because of the dramatic increase of generic compute blocks and the improvement of discrete GPU video codec SDK, hardware based video encoding is possible, faster than ever.

Handbrake gpu acceleration mac os

HandBrake also adds GPU acceleration support little by little, which however leads to a few questions that continue to puzzle some of you, like No NVENC in HandBrake, how to enable HandBrake GPU acceleration, etc. We sort out those frequently asked questions about HandBrake GPU accelerated (x265) video encoding and list the answers for you here.

HandBrake Still Runs Slow? HandBrake Alternative Could Speed up DVD/Video Conversion

Handbrake cli gpu

WinXDVD offers the best Handbrake alternative for both DVD ripping and video conversion, achieving up to 5 times faster speed than Handbrake with full GPU acceleration powered by Intel QSV, NVIDIA (NVENC/CUDA), and AMD graphics.

WinX DVD Ripper - Fast rip both homemade and protected DVD to MP4 H.264/H.265. Backup DVD in 5 minutes.
WinX Video Converter - GPU Accelerated 4K UHD Video Converter for converting, compressing and editing 4K/HD videos.

Top 6 Frequently Asked Questions for Handbrake GPU Acceleration

  • Q1: No NVENC or CUDA in HandBrake?
  • Q2: Why Handbrake GPU is using 100% CPU?
  • Q3: Can HandBrake GPU acceleration Be Applied in macOS, Windows or Linux?
  • Q4: How to Enable GPU Based Encoding in Handbrake?
  • Q5: HandBrake CPU or GPU Encoding, Which Is Better?
  • Q6: Use HandBrake Intel QSV or NVEnc Acceleration?
  • Q7: Any Other GPU Accelerated Video Encoder Like HandBrake?

Q1. No NVENC or CUDA in HandBrake?

'Does HandBrake use GPU acceleration? Why are there no NVENC or CUDA hardware-accelerated encoding options in HandBrake?'

Answers:
1. You are using an old version HandBrake. Upgrading to HandBrake 1.2.0 or above may solve the problem. HandBrake 1.1.2 and before only supports Intel QSV. The version 1.2.0 released in Dec. 22, 2018 already added the support for GPU video encoding with Intel QuickSync, Nvidia NVEnc, and AMD VCE. Check Handbrake tutorial here >>

Note: It is reported that Google Chrome will slow down the low-level VideoToolBox framework (Quick Sync Video acceleration tech). This has caused 30% speed loss using Handbrake with Chrome running in the background compared to Safari. If you see the slow downs, you can: 1, close Chrome; 2, disable Handbrake QuickSync; 3, try another free GPU accelerated video encoder like WinX DVD Ripper.

2. Check if your Nvidia GPU supports NVENC or not.

  • Go to the List of Nvidia graphics processing units Wikipedia page.
  • Ctrl + F and put in your graphics card exact name.
  • Then get the corresponding Code name. GPUs in code name staring with GK, GM and GP support NVENC technology, while others do not.

3. Install, reinstall or update your Nvidia graphics card driver.

4. Suppose that you are running, for example an MSI GTX 1070 Gaming X GPU, NVENC should be available. And other programs such as DVDFab or WinX DVD Ripper do allow GPU accelerated video encoding, but HandBrake still doesn't have the option. Try to reboot your computer, download a new setup file from HandBrake official website, and then uninstall and reinstall the freeware to give it one last shot.

Q2. Why Handbrake GPU Encoding is using 100% CPU?

'I was trying to use ENEnc to encode but find that it barely utilizes my GPU.The encoding FPS is also very slow: it's only about ~75fps, while I should be able to achieve ~420 fps using a tool called NVEncC. Also, the CPU was also constantly 100% during encoding, makes me suspect somewhere else in HB's workflow was neckbottled.'

Some users may believe that as Handbrake supports GPU encoding, it should use only a tiny part of CPU and rely most tasks to the GPU. In fact, except the video encoding, other tasks such as the decoding, muxing, filters, etc. are performed by the CPU. So it's normally to see high and even 100% CPU usage during Handbrake GPU encoding.

This is why the Level-3 Hardware Acceleration can deliver a much faster speed. This tech can apply GPU hardware acceleration during the decoding, video processing, and encoding, pushing the whole task by about 5x faster than Handbrake. By far, WinX DVD Ripper is the only free DVD ripper that comes with this function.

Free Download for Mac OS X 10.6 or later

For Windows and Mac only. If you are a mobile user, please click here

Q3. Can HandBrake GPU acceleration Be Applied in macOS, Windows or Linux?

'I am uncertain if I can use handbrake on Mac to rip Blu-ray disks to drop into my iTunes library while capitalizing on my GPU.'

Answers:
1. HandBrake can be running on Linux, Mac and Windows using GPU acceleration, but there are system requirements. Processor needs to be Intel Core 2 Duo, AMD Athlon X2 or better. To be specific:

  • Ubuntu: LTS versions are supported.
  • Mac: macOS 10.10 Yosemite and later is required (64-bit only).
  • Windows: Windows 7 SP 1 or later is required (64-bit only).

Handbrake Gpu Acceleration Machine

2. For your information, HandBrake can't rip Blu-ray discs for DRM reasons, let alone GPU accelerated ripping. Installing libdvdcss can solve part of the copy protection problems of DVD disc.

Q4. How to Enable GPU Based Encoding in Handbrake?

Here we take DVD transcoding as an example. Follow the next steps to configure HandBrake to use GPU acceleration.

Step 1: Go to the official HandBrake download page , download and install HandBrake (1.3.1) for Windows, Mac OS or Linux.

Step 2: Download third-party libdvdcss and drag it to the HandBrake setup file directory. If you skip this step, the reading of encrypted DVDs will crash with error. You can see it from the preview window.

Step 3: Enable HandBrake GPU acceleration

Handbrake Use Gpu Acceleration

  • Insert your DVD disc into the drive and open HandBrake.
  • Click Open Source, select the DVD option to load the content, and then switch to Video tab.
  • In the Video Codec option, choose H.264 (Intel QSV), H.264 (Nvidia NVEnc), H.265 (Intel QSV) or H.265 (Nvidia NVEnc).

Step 4: Choose an output preset or set video parameters by yourself. Remember that there is a tradeoff between speed and quality/size. So make a decision based on your needs.

  • CQ (19-21) is recommended and don't go above 22 RF when ripping a DVD.
  • Choose Same as source for Framerate.
  • Denoise NLMeans filter is very memory intensive, drastically slowing your encodes down.
  • Encoder Level 6 and higher is required for 8K video encoding, while 5-5.2 for 4K video transcoding. Well, HandBrake doesn't support that.

Q5. HandBrake CPU or GPU Encoding, Which Is Better?

'Last year someone asked here if GPU encoding was worth it and was told to stick to CPU encoding. But HandBrake x265 encoding takes too long. CPU or GPU encoding, which should I use?' - from Reddit

Answers:
Generally speaking, the priority of CPU encoding is quality while GPU encoding focuses on speed. Based on our test, HandBrake can do 2-pass 1080p encoding of DVD video with H.265 NVEnc at 500+ fps on GTX 1080. CPU encoding takes two times longer, leaving a ton of GPU power untapped in the process, but outputs file half the size. One more thing: the video codec options are limited when using HandBrake GPU acceleration.

If encoding quality is your primary concern over speed, you can stick to HandBrake CPU encoding. Sometimes the ripping-hour difference between CPU and GPU encoding is not that much. Encoding video into MP4 H.264 is a typical example. For more information, check the following test results. (Test environment [1])

DVD to H.264 - HandBrake CPU vs. GPU Encoding

HandBrake CPU Encoding

HandBrake GPU Encoding

Rip time

19min 22s

17min 54s

Avg. FPS

308

max 509, avg. 357

Output file size

849 MB

1.68 GB

DVD to H.265 - HandBrake CPU vs. GPU Encoding

HandBrake CPU Encoding

HandBrake GPU Encoding

Rip time

33min 14s

17min 55s

Avg. FPS

max 211, avg. 130

max 507, avg. 354

Output file size

619 MB

1.32 GB

Output Quality: HandBrake CPU vs. GPU Encoding

Q6. Use HandBrake QSV or NVEnc Acceleration?

'Which gives better quality? HandBrake QSV encoding or NVEnc acceleration? Let's assume all settings on each type of encode are of approximate same quality output.'

Answers:
It depends. GPU acceleration is realized through CUDA cores before there is a dedicated video encoding units in the graphics card. Back then, GPU was not ideal for video encoding for your final quality suffers. Now HandBrake GPU acceleration mainly uses built-in hardware encoder (i.e. Intel QSV, Nvidia NVENC, etc). Some people firmly believe that x264 > QSV > NVENC from the quality aspect. At least, we don't see any obvious difference in our test.

DVD to H.264 - HandBrake QSV vs. NVENC Encoding

HandBrake QSV Acceleration

HandBrake NVENC Acceleration

Rip time

17min 55s

17min 54s

Avg. FPS

356

357

Output file size

1.26 GB

1.68 GB

DVD to H.265 - HandBrake QSV vs. NVENC Encoding

HandBrake QSV Acceleration

HandBrake NVENC Acceleration

Rip time

19min 31s

17min 55s

Avg. FPS

301

354

Output file size

0.97 GB

1.32 GB

Q7. Any Other GPU Accelerated Video Encoder Like HandBrake

'Are there any other video transcoders like Handbrake that actually has functioning GPU acceleration?'

Answers:
There are some other GPU accelerated DVD rippers and video transcoders. But most of them are paid software. Freeware that supports GPU acceleration like HandBrake includes:

  • WinX DVD Ripper (It is the only one that reaches Level-3 GPU acceleration >)
  • Freemake
  • Staxrip

Besides, HandBrake GPU encoding is far slower than WinX DVD Ripper (Google Chrome can make Handbrake's low-level VideoToolBox framework even slower - about 30%. So you have to shut down Chrome during its transcoding). Grappling with the one-by-one title scanning of copy protected DVDs really takes time. Well, you will just have to keep your fingers crossed for that slow process, or else you may get a crash error. Here is a speed comparison of GPU encoding to MP4 H.264 with HandBrake and WinX DVD Ripper.

Programs

HandBrake

WinX DVD Ripper

QSV

NVENC

QSV

NVENC

Rip time

17min 55s

17min 54s

9min 16s

8min 45s

Avg. FPS

356

357

369

387

Output file size

1.26 GB

1.68 GB

1.22 GB

1.24 GB

Intel GPU usage

38%

0

54%

0

Nvidia GPU usage

1%

5%

5%

11%

Output Quality: HandBrake vs. WinX DVD Ripper

[1] Test Environment

  • Processor: Intel(R) Core(TM) i7-8700K CPU @3.70GHz
  • RAM: 16 GB
  • OS: Windows 10 64-bit
  • GPU 1: Intel(R) UHD Graphics 630
  • GPU 2: NVIDIA GeForce GTX 1080
  • Source DVD: 2h 12min

Free Download WinX DVD Ripper Platinum for Fast-ever DVD Ripping

WinX DVD Ripper Platinum - Rip and digitize homemade, scratched, movie DVDs / folder / ISO image and DVDs with 99 titles - the new DRM encryption adopted by Disney and other DVD distributors, bypass DVD CSS, region code, Sony ARccOS, UOPs, APS, RCE, level-3 hardware accelerated.

By: Maxym Dmytrychenko, Tim Duncan

Download Article

Harnessing Handbrake [PDF 587KB]

Handbrake Gpu Acceleration Mac Os

HandBrake

HandBrake* is a Microsoft Windows* application that takes almost any video file format and modifies it for use on devices like the Apple iPhone* and iPad*, Android* phones/tablets, and others. However, HandBrake has been a CPU-only conversion application. Intel® Quick Sync Video, a HW accelerator, allows you to offload the full decode/filter/encode (collectively termed, transcode) scenario from the CPU to Intel® HD Graphics. Offloading the transcoding to the Intel HD Graphics provides several benefits. First, the transcoding is quicker compared to the traditional CPU-based approach. Also by using the dedicated circuits in the Intel HD graphics you not only get a speed in performance but it also consumes less energy allow you to conserve your battery for other activities. Our goal in this effort was to improve user experience for HandBrake by extending it with support of HW acceleration while running on Intel® architecture.

Introduction

When video content is consumed whether it is on your smartphone, tablet, computer or some other device it most likely has been converted to a format that is best for that particular device. This video conversion process is very similar to when some put audio onto their smartphone, table computer, etc. The process is called transcoding when the source video is decoded, transformed (changing resolution, bitrate, frame rate or applying filters and the encoded (format into a format that is viewable on the consumption device. Transcoding video has traditionally been done in software on the CPU but with the introduction of the Intel 2nd Generation Core Intel now has dedicate circuitry within the processor graphics that allow this process to be hardware accelerated.


Figure 1. HandBrake User Interface

HandBrake is a well-known, open source project. For years it has been used to transcode video from cameras to formats compatible with other devices. It has averaged more than 650,000 downloads per month in the first seven months of 2013 on Sourceforge*.

HandBrake is one of those gems that didn’t show its worth until we needed it. Before Handbrake, we used other applications to convert video files to shareable file types, but we had to use three or four different utilities to get the file from our camera’s .MOV format to the right .MP4 or .AVI format. File sizes were often too large. Handbrake has profiles that support all of these, and customization is possible through personal settings create customized profiles. Pick the target device from the profiles included in Handbrake and you are on your way.

Intel engineers were interested in Handbrake due to their reputation and popularity in the marketplace. We approached their team to see if they wanted to collaborate to find ways to improve execution performance while keeping the user experience where users had come to expect.

We presented a proof of concept project to show how Intel HW acceleration could benefit them. They were intrigued.

When the latest build of HandBrake is installed on 4th generation Intel® Core™ processor-based computers running Windows with Intel HD graphics, HandBrake will display a new option on the video tab for video codec: H.264 (Intel Quick Sync Video).


Figure 2.HandBrake Video Tab showing location of Intel Quick Sync Video Codec

Please note that at the time this article was published, the Intel Quick Sync Video code was only included in the pre-release or beta testing release, a standard process for introducing new functionality into an established product like HandBrake. The executable for these builds can be downloaded at the nightly build link from the download section on the main HandBrake website.

A very active community exists in and around HandBrake, so you can find links for the latest news about the project, tutorials, support, a link for contributions, and more. Some links provided at the end of this article.

What We Did

Initially, Handbrake ran all its processes on the CPU including the transcode steps, the decode step followed by application of filters and finally the encode step. Hardware acceleration did not natively run within the application, so we dissected the internal workings of the program to see if we could have it utilize this feature natively. Additionally, we used our Intel® Media Software Development Kit (Intel® Media SDK) API to understand and work with Intel Quick Sync Video effectively. The Intel and HandBrake teams put our heads together to identify the steps needed to add Intel Quick Sync Video Intel HD Graphics acceleration to the project. This resulted in a list of functions we could start working on, including Intel Quick Sync Video-based H.264 decode/encode and Intel Quick Sync Video-based filters.

Improved Execution Performance When Using Intel Quick Sync Video

While on the CPU, the execution and timing of decode/encode, etc. differed compared to hardware acceleration provided by Intel HD graphics. Since we wanted to achieve the best performance possible, we needed to adjust internal pipelines, queues, and their corresponding sizes. To improve performance in this area, we adopted test/change approach to achieve the best possible results with Intel® Quick Sync Video in HandBrake. Currently, our experiments using the H.264 Intel® Quick Sync Video codec show Intel HD graphics on Microsoft Windows* 8 utilization approaching 100% while the CPU utilization remains under 20%, allowing for a full speed transcode since the dedicated Intel HD graphics is not affected by the other computing tasks the CPU must always attend to.

More Benefits from Tighter Intel Quick Sync Video Interaction

This project started with Handbrake, a fully functional and successful application. The application’s existing video processing filter operations are applied and completed between the decode and encode processes. Since HandBrake’s existing filters are excellent from quality and performance perspectives, the filters are executed by the CPU and not the Intel Quick Sync Video-enabled Intel® HD Graphics. Intel Quick Sync Video offers many of its own native filters through Intel Media SDK. Some Intel Quick Sync Video filters duplicate the functions of the current HandBrake filters, and in a majority of the cases, had the potential to be faster than the CPU based filters already in HandBrake. We completed several rounds of testing/validation to understand and choose which of these duplicate filters were better.

Final performance analysis

What we are seeing in our limited testing is 3-6 times faster transcoding using the Intel Quick Sync Video-based H.264 codec versus the CPU-only codec. HandBrake has done a great job taking full advantage of the Intel Quick Sync Video capabilities. It was hard to push all to the limits, but it was fun and interesting to see new issue(s), corner case(s), and make substantive contributions to this product.

Handbrake Gpu Acceleration Machinery

Conclusion

The Intel Media SDK API, its documentation, and tools like Intel® Graphics Performance Analyzer were useful when identifying, measuring, and repairing several issues. We found the support of the HandBrake team invaluable. They were very open-minded and willing to discuss each new idea. Also, the Intel SDK and Visual Products teams’ support was required and appreciated for this challenging project. Because HandBrake is an open source project that anyone can see and study the implementation details and source code, we hope others will find it a little easier to add hardware acceleration with Intel Quick Start Video through the use of Intel HD graphics.

References

HandBrake Links:
Homepage - http://handbrake.fr/
Download page - http://handbrake.fr/downloads.php
Nightly builds page - http://handbrake.fr/nightly.php (executable w/Intel Quick Sync Video options)
Intel Quick Sync Video Source Browser - https://trac.handbrake.fr/browser/branches/qsv

Handbrake Cli Gpu

Intel Links:
Intel® Media SDK 2013 Detail - http://intel.com/software/mediasdk
Intel® Graphics Performance Analyzer - http://www.intel.com/software/gpa
Intel Quick Sync Video Detail – Direct Link

About the Authors:

Maxym Dmytrychenko is a Senior Application Engineer working in Europe. He focuses on video processing and HW acceleration on IA and has worked in this area for several years with worldwide-known ISVs.

Tim Duncan is an Intel Engineer and is described by friends as “Mr. Gidget-Gadget.” Currently helping developers integrate technology into solutions, Tim has decades of industry experience, from chip manufacturing to systems integration. Find him on the Intel® Developer Zone as Tim Duncan (Intel)

Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
Copyright © 2013 Intel Corporation. All rights reserved.
*Other names and brands may be claimed as the property of others.