lol

handbrake: build against ffmpeg with custom patches

The Handbrake project carries a set of ffmpeg patches required for
things like proper subtitle timing.

See: https://github.com/HandBrake/HandBrake/issues/4029

authored by

Anthony Cowley and committed by
Peter Hoeg
9c85db3a 9c341e1b

+46 -1
+46 -1
pkgs/applications/video/handbrake/default.nix
··· 93 sha256 = "1kk11zl1mk37d4cvbc75gfndmma7vy3vkp4gmkyl92kiz6zadhyy"; 94 }; 95 96 versionFile = writeText "version.txt" '' 97 BRANCH=${versions.majorMinor version}.x 98 DATE=1970-01-01 00:00:01 +0000 ··· 152 buildInputs = [ 153 a52dec 154 dav1d 155 - ffmpeg-full 156 fontconfig 157 freetype 158 fribidi
··· 93 sha256 = "1kk11zl1mk37d4cvbc75gfndmma7vy3vkp4gmkyl92kiz6zadhyy"; 94 }; 95 96 + # Handbrake maintains a set of ffmpeg patches. In particular, these 97 + # patches are required for subtitle timing to work correctly. See: 98 + # https://github.com/HandBrake/HandBrake/issues/4029 99 + ffmpeg-version = "4.4.1"; 100 + ffmpeg-hb = ffmpeg-full.overrideAttrs (old: { 101 + version = ffmpeg-version; 102 + src = fetchurl { 103 + url = "https://www.ffmpeg.org/releases/ffmpeg-${ffmpeg-version}.tar.bz2"; 104 + hash = "sha256-j8nyCsXtlRFanihWR63Q7t1cwamKA5raFMEyRS+YrEI="; 105 + }; 106 + patches = old.patches or [] ++ [ 107 + "${src}/contrib/ffmpeg/A01-qsv-scale-fix-green-stripes.patch" 108 + "${src}/contrib/ffmpeg/A02-qsv-interpolation.patch" 109 + "${src}/contrib/ffmpeg/A03-qsv-dx11-ffmpeg44.patch" 110 + "${src}/contrib/ffmpeg/A04-configure-ensure-the-right-libmfx-version-is-used-wh.patch" 111 + "${src}/contrib/ffmpeg/A05-qsv-add-includedir-mfx-to-the-search-path-for-old-ve.patch" 112 + "${src}/contrib/ffmpeg/A06-qsv-load-user-plugin-for-MFX_VERSION-2.0.patch" 113 + "${src}/contrib/ffmpeg/A07-qsv-build-audio-related-code-when-MFX_VERSION-2.0.patch" 114 + "${src}/contrib/ffmpeg/A08-qsvenc-don-t-support-multi-frame-encode-when-MFX_VER.patch" 115 + "${src}/contrib/ffmpeg/A09-qsvenc-don-t-support-MFX_RATECONTROL_LA_EXT-when-MFX.patch" 116 + "${src}/contrib/ffmpeg/A10-qsv-don-t-support-OPAQUE-memory-when-MFX_VERSION-2.0.patch" 117 + "${src}/contrib/ffmpeg/A11-qsv-opaque-deinterlace.patch" 118 + "${src}/contrib/ffmpeg/A12-qsv-opaque-vpp.patch" 119 + "${src}/contrib/ffmpeg/A13-qsv-opaque-hwcontext_qsv.patch" 120 + "${src}/contrib/ffmpeg/A14-configure-check-mfxdefs.h-instead-of-mfxvp9.h-for-MF.patch" 121 + "${src}/contrib/ffmpeg/A15-configure-allow-user-to-build-FFmpeg-against-oneVPL.patch" 122 + "${src}/contrib/ffmpeg/A16-qsv-add-macro-QSV_ONEVPL-for-the-oneVPL-SDK.patch" 123 + "${src}/contrib/ffmpeg/A17-qsv-use-a-new-method-to-create-mfx-session-when-usin.patch" 124 + "${src}/contrib/ffmpeg/A18-qsv-new-method-hwcontext_qsv.patch" 125 + "${src}/contrib/ffmpeg/A19-qsv-fix-session-for-d3d11-device.patch" 126 + "${src}/contrib/ffmpeg/A20-mov-read-name-track-tag-written-by-movenc.patch" 127 + "${src}/contrib/ffmpeg/A21-movenc-write-3gpp-track-titl-tag.patch" 128 + "${src}/contrib/ffmpeg/A22-mov-read-3gpp-udta-tags.patch" 129 + "${src}/contrib/ffmpeg/A23-movenc-write-3gpp-track-names-tags-for-all-available.patch" 130 + "${src}/contrib/ffmpeg/A24-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch" 131 + "${src}/contrib/ffmpeg/A25-dvdsubdec-fix-processing-of-partial-packets.patch" 132 + "${src}/contrib/ffmpeg/A26-ccaption_dec-return-number-of-bytes-used.patch" 133 + "${src}/contrib/ffmpeg/A27-dvdsubdec-return-number-of-bytes-used.patch" 134 + "${src}/contrib/ffmpeg/A28-dvdsubdec-use-pts-of-initial-packet.patch" 135 + "${src}/contrib/ffmpeg/A29-matroskaenc-aac-extradata-updated.patch" 136 + "${src}/contrib/ffmpeg/A30-ccaption_dec-fix-pts-in-real_time-mode.patch" 137 + "${src}/contrib/ffmpeg/A32-qsv-fix-decode-10bit-hdr.patch" 138 + ]; 139 + }); 140 + 141 versionFile = writeText "version.txt" '' 142 BRANCH=${versions.majorMinor version}.x 143 DATE=1970-01-01 00:00:01 +0000 ··· 197 buildInputs = [ 198 a52dec 199 dav1d 200 + ffmpeg-hb 201 fontconfig 202 freetype 203 fribidi