Update app.py
Browse files
app.py
CHANGED
@@ -97,12 +97,12 @@ async def procesar_video(video_input, texto_tts, voz_seleccionada):
|
|
97 |
audio_original
|
98 |
)
|
99 |
|
100 |
-
#
|
101 |
-
target_width =
|
102 |
-
target_height =
|
103 |
-
video_resized = video_original.resize(height=target_height) # Ajustar altura a
|
104 |
|
105 |
-
# Calcular m谩rgenes para llenar
|
106 |
current_width = video_resized.w
|
107 |
current_height = video_resized.h
|
108 |
|
@@ -116,7 +116,7 @@ async def procesar_video(video_input, texto_tts, voz_seleccionada):
|
|
116 |
color=(0, 0, 0) # Negro
|
117 |
)
|
118 |
else:
|
119 |
-
# Recortar el video horizontalmente si es m谩s ancho que
|
120 |
video_final = video_resized.crop(
|
121 |
x1=(current_width - target_width) // 2,
|
122 |
x2=current_width - (current_width - target_width) // 2
|
|
|
97 |
audio_original
|
98 |
)
|
99 |
|
100 |
+
# Redimensionar el video a una resoluci贸n est谩ndar (1920x1080)
|
101 |
+
target_width = 1920
|
102 |
+
target_height = 1080
|
103 |
+
video_resized = video_original.resize(height=target_height) # Ajustar altura a 1080p
|
104 |
|
105 |
+
# Calcular m谩rgenes para llenar 1920x1080
|
106 |
current_width = video_resized.w
|
107 |
current_height = video_resized.h
|
108 |
|
|
|
116 |
color=(0, 0, 0) # Negro
|
117 |
)
|
118 |
else:
|
119 |
+
# Recortar el video horizontalmente si es m谩s ancho que 1920
|
120 |
video_final = video_resized.crop(
|
121 |
x1=(current_width - target_width) // 2,
|
122 |
x2=current_width - (current_width - target_width) // 2
|