DVR Recording Failed after Post Process Script QNAP

I was having a similar issue when I was creating a post processing script. As far as I can tell, plex looks only for the .ts file. If it doesn’t find it, it will generate the error on the server. It will still move all the files in the temporary directory (there have been issues with this recently, see below link), but the error will be generated.

Possible solution

From looking at your script, it looks like your output file from ffmpeg will have .ts.mp4 as the extension. If that is true, you might try removing the .ts part from the output file.

Code for output file name

"${$1%.*}".mp4

This should strip any extension off the input file and then add the mp4 extension.