Spaces:
Configuration error
Configuration error
Update app_rvc.py
Browse files- app_rvc.py +3 -2
app_rvc.py
CHANGED
@@ -309,10 +309,11 @@ def download_and_adjust_youtube_video(url, speed_factor, start_time=None, end_ti
|
|
309 |
# Generate output filename
|
310 |
output_filename = f"downloaded/{os.path.splitext(os.path.basename(filename))[0]}_speed{speed_factor}.mp4"
|
311 |
|
312 |
-
#
|
313 |
fps = video.fps
|
314 |
if fps is None:
|
315 |
-
fps = 30 # Default to 30 fps if not available
|
|
|
316 |
|
317 |
# Write the adjusted video
|
318 |
adjusted_video.write_videofile(output_filename, fps=fps)
|
|
|
309 |
# Generate output filename
|
310 |
output_filename = f"downloaded/{os.path.splitext(os.path.basename(filename))[0]}_speed{speed_factor}.mp4"
|
311 |
|
312 |
+
# Get the original fps, or use a default value if it's None
|
313 |
fps = video.fps
|
314 |
if fps is None:
|
315 |
+
fps = 30 # Default to 30 fps if the original fps is not available
|
316 |
+
logger.warning(f"Original video FPS not detected. Using default value of {fps}")
|
317 |
|
318 |
# Write the adjusted video
|
319 |
adjusted_video.write_videofile(output_filename, fps=fps)
|