Skip to content

Instantly share code, notes, and snippets.

@asdfgeoff
asdfgeoff / compress_videos.py
Last active September 14, 2023 22:10
Bulk compress phone videos using H.265 HEVC encoding 🔥 More info: https://geoffruddock.com/bulk-compress-videos-x265-with-ffmpeg/
import click
from pathlib import Path
from subprocess import call, check_output
from tqdm import tqdm
@click.command()
@click.argument('directory', type=click.Path(exists=True))
@click.option('--recursive', is_flag=True, help='Recursive')
@click.option('--file-ext', help='File format to process')
def main(directory, file_ext='mp4', recursive=False):