GStreamer plugins missing: MPEG-4 Video decoder (Subtitle Editor

I installed Subtitle Editor (package subtitleeditor, added to configuration.nix), but when I try to open an MPEG-4 video file, I get the error in the title. I added these one by one to my configuration.nix, but no help:

gst_all_1.gst-libav
gst_all_1.gstreamer
gst_all_1.gstreamermm
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly

What am I missing?

I think it will only use the packages here: https://github.com/NixOS/nixpkgs/blob/5d6004a01d1bf3034d8065fc604667185f25aad9/pkgs/applications/video/subtitleeditor/default.nix#L29

You could try overriding that if you know which package is needed.

1 Like

Thanks, I will try it. Do you know why the bad and ugly plugins were not included? Do they include some non-free stuff and this is some hygiene-related decision?

I got it working with this:

nixpkgs.config = {
  allowUnfree = true;

  packageOverrides = super: let self = super.pkgs; in {
    subtitleeditor = super.subtitleeditor.overrideAttrs (attrs: {
      buildInputs = attrs.buildInputs ++ [
        self.gst_all_1.gst-plugins-bad
        self.gst_all_1.gst-plugins-ugly
        self.gst_all_1.gst-libav
      ];
    });
  };
};
1 Like

I don’t know why, but yes my guess would be non-free as the reason.