Video editing with Python
Fix ffmpeg copy to override existing file
osaajani9c392f7829ef
diff --git a/moviepy/video/io/ffmpeg_tools.py b/moviepy/video/io/ffmpeg_tools.pyindex a558b10a..5b27e56a 100644--- a/moviepy/video/io/ffmpeg_tools.py+++ b/moviepy/video/io/ffmpeg_tools.py@@ -4,7 +4,6 @@ import osimport reimport subprocessfrom pathlib import Path-from typing import Unionfrom moviepy.config import FFMPEG_BINARY, FFPLAY_BINARYfrom moviepy.decorators import convert_parameter_to_seconds, convert_path_to_string@@ -213,7 +212,8 @@ def ffmpeg_stabilize_video(subprocess_call(cmd, logger=logger)-def ffmpeg_copy(input_file: Union[str, Path], output_file: Union[str, Path]):+@convert_path_to_string(("inputfile", "outputfile", "output_dir"))+def ffmpeg_copy(input_file, output_file):"""Re-mix a video file using ffmpeg.This may fix issues with corrupted video file.@@ -235,9 +235,6 @@ def ffmpeg_copy(input_file: Union[str, Path], output_file: Union[str, Path]):if not input_path.exists():raise FileNotFoundError(f"Input file '{input_file}' not found.")- if output_path.exists():- raise FileExistsError(f"Output file '{output_file}' already exists.")-try:# Construct the ffmpeg commandcommand = [