17 lines
353 B
Bash
Executable File
17 lines
353 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Split the frames out
|
|
mkdir frames
|
|
ffmpeg -i $1 frames/frame%04d.png
|
|
|
|
# Change the white -> transparent
|
|
mkdir chromakeyed
|
|
for f in frames/*
|
|
do
|
|
convert $f -fuzz 50% -transparent white chromakeyed/$(basename $f)
|
|
done
|
|
|
|
# Merge all the frames into one image
|
|
convert chromakeyed/* -background red -flatten flat.png
|
|
|
|
rm -r frames chromakeyed |