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: enable subtitles filter #50996

Closed
wants to merge 1 commit into from
Closed

ffmpeg: enable subtitles filter #50996

wants to merge 1 commit into from

Conversation

mroi
Copy link
Contributor

@mroi mroi commented Nov 24, 2018

FFmpeg does not autodetect libass, it has to be enabled manually. Doing so enables for example the subtitles filter. Interestingly, libass is already a build dependency.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

libass has always been a build dependency of this package, but ffmpeg does not autodetect it;
enabling it manually activates the subtitles plugin in libavfilter
@mroi
Copy link
Contributor Author

mroi commented Nov 24, 2018

The change in closure size on macOS is from 101200424 to 114630048.

@infinisil
Copy link
Member

@GrahamcOfBorg build ffmpeg

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: ffmpeg

Partial log (click to expand)

gzipping man pages under /nix/store/5l2c7jf2b873xynv4dfc87wkgn9xwdmf-ffmpeg-3.4.4-man/share/man/
strip is /nix/store/6dpnd5aniypn8124mmy8f88s4mq2zl07-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/5l2c7jf2b873xynv4dfc87wkgn9xwdmf-ffmpeg-3.4.4-man
checking for references to /build in /nix/store/5l2c7jf2b873xynv4dfc87wkgn9xwdmf-ffmpeg-3.4.4-man...
strip is /nix/store/6dpnd5aniypn8124mmy8f88s4mq2zl07-binutils-2.30/bin/strip
Moving /nix/store/9baan39nn6ky17l922irhcgdx48ivq8s-ffmpeg-3.4.4/bin to /nix/store/1zkrlc58l2i6csvv30ilmakaw8fn50dw-ffmpeg-3.4.4-bin/bin
rmdir: failed to remove '/nix/store/9baan39nn6ky17l922irhcgdx48ivq8s-ffmpeg-3.4.4': Directory not empty
Moving /nix/store/9baan39nn6ky17l922irhcgdx48ivq8s-ffmpeg-3.4.4/share/ffmpeg/examples to /nix/store/cq3xa5agrm3h3362y7fq706dz3rk13if-ffmpeg-3.4.4-doc/share/ffmpeg/examples
rmdir: failed to remove '/nix/store/9baan39nn6ky17l922irhcgdx48ivq8s-ffmpeg-3.4.4/share/ffmpeg': Directory not empty
/nix/store/1zkrlc58l2i6csvv30ilmakaw8fn50dw-ffmpeg-3.4.4-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: ffmpeg

Partial log (click to expand)

find: '/nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc': No such file or directory
find: '/nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc': No such file or directory
find: '/nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc': No such file or directory
find: '/nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc': No such file or directory
find: '/nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc': No such file or directory
Moving /nix/store/2liy6mwcmj2r2w0f27xvgmrvij5f81g4-ffmpeg-3.4.4/bin to /nix/store/ascahv59ah3zxxgzslznw5s6wgjhz527-ffmpeg-3.4.4-bin/bin
rmdir: failed to remove '/nix/store/2liy6mwcmj2r2w0f27xvgmrvij5f81g4-ffmpeg-3.4.4': Directory not empty
Moving /nix/store/2liy6mwcmj2r2w0f27xvgmrvij5f81g4-ffmpeg-3.4.4/share/ffmpeg/examples to /nix/store/m5bwkqpb5h8r8aql1xivfak88q2ifwnr-ffmpeg-3.4.4-doc/share/ffmpeg/examples
rmdir: failed to remove '/nix/store/2liy6mwcmj2r2w0f27xvgmrvij5f81g4-ffmpeg-3.4.4/share/ffmpeg': Directory not empty
/nix/store/ascahv59ah3zxxgzslznw5s6wgjhz527-ffmpeg-3.4.4-bin

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ffmpeg

Partial log (click to expand)

gzipping man pages under /nix/store/1g71pfmbx06vfh1d0m0mpncxfqnaj8jd-ffmpeg-3.4.4-man/share/man/
strip is /nix/store/rpbg8gmqxhz8g61p1plz5d2srs84pvmv-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/1g71pfmbx06vfh1d0m0mpncxfqnaj8jd-ffmpeg-3.4.4-man
checking for references to /build in /nix/store/1g71pfmbx06vfh1d0m0mpncxfqnaj8jd-ffmpeg-3.4.4-man...
strip is /nix/store/rpbg8gmqxhz8g61p1plz5d2srs84pvmv-binutils-2.30/bin/strip
Moving /nix/store/h92d2y8mx65ihnq7c9zv6gqv0kvmhfai-ffmpeg-3.4.4/bin to /nix/store/mn6y0wjn8s5srfn22mfnwkldf26qis3c-ffmpeg-3.4.4-bin/bin
rmdir: failed to remove '/nix/store/h92d2y8mx65ihnq7c9zv6gqv0kvmhfai-ffmpeg-3.4.4': Directory not empty
Moving /nix/store/h92d2y8mx65ihnq7c9zv6gqv0kvmhfai-ffmpeg-3.4.4/share/ffmpeg/examples to /nix/store/qaynzwmxzs4ncq28v4sknbidirm4i0wh-ffmpeg-3.4.4-doc/share/ffmpeg/examples
rmdir: failed to remove '/nix/store/h92d2y8mx65ihnq7c9zv6gqv0kvmhfai-ffmpeg-3.4.4/share/ffmpeg': Directory not empty
/nix/store/mn6y0wjn8s5srfn22mfnwkldf26qis3c-ffmpeg-3.4.4-bin

@mroi
Copy link
Contributor Author

mroi commented Nov 25, 2018

I just realised that I probably got the ffmpeg packaging philosophy wrong. The ffmpeg-full package already supports the subtitles filter, so maybe the correct fix here would be to remove libass from the build dependencies of the minimal ffmpeg packages instead of enabling its use.

I just tried this and ffmpeg als builds correctly when removing libass. So this is now more of a design decision.

@mroi
Copy link
Contributor Author

mroi commented Dec 4, 2018

Since this pull request mostly stems from my personal misunderstanding of the ffmpeg packaging, I am going to close this. The ffmpeg-full package suits my needs.

@mroi mroi closed this Dec 4, 2018
@mroi mroi deleted the patch-1 branch December 4, 2018 10:13
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