Just a collection of some scripts that I use to automate my management of media
Script to check for corrupted videos
You need ffmpeg and ffprobe to be in either PATH or in the same directory as the VerifyVideo.py script.
Run the command python VerifyVideo.py
to start verifying videos
You can specify the video folder location using the -f
or --folder
flag.
If not specified, VerifyVideo will check the videos in the same directory as the VerifyVideo.py script
eg. python VerifyVideo.py -f "Folder Location"
Corrupted videos will be listed in a corrupted_files.txt file created in the same directory as the VerifyVideo.py script.
The logs will be displayed in the terminal as well.
You can change which file extensions are considered video files in line 19 of the script
video_file_extensions = ['.mkv', '.mp4', '.avi', '.webm']
options:
-h, --help show this help message and exit
-f [ ...], --folder [ ...]
Folders containing the videos
-r, --recursive Recursively check folders and sub-folders
-s, --staxrip Only includes videos with filename suffix '_new'
-if, --ignore-ffmpeg Ignore ffmpeg check and only run ffprobe check
Script to run VMAF easily and on multiple files
You need ffmpeg to be in either PATH or in the same directory as the script. ffmpeg needs to be build with --enable-libvmaf.
Open the script and edit the pair of videos to run VMAF analysis on.
Run the command python VmafBatch.py
to start.
Script to run the same mkvmerge command on files that have similar names but their episode number is different.
Edit the .bat according to the instructions