soxogvv commited on
Commit
bcf4305
·
verified ·
1 Parent(s): ae66f14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -333,7 +333,12 @@ def edit_video(video_path):
333
  codec="libx264",
334
  audio_codec="aac",
335
  preset="veryslow",
336
- bitrate="25000k",
 
 
 
 
 
337
  threads=2,
338
  verbose=False,
339
  logger=None
@@ -441,7 +446,12 @@ def edit_video_raw(video_path: str) -> str:
441
  codec="libx264",
442
  audio_codec="aac",
443
  preset="veryslow",
444
- bitrate="25000k",
 
 
 
 
 
445
  threads=2,
446
  logger=None,
447
  fps=clip.fps
 
333
  codec="libx264",
334
  audio_codec="aac",
335
  preset="veryslow",
336
+ ffmpeg_params=[
337
+ "-crf", "15", # Lower CRF → higher quality
338
+ "-pix_fmt", "yuv420p", # Compatible with all platforms
339
+ "-profile:v", "high", # High profile for better detail
340
+ "-level", "4.2", # High level for 1080p+ support
341
+ ],
342
  threads=2,
343
  verbose=False,
344
  logger=None
 
446
  codec="libx264",
447
  audio_codec="aac",
448
  preset="veryslow",
449
+ ffmpeg_params=[
450
+ "-crf", "15", # Lower CRF → higher quality
451
+ "-pix_fmt", "yuv420p", # Compatible with all platforms
452
+ "-profile:v", "high", # High profile for better detail
453
+ "-level", "4.2", # High level for 1080p+ support
454
+ ],
455
  threads=2,
456
  logger=None,
457
  fps=clip.fps