Merge pull request #212306 from laalsaas/handbrake
Fixes https://github.com/NixOS/nixpkgs/issues/211297
This commit is contained in:
commit
13ed718489
2 changed files with 180 additions and 177 deletions
|
@ -25,7 +25,7 @@
|
|||
, numactl
|
||||
, writeText
|
||||
# Processing, video codecs, containers
|
||||
, ffmpeg-full
|
||||
, ffmpeg_5-full
|
||||
, nv-codec-headers
|
||||
, libogg
|
||||
, x264
|
||||
|
@ -34,6 +34,7 @@
|
|||
, libtheora
|
||||
, dav1d
|
||||
, zimg
|
||||
, svt-av1
|
||||
# Codecs, audio
|
||||
, libopus
|
||||
, lame
|
||||
|
@ -84,57 +85,55 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "1.5.1";
|
||||
version = "1.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HandBrake";
|
||||
repo = "HandBrake";
|
||||
rev = version;
|
||||
sha256 = "1kk11zl1mk37d4cvbc75gfndmma7vy3vkp4gmkyl92kiz6zadhyy";
|
||||
sha256 = "sha256-0MJ1inMNA6s8l2S0wnpM2c7FxOoOHxs9u4E/rgKfjJo=";
|
||||
};
|
||||
|
||||
# Handbrake maintains a set of ffmpeg patches. In particular, these
|
||||
# patches are required for subtitle timing to work correctly. See:
|
||||
# https://github.com/HandBrake/HandBrake/issues/4029
|
||||
ffmpeg-version = "4.4.1";
|
||||
ffmpeg-hb = ffmpeg-full.overrideAttrs (old: {
|
||||
ffmpeg-version = "5.1.1";
|
||||
ffmpeg-hb = ffmpeg_5-full.overrideAttrs (old: {
|
||||
version = ffmpeg-version;
|
||||
src = fetchurl {
|
||||
url = "https://www.ffmpeg.org/releases/ffmpeg-${ffmpeg-version}.tar.bz2";
|
||||
hash = "sha256-j8nyCsXtlRFanihWR63Q7t1cwamKA5raFMEyRS+YrEI=";
|
||||
hash = "sha256-zQ4W+QNCEmbVzN3t97g7nldUrvS596fwbOnkyALwVFs=";
|
||||
};
|
||||
patches = old.patches or [] ++ [
|
||||
"${src}/contrib/ffmpeg/A01-qsv-scale-fix-green-stripes.patch"
|
||||
"${src}/contrib/ffmpeg/A02-qsv-interpolation.patch"
|
||||
"${src}/contrib/ffmpeg/A03-qsv-dx11-ffmpeg44.patch"
|
||||
"${src}/contrib/ffmpeg/A04-configure-ensure-the-right-libmfx-version-is-used-wh.patch"
|
||||
"${src}/contrib/ffmpeg/A05-qsv-add-includedir-mfx-to-the-search-path-for-old-ve.patch"
|
||||
"${src}/contrib/ffmpeg/A06-qsv-load-user-plugin-for-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A07-qsv-build-audio-related-code-when-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A08-qsvenc-don-t-support-multi-frame-encode-when-MFX_VER.patch"
|
||||
"${src}/contrib/ffmpeg/A09-qsvenc-don-t-support-MFX_RATECONTROL_LA_EXT-when-MFX.patch"
|
||||
"${src}/contrib/ffmpeg/A10-qsv-don-t-support-OPAQUE-memory-when-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A11-qsv-opaque-deinterlace.patch"
|
||||
"${src}/contrib/ffmpeg/A12-qsv-opaque-vpp.patch"
|
||||
"${src}/contrib/ffmpeg/A13-qsv-opaque-hwcontext_qsv.patch"
|
||||
"${src}/contrib/ffmpeg/A14-configure-check-mfxdefs.h-instead-of-mfxvp9.h-for-MF.patch"
|
||||
"${src}/contrib/ffmpeg/A15-configure-allow-user-to-build-FFmpeg-against-oneVPL.patch"
|
||||
"${src}/contrib/ffmpeg/A16-qsv-add-macro-QSV_ONEVPL-for-the-oneVPL-SDK.patch"
|
||||
"${src}/contrib/ffmpeg/A17-qsv-use-a-new-method-to-create-mfx-session-when-usin.patch"
|
||||
"${src}/contrib/ffmpeg/A18-qsv-new-method-hwcontext_qsv.patch"
|
||||
"${src}/contrib/ffmpeg/A19-qsv-fix-session-for-d3d11-device.patch"
|
||||
"${src}/contrib/ffmpeg/A20-mov-read-name-track-tag-written-by-movenc.patch"
|
||||
"${src}/contrib/ffmpeg/A21-movenc-write-3gpp-track-titl-tag.patch"
|
||||
"${src}/contrib/ffmpeg/A22-mov-read-3gpp-udta-tags.patch"
|
||||
"${src}/contrib/ffmpeg/A23-movenc-write-3gpp-track-names-tags-for-all-available.patch"
|
||||
"${src}/contrib/ffmpeg/A24-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch"
|
||||
"${src}/contrib/ffmpeg/A25-dvdsubdec-fix-processing-of-partial-packets.patch"
|
||||
"${src}/contrib/ffmpeg/A26-ccaption_dec-return-number-of-bytes-used.patch"
|
||||
"${src}/contrib/ffmpeg/A27-dvdsubdec-return-number-of-bytes-used.patch"
|
||||
"${src}/contrib/ffmpeg/A28-dvdsubdec-use-pts-of-initial-packet.patch"
|
||||
"${src}/contrib/ffmpeg/A29-matroskaenc-aac-extradata-updated.patch"
|
||||
"${src}/contrib/ffmpeg/A30-ccaption_dec-fix-pts-in-real_time-mode.patch"
|
||||
"${src}/contrib/ffmpeg/A32-qsv-fix-decode-10bit-hdr.patch"
|
||||
patches = old.patches or [ ] ++ [
|
||||
"${src}/contrib/ffmpeg/A01-qsv-libavfilter-qsvvpp-change-the-output-frame-s-width-a.patch"
|
||||
"${src}/contrib/ffmpeg/A02-qsv-configure-ensure-enable-libmfx-uses-libmfx-1.x.patch"
|
||||
"${src}/contrib/ffmpeg/A03-qsv-configure-fix-the-check-for-MFX_CODEC_VP9.patch"
|
||||
"${src}/contrib/ffmpeg/A04-qsv-remove-mfx-prefix-from-mfx-headers.patch"
|
||||
"${src}/contrib/ffmpeg/A05-qsv-load-user-plugin-for-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A06-qsv-build-audio-related-code-when-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A07-qsvenc-support-multi-frame-encode-when-MFX_VERSION-2.patch"
|
||||
"${src}/contrib/ffmpeg/A08-qsvenc-support-MFX_RATECONTROL_LA_EXT-when-MFX_VERSI.patch"
|
||||
"${src}/contrib/ffmpeg/A09-qsv-support-OPAQUE-memory-when-MFX_VERSION-2.0.patch"
|
||||
"${src}/contrib/ffmpeg/A10-qsv-configure-add-enable-libvpl-option.patch"
|
||||
"${src}/contrib/ffmpeg/A11-qsv-use-a-new-method-to-create-mfx-session-when-usin.patch"
|
||||
"${src}/contrib/ffmpeg/A12-qsv-fix-decode-10bit-hdr.patch"
|
||||
"${src}/contrib/ffmpeg/A13-mov-read-name-track-tag-written-by-movenc.patch"
|
||||
"${src}/contrib/ffmpeg/A14-movenc-write-3gpp-track-titl-tag.patch"
|
||||
"${src}/contrib/ffmpeg/A15-mov-read-3gpp-udta-tags.patch"
|
||||
"${src}/contrib/ffmpeg/A16-movenc-write-3gpp-track-names-tags-for-all-available.patch"
|
||||
"${src}/contrib/ffmpeg/A17-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch"
|
||||
"${src}/contrib/ffmpeg/A18-dvdsubdec-fix-processing-of-partial-packets.patch"
|
||||
"${src}/contrib/ffmpeg/A19-ccaption_dec-return-number-of-bytes-used.patch"
|
||||
"${src}/contrib/ffmpeg/A20-dvdsubdec-return-number-of-bytes-used.patch"
|
||||
"${src}/contrib/ffmpeg/A21-dvdsubdec-use-pts-of-initial-packet.patch"
|
||||
"${src}/contrib/ffmpeg/A22-matroskaenc-aac-extradata-updated.patch"
|
||||
"${src}/contrib/ffmpeg/A23-ccaption_dec-fix-pts-in-real_time-mode.patch"
|
||||
"${src}/contrib/ffmpeg/A24-fix-eac3-dowmix.patch"
|
||||
"${src}/contrib/ffmpeg/A25-enable-truehd-pass.patch"
|
||||
"${src}/contrib/ffmpeg/A26-Update-the-min-version-to-1.4.23.0-for-AMF-SDK.patch"
|
||||
"${src}/contrib/ffmpeg/A27-avcodec-amfenc-Fixes-the-color-information-in-the-ou.patch"
|
||||
"${src}/contrib/ffmpeg/A28-avcodec-amfenc-HDR-metadata.patch"
|
||||
"${src}/contrib/ffmpeg/A30-svt-av1-backports.patch"
|
||||
];
|
||||
});
|
||||
|
||||
|
@ -151,7 +150,8 @@ let
|
|||
inherit (lib) optional optionals optionalString versions;
|
||||
|
||||
in
|
||||
let self = stdenv.mkDerivation rec {
|
||||
let
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "handbrake";
|
||||
inherit version src;
|
||||
|
||||
|
@ -219,6 +219,7 @@ let self = stdenv.mkDerivation rec {
|
|||
libvpx
|
||||
libxml2
|
||||
speex
|
||||
svt-av1
|
||||
x264
|
||||
x265
|
||||
xz
|
||||
|
@ -294,5 +295,6 @@ let self = stdenv.mkDerivation rec {
|
|||
platforms = with platforms; unix;
|
||||
broken = stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13";
|
||||
};
|
||||
};
|
||||
in self
|
||||
};
|
||||
in
|
||||
self
|
||||
|
|
|
@ -43,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
license = with licenses; [ aom bsd3 ];
|
||||
maintainers = with maintainers; [ Madouura ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isAarch64; # undefined reference to `cpuinfo_arm_linux_init'
|
||||
# error: use of undeclared identifier 'kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange'
|
||||
broken = stdenv.isAarch64 && stdenv.isDarwin;
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue