I’ve recently made available two scripts I use to transcode, move, and manage MythTV recordings
mythmunge
MythTV user job bash script to remove commercials / transcode / copy / etc. recordings
github.com/jfath/mythmunge
Features
Transcode or remux into any compression type or container supported by ffmpeg
Optionally remove commercials from a recording
Modify the MythTV recording, or produce a new file leaving the original recording unaltered
Look up recording season/episode numbers on TheTVDB
Copy a modified recording into any directory/file structure you choose
(ideal for moving recodings into Plex or Kodi media libraries)
Receive notification emails on job start/complete
Run pre and post commands for WOL, scp to remote machines, etc.
expirevid.pl
Recurse directories and expire episodes by age or count according to config files
github.com/jfath/expirevid
Config files are named expirevid.cfg and have the format:
maxage=#
maxcount=#
maxage is the maximum age in days before expiration. 0 means don’t expire by age
maxcount is the maximum number of video files in a directory before oldest is expired. 0 means unlimited.
Config files can occur anywhere in the directory tree. The specified values are then used for the current tree level and lower until a new config file is found