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: set explicit --enable-libass #92839

Merged
merged 1 commit into from Aug 15, 2020
Merged

Conversation

dguibert
Copy link
Member

@dguibert dguibert commented Jul 10, 2020

needed for subtitles filter.

Motivation for this change
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.

needed for subtitles filter.
@doronbehar
Copy link
Contributor

Maybe ffmpeg-full will help you?

@dguibert
Copy link
Member Author

dguibert commented Jul 13, 2020

Yes ffmpeg-full could be used.

But libass is already a dependency of ffmpeg but without this patch, it can't draw subtitles on top of input videos using the libass library.

@doronbehar
Copy link
Contributor

So you are saying that only adding the dependency to the inputs:

buildInputs = [
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers
] ++ optionals openglSupport [ libGL libGLU ]

Doesn't make ffmpeg compile with this feature, unless the --enable-libass flag is explicitly given?

@dguibert
Copy link
Member Author

dguibert commented Jul 22, 2020

Doesn't make ffmpeg compile with this feature, unless the --enable-libass flag is explicitly given?

Yes exactly. libass is only included in the closure of the ffmpeg built by this patch (second store path, first one is built on f70a548).

$ grep -r libass /nix/store/31f7rphfsgr936clj6cx9msym539x69f-ffmpeg-4.3-bin /nix/store/g1i51f0pdqvbsaahhlvi2y39mlfx8l8b-ffmpeg-4.3-bin
Binary file /nix/store/g1i51f0pdqvbsaahhlvi2y39mlfx8l8b-ffmpeg-4.3-bin/bin/ffmpeg matches
Binary file /nix/store/g1i51f0pdqvbsaahhlvi2y39mlfx8l8b-ffmpeg-4.3-bin/bin/ffprobe matches

The size has a little increased

$ nix path-info -Sh /nix/store/31f7rphfsgr936clj6cx9msym539x69f-ffmpeg-4.3-bin /nix/store/g1i51f0pdqvbsaahhlvi2y39mlfx8l8b-ffmpeg-4.3-bin

/nix/store/31f7rphfsgr936clj6cx9msym539x69f-ffmpeg-4.3-bin       149.5M
/nix/store/g1i51f0pdqvbsaahhlvi2y39mlfx8l8b-ffmpeg-4.3-bin       152.1M

@FRidh FRidh changed the base branch from master to staging August 15, 2020 06:53
@FRidh FRidh merged commit 1b54b2a into NixOS:staging Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants