I am coming from a mythtv backend and Kodi front end on a Mac mini and I leveraged some scripts to create something very similar.
I took the code from github and made some modifications and potential bug fixes. It was a great starting/ending point for me.
The key thing that I changed was to encode in x265 HEVC that supports iTunes. This HEVC format runs on my macOS. iOS and tvOS. I will probably parameterize it so that the default is x264 and you can turn on x265 vs the current hardcore to x264. X265 takes more encoding time but it is smaller at the same quality.
I focused on just transcoding my TV passes that I have explicitly called out . For example. “Poldark” vs all recordings in the last day. I tend to record sports and just want to time shift slightly. I created a batch file with the list of Tv shows that I kickoff at midnight.
Btw . I looked at the install script and install the prerequisites and code manually. That helped me know where things resided.
New feature request for Channels DVR: I think I saw this alreaady but I would love to have in the recording to have the ability of calling out user jobs ( like this script) to post process the recording and hsve the ability of deferring that job to a time like midnight. This capability is what I had with mythiv. You can commercial trim , encode or whatever.