A collection of small automation scripts for working with audio and video files on Windows.
This repository contains Python scripts and batch helpers for tasks such as:
- adding or merging audio tracks into video files
- normalizing loudness with ffmpeg
- renaming and tagging MKV files based on XML metadata
- converting video files to common formats
- extracting audio tracks and generating thumbnails
- checking video file integrity
add_audio_track_mt.py- Adds audio tracks to video files using metadata from
info.xml - Supports optional loudness normalization via ffmpeg
loudnorm - Multi-threaded processing for faster batch runs
- Adds audio tracks to video files using metadata from
add_audio_track_st.py- Older single-threaded version of the audio track adder
- Kept for reference;
add_audio_track_mt.pycan be configured withMAX_THREADS = 1for sequential processing
rename_video.py- Renames multiple video files according to titles defined in
info.xml - Updates MKV title tags using
mkvpropedit
- Renames multiple video files according to titles defined in
convert_to_av1.batconvert_to_h264.batconvert_to_h264_1080p.batconvert_to_h264_720p.batconvert_to_h265.batconvert_to_xyz.batget_audio.batget_audio_sample.battrim_video.batset_audio_to_german.batset_movflags.batset_thumbnail.batcheck_video_corruption.bat
These batch files are convenience wrappers for common ffmpeg and file operations in this repository.
Most Python scripts are configured by editing the settings at the top of the file.
Key settings include input/output paths, thread count, encoder options, and XML file locations.
The example configuration in example/info.xml shows the expected metadata format for episodes, seasons, and file names.
The example/ folder contains a sample info.xml and example directory layout to demonstrate how the XML-based scripts expect media and audio files to be organized.
- Windows environment (scripts are written for Windows path handling and batch usage)
ffmpeg.exeavailable in the repository root or on the system PATHffprobe.exeavailable in the repository root or on the system PATHmkvpropedit.exefrom MKVToolNix for MKV metadata updatesab-av1.exeavailable in the repository root or on the system PATH- Python 3.x for the
.pyscripts
- Adjust paths and filenames in the Python scripts before running them.
This repository is licensed under the MIT License.