pad videos

This commit is contained in:
bakatrouble 2023-07-23 13:46:43 +03:00
parent 3197fe5d86
commit 8deac50ef3

View File

@ -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'])