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

pympress: fix gstreamer support #319525

Merged
merged 1 commit into from
Jun 16, 2024
Merged

Conversation

leon-erd
Copy link
Contributor

Description of changes

In the current version of this package playback support with gstreamer is broken because dependencies are missing.
I stumbled across this when I tried to embed a video in my presentation and running pympress on wayland. As it turns out VLC does not support embedded videos on wayland and opens the video in a new window (see Cimbali/pympress#320). When turning off vlc in the pympress config file videos cannot be played at all because gstreamer does not work.
This PR adds the missing dependencies.
The minimal additional dependencies I need to be able to play an embedded .mp4 video with gstreamer are:

gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-good.override {gtkSupport = true;}

but I think adding full gstreamer support (video/audio hardware acceleration, additional codecs) can't be a bad idea. Let me know what you think!

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@tbenst @jtojnar @drupol

Add a 👍 reaction to pull requests you find important.

Comment on lines +35 to +41
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
(gst_all_1.gst-plugins-good.override {gtkSupport = true;})
gst_all_1.gst-libav
gst_all_1.gst-vaapi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
(gst_all_1.gst-plugins-good.override {gtkSupport = true;})
gst_all_1.gst-libav
gst_all_1.gst-vaapi
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
(gst_all_1.gst-plugins-good.override {gtkSupport = true;})

That's what I take from the upstream docs https://github.com/Cimbali/pympress/blob/fc5ebfc79b5255ea801e4935aaa33f7bcadc595d/README.md#media-and-autoplay

I am not sure if the others are even used or loaded on demand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the video playback is completely handled by gstreamer so I would assume the instance of gstreamer is independent from the rest of the package and can access all available plugins/extensions.
In the upstream docs it says: "and plugins gstreamer-good/-bad/-ugly based on which codecs you need" so why remove gst_all_1.gst-plugins-ugly?
I have taken the example from the wiki https://nixos.wiki/wiki/GStreamer for full gstreamer support.

@drupol drupol merged commit 53d7fc2 into NixOS:master Jun 16, 2024
28 checks passed
@drupol
Copy link
Contributor

drupol commented Jun 16, 2024

Merged it, no answer from Sandro.

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

4 participants