Server Version#: 1.19.1.2589
Player Version#: NA
Tuner Make/Model: HDHomeRun Quatro (latest)
Guide/Lineup name: Built-in
Using XMLTV?: No
Channel number/Name: NA
I’ve duplicated an issue where simultaneous post-processing scripts will fail due to Plex removing the temporary recording folder/files in .grab after one of the scripts is completed. More information in the thread on github: https://github.com/nebhead/PlexPostProc/issues/15
I believe this may be a bug in how Plex manages (or doesn’t manage) simultaneous scripts that are running. My theory is that it just does it’s clean-up of the temporary .grab folders after the first script completes, disregarding the other scripts that are running.
Would be great to get one of the Ninja’s or dev’s to look into this.
Easy to duplicate. The easiest way I found to test was just go into the DVR Guide, and click to record two different shows, then click cancel on each of them. When you cancel them they execute the post process script.
Then just watch the destination folder you set with something like watch -n 1 ls -la .grab
Agreed that this seems broken. My post processing started failing when I added two new tuners (total 3). I can’t seem to capture any errors, however. I have my script command output piping to a tmp file. It isn’t getting created. The post process seems to be failing before it executes the script.
So, I’ve managed to cobble together a fix that seems to be working for me, but I didn’t seem to work for @wrender in this thread. Basically, it pauses itself and waits for any other pending scripts to complete before end the script. Your mileage may vary, but you can give it a try here: https://github.com/nebhead/PlexPostProc
Hopefully Plex will fix this one day so we don’t have to do this workaround.
Wow. I like your script. I’m gonna steal it and try on my end. I like your BASH a lot better than my elementary effort. I did use the built-in transcoder in my BASH to avoid needing any extra installs (in a docker container):
I like your locking approach. I’ll give it a go in my test script… but I’m perplexed why even my rudimentary script is failing to generate a tmp log file:
UPDATE: My simple script above had an empty line before the #!. that was its problem. Now on to the transcoding script… and it is working now. I believe I had compounding issues that didn’t necessarily concern the multiple tuners.
When I added the extra tuners, I think I gave my Plex docker container a restart. This pulled the next Plex version that enforced the Scripts be in a new location (unknown to me).
As I was troubleshooting the postprocessing failures from the script location change, I may have copy + pasted script content into the file and inserted a blank line before the #!. This caused the transcode error to return an exit code 8.
Just had a successful NVDEC/NVENC transcode of 3 simultaneous programs as they all ended at the same time (2x SD, 1xHD).
I still intend to adapt your script framework into my NVENC transcode to spruce the place up a bit.