
# Iterate through list of video files, converting them using Handbrake
Output_path = Path('E:/Videos/TV/Daria/') # Output directory Input_path = Path('C:/Users/geoff_000/Videos/MakeMKV') # Input directory # to convert them to a smaller filesize and specific naming scheme.įrom pathlib import Path # manipulates computer directoriesįrom subprocess import call # call(command, shell=True) runs command from cmd # This script reads the *.mkv files in a given directory, and uses Handbrake
Go through the list, converting videos and renaming to fit the naming scheme. The comments of the script are pretty clear, but the main gist of the program is to: Using the Handbrake command line interface (CLI) and Python, I wrote a small script that could rename the files and convert them to a smaller file. Unfortunately, the output files from MakeMKV are huge, usually around 800 MB for a short, 20 minute video. It has a small footprint when used, and can read just about any file format. I’ve found the easiest way to skim is with VLC. In this particular case, some of the episodes of Daria had introductions by the characters at the beginning. I haven’t encountered any disks that kept the episodes out of order, but sometimes there are special features I want to keep. After extracting, I quickly skim the videos, making sure I have labeled everything correctly. I like to use a short, standard naming scheme for the episodes, such as “0103” for “Season 1, Episode 3” Its simple interface allows for quick renaming of files, and the extraction process takes a matter of minutes for each disk. I start by using MakeMKV to rip individual episodes from a disk. For this reason, I have developed the following workflow to easily rip TV shows from a DVD set. TV shows are a bit more cumbersome, due to multiple disks being involved. Handbrake does a great job with movies, since often it is a single file that needs extracting. I can easily name the file, specify an output format, and even create a queue for getting multiple videos from a disk. I usually use Handbrake to rip files off a DVD, since it has several parameters that can be tweaked to give the ideal video output. Hundreds of files have been downloaded or DVDs ripped, resulting in nearly a terabyte of television and movies. Over the past few years, I have acquired quite a video collection.