summaryrefslogtreecommitdiff
path: root/libmkv/changing-resolution-gif.sh
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-20 16:03:05 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-20 16:03:05 -0700
commitf5ad1399aec565f9562cee9df21f24124a85c9e0 (patch)
treea0c06bb92537eb61c7ff222afa0ed78c25b705d1 /libmkv/changing-resolution-gif.sh
parent690f6f81582dc5304f0e49dab55c68eceba460b0 (diff)
wip
Diffstat (limited to 'libmkv/changing-resolution-gif.sh')
-rwxr-xr-xlibmkv/changing-resolution-gif.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/libmkv/changing-resolution-gif.sh b/libmkv/changing-resolution-gif.sh
new file mode 100755
index 0000000..dff17a9
--- /dev/null
+++ b/libmkv/changing-resolution-gif.sh
@@ -0,0 +1,19 @@
+name=${0##*/}
+name=${name%.sh}
+
+rm -f -- "${name}.part1.gif" "${name}.part2.gif" "${name}.concat.txt" "${name}.gif"
+
+# Create a 320x240 clip
+ffmpeg -f lavfi -t 2 -i testsrc=r=30:s=320x240 "${name}.part1.gif"
+
+# Create a 640x480 clip
+ffmpeg -f lavfi -t 2 -i testsrc=r=30:s=640x480 "${name}.part2.gif"
+
+# Create a text file with the list of files
+{
+ echo "file '${name}.part1.gif'"
+ echo "file '${name}.part2.gif'"
+} > "${name}.concat.txt"
+
+# Concatenate the clips
+ffmpeg -f concat -safe 0 -i "${name}.concat.txt" -c:v copy "${name}.nut"