mfarre HF staff commited on
Commit
cf969d7
·
1 Parent(s): b7a96e8
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -62,7 +62,7 @@ class VideoHighlightDetector:
62
  {
63
  "role": "system",
64
  "content": [{"type": "text", "text": system_message}]
65
- },
66
  {
67
  "role": "user",
68
  "content": [
@@ -341,7 +341,9 @@ def create_ui(examples_path: str, model_path: str):
341
  "-i", video,
342
  "-ss", str(start_time),
343
  "-t", str(segment_length),
344
- "-c", "copy",
 
 
345
  segment_path
346
  ]
347
  subprocess.run(cmd, check=True)
 
62
  {
63
  "role": "system",
64
  "content": [{"type": "text", "text": system_message}]
65
+ }
66
  {
67
  "role": "user",
68
  "content": [
 
341
  "-i", video,
342
  "-ss", str(start_time),
343
  "-t", str(segment_length),
344
+ "-c:v", "libx264",
345
+ "-preset", "ultrafast", # Use ultrafast preset for speed
346
+ "-pix_fmt", "yuv420p", # Ensure compatible pixel format
347
  segment_path
348
  ]
349
  subprocess.run(cmd, check=True)