Compare commits
2 Commits
v1.0.2
...
e4f5ce70b8
| Author | SHA1 | Date | |
|---|---|---|---|
| e4f5ce70b8 | |||
| 8ee7f9fefe |
@@ -389,8 +389,7 @@ class VideoEncoder:
|
||||
return False, "Invalid video resolution information"
|
||||
|
||||
cmd = [
|
||||
'ffmpeg', '-i', input_path, '-c:v', 'libx265', '-c:a', 'copy',
|
||||
'-preset', 'medium', '-crf', '28', '-f', 'matroska'
|
||||
'ffmpeg', '-i', input_path
|
||||
]
|
||||
|
||||
# Add scaling filter if target resolution is specified
|
||||
@@ -404,8 +403,10 @@ class VideoEncoder:
|
||||
# Ensure width is divisible by 2 (required by video codecs)
|
||||
if scale_width % 2 != 0:
|
||||
scale_width -= 1
|
||||
cmd.insert(2, f'scale={scale_width}:{target_height}')
|
||||
cmd.insert(2, '-vf')
|
||||
cmd.extend(['-vf', f'scale={scale_width}:{target_height}'])
|
||||
|
||||
cmd.extend(['-c:v', 'libx265', '-c:a', 'copy',
|
||||
'-preset', 'medium', '-crf', '28', '-f', 'matroska'])
|
||||
|
||||
# Insert user flags if provided
|
||||
if ffmpeg_flags:
|
||||
|
||||
Reference in New Issue
Block a user