summaryrefslogtreecommitdiff
path: root/vid-scratch/reschange-gif-in-nut-gen.sh
blob: dff17a93eecc463a79bd6a6e5911aa6ba4702c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"