From 1aea3b8a6e9742daa8f03e526bc8dd788535cf96 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 17 Sep 2025 13:55:13 +0200 Subject: [PATCH] Update VideoEditor encoding settings for improved output quality This commit modifies the encoding parameters in the VideoEditor class, changing the preset to 'veryslow' and adjusting the CRF value to 12 for enhanced video quality. Additionally, it introduces new parameters for profile and level settings, as well as x264 parameters for reference frames and B-frames, optimizing the encoding process for better performance and visual fidelity. --- croppa/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/croppa/main.py b/croppa/main.py index 5cd7720..a821793 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -2699,9 +2699,12 @@ class VideoEditor: '-r', str(self.fps), '-i', temp_file.name, '-c:v', 'libx264', - '-preset', 'fast', - '-crf', '18', + '-preset', 'veryslow', + '-crf', '12', '-pix_fmt', 'yuv420p', + '-profile:v', 'high', + '-level', '4.2', + '-x264-params', 'ref=5:bframes=8:deblock=1,1', output_path ] self.temp_file_name = temp_file.name