Untitled

mail@pastecode.io avatar
unknown
plain_text
7 days ago
632 B
3
Indexable
Never
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}")
Leave a Comment