Skip to content

Instantly share code, notes, and snippets.

@meequrox
meequrox / ffconcat.py
Last active November 28, 2023 05:39
The only correct way to concatenate media files using ffmpeg
#!/usr/bin/env python3
import sys
import pathlib
def get_video_files() -> list[str]:
video_formats: set = {
".mp4", ".mkv", ".webm", ".flv", ".avi", ".mts", ".mpg", ".m2ts", ".ts",
".mov", ".wmv", ".m4v", ".3gp", ".mpeg"