pindakaas: Fix video stuttering

This commit is contained in:
Geoffrey Frogeye 2024-02-19 00:55:45 +01:00
parent 5d4908d2e2
commit ac0724d97a
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 13 additions and 4 deletions

View file

@ -53,9 +53,8 @@ in
audio-display = false; audio-display = false;
save-position-on-quit = true; save-position-on-quit = true;
osc = false; # Required by thumbnail script osc = false; # Required by thumbnail script
# Hardware acceleration (from https://nixos.wiki/wiki/Accelerated_Video_Playback#MPV) # Hardware acceleration (from https://nixos.wiki/wiki/Accelerated_Video_Playback#MPV, vo=gpu already default)
hwdec = "auto-safe"; hwdec = "auto-safe";
vo = "gpu";
profile = "gpu-hq"; profile = "gpu-hq";
}; };
scripts = with pkgs.mpvScripts; [ thumbnail ]; scripts = with pkgs.mpvScripts; [ thumbnail ];

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, lib, config, ... }:
{ {
boot = { boot = {
# nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore? # nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore?
@ -14,7 +14,7 @@
frogeye.desktop = { frogeye.desktop = {
x11_screens = [ "DP-1" "eDP-1" ]; x11_screens = [ "DP-1" "eDP-1" ];
maxVideoHeight = 720; maxVideoHeight = 1080;
phasesBrightness = { phasesBrightness = {
enable = true; enable = true;
jour = "3500"; jour = "3500";
@ -23,6 +23,16 @@
}; };
}; };
# Hardware decoding as suggested in link, works but doesn't seem to help much
# (at least in dropped frames and perf stat output).
# https://wiki.pine64.org/wiki/Mainline_Hardware_Decoding#mpv
# Might be worth if using CI to build.
home-manager.sharedModules = [{
# gpu-hq is too much for it to handle, even with hw decoding
config.programs.mpv.config.profile = lib.mkForce "default";
}];
zramSwap = { zramSwap = {
# Not capable of building itself otherwise # Not capable of building itself otherwise
enable = true; enable = true;