fix
Browse files
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", "
|
|
|
|
|
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)
|