diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-19 21:21:23 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-02-19 21:21:23 -0700 |
commit | 1b6ea8eab1530b092d4d55bd9209a0eee5300133 (patch) | |
tree | 56615c69c4bfa90dc96dda4c6911ad450e21b3bd /libmkv/changing-resolution-gen.sh | |
parent | 0010869cbd08e40dd1e39af7656d707ad42a3f25 (diff) |
tidy scripts
Diffstat (limited to 'libmkv/changing-resolution-gen.sh')
-rwxr-xr-x | libmkv/changing-resolution-gen.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libmkv/changing-resolution-gen.sh b/libmkv/changing-resolution-gen.sh new file mode 100755 index 0000000..cbe637d --- /dev/null +++ b/libmkv/changing-resolution-gen.sh @@ -0,0 +1,19 @@ +name=${0##*/} +name=${name%.sh} + +rm -f -- "${name}.part1.mkv" "${name}.part2.mkv" "${name}.concat.txt" "${name}.mkv" + +# Create a 320x240 clip +ffmpeg -f lavfi -t 2 -i testsrc=r=30:s=320x240 -c:v vp8 -level 3 -pix_fmt yuv420p "${name}.part1.mkv" + +# Create a 640x480 clip +ffmpeg -f lavfi -t 2 -i testsrc=r=30:s=640x480 -c:v vp8 -level 3 -pix_fmt yuv420p "${name}.part2.mkv" + +# Create a text file with the list of files +{ + echo "file '${name}.part1.mkv'" + echo "file '${name}.part2.mkv'" +} > "${name}.concat.txt" + +# Concatenate the clips +ffmpeg -f concat -safe 0 -i "${name}.concat.txt" -c:v copy "${name}.mkv" |