Jump to content

MPV: Difference between revisions

fix configuration example
(shorten mpv override flags, merge "mpv scripts" section into configuration section)
(fix configuration example)
Line 34: Line 34:
};
};
</syntaxhighlight>A more comprehensive configuration of MPV would look like this.<syntaxhighlight lang="nix">
</syntaxhighlight>A more comprehensive configuration of MPV would look like this.<syntaxhighlight lang="nix">
programs.mpv = {
{ pkgs, ... }:
  enable = true;
{
  programs.mpv = {
    enable = true;
 
    # Custom package configuration for MPV
    package = (
      pkgs.mpv-unwrapped.wrapper {


  # Custom package configuration for MPV
  package =
    (pkgs.mpv-unwrapped.wrapper {
      mpv = pkgs.mpv-unwrapped.override {
        waylandSupport = true;
         # To find more scripts run this in a terminal: nix search nixpkgs mpvScripts
         # To find more scripts run this in a terminal: nix search nixpkgs mpvScripts
         # The scripts are defined in the following Nixpkgs directory: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts
         # The scripts are defined in the following Nixpkgs directory: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts
Line 48: Line 49:
           sponsorblock
           sponsorblock
         ];
         ];
        # Find more override options in the expression:
        # https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/mpv/default.nix
      };
    })


  # MPV configuration options
        mpv = pkgs.mpv-unwrapped.override {
  config = {
          # Find more override options in the expression:
    profile = "high-quality";
          # https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/mpv/default.nix
    ytdl-format = "bestvideo+bestaudio";
          waylandSupport = true;
    cache-default = 4000000;
        };
      }
    );
 
    # MPV configuration options
    config = {
      profile = "high-quality";
      ytdl-format = "bestvideo+bestaudio";
      cache-default = 4000000;
    };
   };
   };
};
}
</syntaxhighlight>
</syntaxhighlight>