distro specific fixes
[distro-setup] / brc2
diff --git a/brc2 b/brc2
index d6ff1a401367e8412b3cbd8d1bb90975b4f09b18..fe5d60fce42c9a8fb1a7b567ed0a2bce0517f77e 100644 (file)
--- a/brc2
+++ b/brc2
@@ -3291,6 +3291,11 @@ mpvd() {
 mpva() {
   mpv --profile=a "$@";
 }
+# mpv for testing video quality, dont scale.
+mpvt() {
+  mpv --video-unscaled "$@";
+  }
+
 # mpv all media files in . or $1
 mpvm() {
   local -a extensions arg
@@ -4983,6 +4988,13 @@ ife() {
   fi
 }
 
+# decrease filesize without losing any noticeable quality. inspired from
+# https://gist.github.com/BlueSwordM/86dfcb6ab38a93a524472a0cbe4c4100
+ffsencode() {
+  in="$1"
+  out="$2"
+  ffmpeg -i "$in" -c:v libsvtav1 -crf 60 -preset 6 -g 60 -svtav1-params tune=0:enable-overlays=1:scd=1:scm=1 -pix_fmt yuv420p10le -c:a copy "$out"
+}
 
 export BASEFILE_DIR=/a/bin/fai-basefiles