Update transcode_bench.py

This commit is contained in:
2025-10-12 20:24:09 +13:00
parent f28536d007
commit 94ab8ab72f

View File

@@ -357,9 +357,19 @@ class TranscodeJob:
if 'vaapi' in self.encoder and not self.hw_decode:
cmd.extend(['-vf', 'format=nv12,hwupload'])
# Build encoding parameters
encode_params = ['-c:v', self.encoder]
# For VA-API, use CQP mode instead of bitrate if needed
if 'vaapi' in self.encoder:
# Use constant quality mode (lower is better quality, 20-30 is good)
encode_params.extend(['-qp', '23'])
else:
# Use bitrate mode for other encoders
encode_params.extend(['-b:v', '4M'])
cmd.extend(encode_params)
cmd.extend([
'-c:v', self.encoder,
'-b:v', '4M',
'-c:a', 'aac',
'-b:a', '128k',
'-f', 'null' if os.name != 'nt' else 'null',