How to encode hardware-accelerated h264 video in Shotcut with Intel GPU Quicksync

Shotcut is a great open source non-linear video editor. Its default configuration however does not allow to render video on Intel GPU (such as Intel HD 3000, HD 4000 and newer) using Quick sync technology (hardware acceleration allowing realtime encoding of fullHD video to h264 or on newer cards even hevc a.k.a. h265. I found a way how to hack Shotcut by replacing its ffmpeg with a build that is compiled with sqv support (codecs h264_sqv, hevc_sqv etc.) and then finding the right additional parameters to encode the video. This quick guide will show you how I did it on an older laptop with Windows 10 64bit and 3rd generation of Intel i5-Mobile CPU with Intel HD4000 graphics.

Step 0: Make sure you have the Intel GPU drivers installed and working.

Step 1: Download and install Shotcut 64bit version build.

Step 2: Download a Zeranoe ffmpeg build (I used stable version 3.4, Windows-64 build, Linking Shared).

Step 3: Unpack the ffmpeg build and from Windows Commander copy all the files from the bin directory (avcodec-57.dll and other dlls, and ffmpeg.exe and other exes) to the C:\Program Files\Shotcut directory, replacing all the files originally supplied with Shotcut installation.

Step 4: Open Shotcut and check in Export tab in Codecs that now you see additional entries such as mpeg2_qsv, h264_qsv and hevc_qsv. These are codecs that utilize the Intel GPU for encoding!

Step 5: Create a custom export profile. Start with clicking on the stock profile e.g. H.264 Main profile that populates the values somehow. In Video tab enter the resolution 1920×1080, 30fps etc., uncheck Parallel processing, in Codec change Codec to h264_qsv, but change Quality to a much lower value becase Intel Quicksync interpretes these values completely differently than x264. I suggest you to start with Quality 25 and get lower later. Or pick a constant bitrate of 8-16 Mbit.

Important: In Other, enter these additional values:


Step 6: Save preset

Step 7: Export using this preset! Enjoy!



Pracuji jako ajťák a grafik na volné noze, zejména ale pro brněnskou firmičku vyrábějící ekodrogerii. Dále působím v brněnském systému místní směny Rozleťse, Českém zahrádkářském svazu, České psychedelické společnosti, spolku Archetypal a Mezinárodní komunitě dzogčhenu. Asi mě baví kumulovat různé funkce a přidávat si spoustu práce. Lidi o mě říkají, že jsem multifunkční, což je asi trochu pravda :-)

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *