Untitled
Anonymous
plain_text
10/02/2024 9:11 AM
844 B
17
Indexable
def deinterlace_video(input_file, output_file):
# Construct the FFmpeg command
command = [
'ffmpeg',
'-i', input_file,
'-vf', 'yadif', # yadif is a popular deinterlacing filter
'-c:a', 'copy', # Copy the audio without re-encoding
output_file
]
try:
# Run the command and capture output
result = subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
print(result.stdout)
except subprocess.CalledProcessError as e:
# Print the error message
print(f"Error: {e.stderr}")
Editor is loading...
Leave a Comment