Sway : Exxxtra refactor for screenshots!

This commit is contained in:
Dmitry Voronin 2024-09-07 06:00:57 +03:00
parent ec5e4c450b
commit 6c8dbea10c
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -54,12 +54,18 @@ in {
-c:v copy \ -c:v copy \
-c:a libopus \ -c:a libopus \
-shortest \ -shortest \
-f ${container} "''${scrFile}_" \ -f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \ && mv "''${scrFile}_" "''${scrFile}" \
&& [[ -n "''${scrTransform}" ]] \ && [[ -n "''${scrTransform}" ]] \
&& ffmpeg -display_rotation ''${scrTransform} -i ''${scrFile} -c copy -f ${container} ''${scrFile}_ \ && ffmpeg \
&& mv ''${scrFile}_ ''${scrFile} \ -display_rotation ''${scrTransform} \
|| rm ''${scrFile}_ -i "''${scrFile}" \
-c copy \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
|| rm "''${scrFile}_"
}; };
''; '';
@ -83,12 +89,18 @@ in {
-c:v copy \ -c:v copy \
-c:a libopus \ -c:a libopus \
-shortest \ -shortest \
-f ${container} "''${scrFile}_" \ -f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \ && mv "''${scrFile}_" "''${scrFile}" \
&& [[ -n "''${scrTransform}" ]] \ && [[ -n "''${scrTransform}" ]] \
&& ffmpeg -display_rotation ''${scrTransform} -i ''${scrFile} -c copy -f ${container} ''${scrFile}_ \ && ffmpeg \
&& mv ''${scrFile}_ ''${scrFile} \ -display_rotation ''${scrTransform} \
|| rm ''${scrFile}_ -i "''${scrFile}" \
-c copy \
-f ${container} \
"''${scrFile}_" \
&& mv "''${scrFile}_" "''${scrFile}" \
|| rm "''${scrFile}_"
}; };
''; '';
in '' in ''