24 lines
458 B
Bash
24 lines
458 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
INPUT="${1}"
|
||
|
STYLE="${2}"
|
||
|
OUTPUT="${3}"
|
||
|
|
||
|
mkdir -p frames
|
||
|
mkdir -p neural-frames
|
||
|
|
||
|
ffmpeg -i "${INPUT}" frames/frame-%06d.png
|
||
|
|
||
|
FRAMES=frames/*.png
|
||
|
|
||
|
for frame in ${FRAMES}; do
|
||
|
echo "Running style transfer $frame -> neural-$frame ..."
|
||
|
bash python/style_transfer.sh "${frame}" "${STYLE}" "neural-${frame}"
|
||
|
done
|
||
|
|
||
|
sleep 10
|
||
|
|
||
|
ffmpeg -f image2 -i frames/neural-frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
||
|
|
||
|
#rm -rf frames
|
||
|
#rm -rf neural-frames
|