Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg-full: re-enable encoders on macOS #105999

Merged
merged 1 commit into from Dec 5, 2020

Conversation

midchildan
Copy link
Member

Motivation for this change

A number of encoders for ffmpeg are currently disabled on macOS. Since many of them were disabled back in 2015, I checked if we can re-add some them back. This PR re-adds encoders that successfully compiled with ffmpeg.

033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12787)   ffmpeg-full = callPackage ../development/libraries/ffmpeg-full {
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12788)     # The following need to be fixed on Darwin
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12789)     frei0r = if stdenv.isDarwin then null else frei0r;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12790)     game-music-emu = if stdenv.isDarwin then null else game-music-emu;
430c8520b2c1 (Nicolas Dudebout          2015-06-27 13:20:56 -0400 12791)     libjack2 = if stdenv.isDarwin then null else libjack2;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12792)     libmodplug = if stdenv.isDarwin then null else libmodplug;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12793)     openal = if stdenv.isDarwin then null else openal;
410c30077c01 (midchildan                2019-03-11 16:10:56 +0900 12794)     libmfx = if stdenv.isDarwin then null else intel-media-sdk;
b07929b0a389 (William A. Kennington III 2015-05-27 12:42:15 -0700 12795)     libpulseaudio = if stdenv.isDarwin then null else libpulseaudio;
2aff61f6092b (Okina Matara              2020-11-18 20:42:50 -0600 12796)     rav1e = if stdenv.isDarwin then null else rav1e;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12797)     samba = if stdenv.isDarwin then null else samba;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12798)     vid-stab = if stdenv.isDarwin then null else vid-stab;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12799)     x265 = if stdenv.isDarwin then null else x265;
033472c136ee (codyopel                  2015-04-07 03:34:27 -0400 12800)     xavs = if stdenv.isDarwin then null else xavs;

I also did a quick check with the resulting ffmpeg binary and was successfully able to transcode a video using the x265 encoder.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Package closure size
nix path-info -S /nix/store/x4xnib86wvlhjq1lsxsqh644mh4cmd8a-ffmpeg-full-4.3.1  # before
/nix/store/x4xnib86wvlhjq1lsxsqh644mh4cmd8a-ffmpeg-full-4.3.1	  198358600nix path-info -S "$(nix-build --no-out-link -A ffmpeg-full)"                      # after
/nix/store/bhz2qf4ngbjv4f8xh4yacvbaqch9nhn4-ffmpeg-full-4.3.1	  246738648

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Dec 5, 2020
@ofborg ofborg bot requested a review from codyopel December 5, 2020 17:20
@marsam marsam merged commit 30fbc30 into NixOS:master Dec 5, 2020
@midchildan midchildan deleted the feat/ffmpeg-darwin-x265 branch December 6, 2020 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants