Jump to content

MPV: Difference between revisions

945 bytes removed ,  19 June
shorten mpv override flags, merge "mpv scripts" section into configuration section
(let's not promote nix-env anymore in 2024)
(shorten mpv override flags, merge "mpv scripts" section into configuration section)
Line 42: Line 42:
       mpv = pkgs.mpv-unwrapped.override {
       mpv = pkgs.mpv-unwrapped.override {
         waylandSupport = true;
         waylandSupport = true;
         x11Support = false;
         # To find more scripts run this in a terminal: nix search nixpkgs mpvScripts
        cddaSupport = false;
         # The scripts are defined in the following Nixpkgs directory: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts
        vulkanSupport = false;
         scripts = with pkgs.mpvScripts; [
        drmSupport = false;
          uosc
        archiveSupport = false;
          sponsorblock
        bluraySupport = true;
         ];
        bs2bSupport = false;
         # Find more override options in the expression:
        cacaSupport = false;
         # https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/mpv/default.nix
         cmsSupport = false;
        dvdnavSupport = false;
        dvbinSupport = false;
         jackaudioSupport = false;
        javascriptSupport = false;
        libpngSupport = false;
         openalSupport = false;
         pulseSupport = false;
         pipewireSupport = true;
        rubberbandSupport = false;
        screenSaverSupport = false;
        sdl2Support = true;
        sixelSupport = false;
        speexSupport = false;
        swiftSupport = false;
        theoraSupport = false;
        vaapiSupport = true;
        vapoursynthSupport = false;
        vdpauSupport = true;
        xineramaSupport = false;
        xvSupport = false;
        zimgSupport = false;
       };
       };
     })
     })
    .override {
      scripts = with pkgs.mpvScripts; [
        uosc
        sponsorblock
      ];
    };


   # MPV configuration options
   # MPV configuration options
Line 90: Line 62:
</syntaxhighlight>
</syntaxhighlight>


=== Finding MPV Scripts ===
== Error, unknown format ==
You can find additional scripts for MPV under the <code>mpvScripts</code> attribute. To search for available scripts, use the following command:<syntaxhighlight lang="nix">
nix search nixpkgs mpvScripts
 
</syntaxhighlight>The scripts are defined in the following Nixpkgs directory:<syntaxhighlight lang="nix">
pkgs/applications/video/mpv/scripts
 
</syntaxhighlight><h2>Error, unknown format</h2>


If you get the following sort of error, note that mpv currently uses the small ffmpeg version (ffmpeg_5) instead of the full version (ffmpeg_5-full).  
If you get the following sort of error, note that mpv currently uses the small ffmpeg version (ffmpeg_5) instead of the full version (ffmpeg_5-full).