Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -84,13 +84,13 @@ def video_edit(srt, input_video, font_color, font_type, font_size, input_audio=N
|
|
84 |
# Generate output filename
|
85 |
input_base = os.path.splitext(video_path)[0]
|
86 |
output_video = f"{input_base}_subtitled.mp4"
|
87 |
-
|
88 |
# Convert color name to FFmpeg format
|
89 |
hex_color = COLOR_MAP.get(font_color.lower())
|
90 |
if not hex_color:
|
91 |
raise ValueError(f"Unsupported color: {font_color}. Supported colors: {', '.join(COLOR_MAP.keys())}")
|
92 |
ffmpeg_color = hex_to_ffmpeg_color(hex_color)
|
93 |
-
|
94 |
# Build subtitle style
|
95 |
subtitle_style = f"FontName={font_type},FontSize={font_size},PrimaryColour={ffmpeg_color}"
|
96 |
fonts_dir = os.path.dirname(srt)
|
|
|
84 |
# Generate output filename
|
85 |
input_base = os.path.splitext(video_path)[0]
|
86 |
output_video = f"{input_base}_subtitled.mp4"
|
87 |
+
print(font_color, font_type)
|
88 |
# Convert color name to FFmpeg format
|
89 |
hex_color = COLOR_MAP.get(font_color.lower())
|
90 |
if not hex_color:
|
91 |
raise ValueError(f"Unsupported color: {font_color}. Supported colors: {', '.join(COLOR_MAP.keys())}")
|
92 |
ffmpeg_color = hex_to_ffmpeg_color(hex_color)
|
93 |
+
print(ffmpeg_color)
|
94 |
# Build subtitle style
|
95 |
subtitle_style = f"FontName={font_type},FontSize={font_size},PrimaryColour={ffmpeg_color}"
|
96 |
fonts_dir = os.path.dirname(srt)
|