mpv: Generate visualiser profiles with function

This commit is contained in:
Simon Bruder 2021-03-09 11:35:13 +01:00
parent 922a359497
commit a3c954fa01
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -158,16 +158,25 @@ in
"Alt+Z" = "add sub-delay +1"; "Alt+Z" = "add sub-delay +1";
}; };
profiles = { profiles =
musicvideo = { let
lavfi-complex = "[aid1]asplit=4[ao][a1][a2][a3];[a1]avectorscope=m=lissajous:s=640x600:draw=dot:r=25[avectorscope];[a2]aresample=44100,showwaves=s=1280x600:mode=p2p:colors=red|lightgreen:r=25[showwaves];[a3]showcqt=s=1920x600:axis=0:axis_h=0:r=25[showcqt];[showwaves][avectorscope]hstack=shortest=1[top];[top][showcqt]vstack=shortest=1,fps=25[vo]"; mkVisualiser = width: height: rate: {
alpha = false; lavfi-complex = lib.concatStringsSep ";" [
}; "[aid1]asplit=4[ao][a1][a2][a3]"
"[a1]avectorscope=m=lissajous:s=${toString (width / 3)}x${toString (height / 2)}:draw=dot:r=${toString rate}[avectorscope]"
musicvideo-1080 = { "[a2]aresample=44100,showwaves=s=${toString (width / 3 * 2)}x${toString (height / 2)}:mode=p2p:colors=red|lightgreen:r=${toString rate}[showwaves]"
lavfi-complex = "[aid1]asplit=4[ao][a1][a2][a3];[a1]avectorscope=m=lissajous:s=640x540:draw=dot:r=25[avectorscope];[a2]aresample=44100,showwaves=s=1280x540:mode=p2p:colors=red|lightgreen:r=25[showwaves];[a3]showcqt=s=1920x540:axis=0:axis_h=0:r=25[showcqt];[showwaves][avectorscope]hstack=shortest=1[top];[top][showcqt]vstack=shortest=1,fps=25[vo]"; "[a3]showcqt=s=${toString width}x${toString (height / 2)}:axis=0:axis_h=0:r=${toString rate}[showcqt]"
"[showwaves][avectorscope]hstack=shortest=1[top]"
"[top][showcqt]vstack=shortest=1,fps=${toString rate}[vo]"
];
alpha = false; alpha = false;
}; };
in
{
visualiser = mkVisualiser 1920 1200 30;
visualiser-1080 = mkVisualiser 1920 1080 30;
visualiser-60 = mkVisualiser 1920 1080 60;
visualiser-1080-60 = mkVisualiser 1920 1080 60;
hqencode = { hqencode = {
ovc = "libx264"; ovc = "libx264";