#!/usr/bin/env python # -*- coding: utf-8 -*- # This script is (C) Copyright 2023, P. Lutus: https://www.arachnoid.com # and is released under the GPL: https://www.gnu.org/licenses/gpl-3.0.en.html import os, sys, re frame_suffix = "png" source_dir = "trump_putin_images" fn = f'renders/{source_dir}.mp4' print(f'Saving video {fn} ...') fps = 12 os.system(f'ffmpeg -framerate {fps} -y -i {source_dir}/output_index_%03d.{frame_suffix} -pix_fmt yuv420p -crf 10 -acodec copy -c:a aac {fn} > /dev/null 2> logfile.txt && echo "OK" || echo "Error"')