Fix resolution on story mode

pull/1409/head
Xpl0itU 2 years ago
parent 6024ae7e4f
commit 3f2138f8cb

@ -50,9 +50,6 @@ def name_normalize(name: str) -> str:
def prepare_background(reddit_id: str, W: int, H: int) -> str: def prepare_background(reddit_id: str, W: int, H: int) -> str:
output_path = f"assets/temp/{reddit_id}/background_noaudio.mp4" output_path = f"assets/temp/{reddit_id}/background_noaudio.mp4"
if settings.config["settings"]["storymode"]:
output = ffmpeg.input(f"assets/temp/{reddit_id}/background.mp4").output(output_path, an=None, **{"c:v": "h264"}).overwrite_output()
else:
output = ffmpeg.input(f"assets/temp/{reddit_id}/background.mp4").filter('crop', "ih*(9/16)", "ih").output(output_path, an=None, **{"c:v": "h264"}).overwrite_output() output = ffmpeg.input(f"assets/temp/{reddit_id}/background.mp4").filter('crop', "ih*(9/16)", "ih").output(output_path, an=None, **{"c:v": "h264"}).overwrite_output()
output.run() output.run()
return output_path return output_path

Loading…
Cancel
Save