First, disable your script and see if your programs records properly. It is entirely possible that your script is somehow breaking the files.
I use a script with ffmpeg to convert shows to hevc and it works fine. Just upgraded to 4.2.4-5~g39dac90~xenial and I can let you know if it fails. Although I scripted it so that it wont start 2 conversions at the same time, it queues the conversions to run serially. You should also see in the logs a line like this if your script is executed, do you see this?:
spawn: Executing "YOUR SCRIPT PATH"