Files
Diabolo/tools/encode_infernal_review.py

9 lines
832 B
Python

"""Encode actual Godot captures for STL model approval."""
from pathlib import Path
import argparse,subprocess
parser=argparse.ArgumentParser();parser.add_argument('--ffmpeg',required=True);args=parser.parse_args()
r=Path(__file__).resolve().parent.parent;project=r/'Demon_v0.19';out=project/'reviews/infernal_v01'
for sequence,count,name in [('full',144,'walking'),('outfit',120,'turntable'),('action',96,'whip'),('portrait',72,'face')]:
subprocess.run([args.ffmpeg,'-hide_banner','-loglevel','error','-y','-framerate','24','-i',str(project/'captures/infernal'/sequence/'%03d.png'),'-filter_complex','[0:v]scale=1000:-1:flags=lanczos,split[a][b];[a]palettegen=max_colors=192[p];[b][p]paletteuse=dither=sierra2_4a','-frames:v',str(count),'-loop','0',str(out/(name+'.gif'))],check=True)
print(name,count,'frames',flush=True)