diff --git a/main.py b/main.py index 8dfdee5..4594fda 100644 --- a/main.py +++ b/main.py @@ -61,7 +61,14 @@ async def send_post(post: E621Post, tag_list: List[str]): with open(src_path, 'wb') as webm: webm.write(file.read()) ffmpeg\ - .input(str(src_path))\ + .input(str(src_path)) \ + .filter('pad', { + 'width': 'ceil(iw/2)*2', + 'height': 'ceil(ih/2)*2', + 'x': '0', + 'y': '0', + 'color': 'Black' + })\ .output(str(mp4_path), vcodec='libx264', crf='26')\ .run() s3 = boto3.client('s3', aws_access_key_id=os.environ['AWS_ACCESS_KEY'], aws_secret_access_key=os.environ['AWS_SECRET_KEY'])