gnosticdev commited on
Commit
bc278d1
verified
1 Parent(s): 958d208

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -97,12 +97,12 @@ async def procesar_video(video_input, texto_tts, voz_seleccionada):
97
  audio_original
98
  )
99
 
100
- # Mantener la relaci贸n de aspecto original pero ajustar a una resoluci贸n est谩ndar
101
- target_width = 1280
102
- target_height = 720
103
- video_resized = video_original.resize(height=target_height) # Ajustar altura a 720p
104
 
105
- # Calcular m谩rgenes para llenar 1280x720
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 1280
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