Here is a updated github with everything working for Plex Version 1.9.5.4339
Hey man, I’ve been trying to get this to work. Currently I can get it to work if I run the wrapper directly from cli, but if I put the same file path in PLEX it will result in an error for the post-processing.
/mnt/Media/packages/RCfilmPlexPost/RCwrapper.sh
Is what I currently have in the script spot within plex. If I run command in CLI that with an input behind it works flawlessly.
Also running manjaro linux
@BibleThumping said:
Hey man, I’ve been trying to get this to work. Currently I can get it to work if I run the wrapper directly from cli, but if I put the same file path in PLEX it will result in an error for the post-processing./mnt/Media/packages/RCfilmPlexPost/RCwrapper.sh
Is what I currently have in the script spot within plex. If I run command in CLI that with an input behind it works flawlessly.
Also running manjaro linux
1: Did you make the file RCfilmPlexPost.py & RCwrapper.sh executable
2: most linux systems require ./ before the executable
3: make sure you have all the required Application paths in the RCfilmPlexPost.conf
Example Here’s exactly what I use in plex:
/home/user/RCfilmPlexPost/./RCwrapper.sh
This should do the trick. If you still need help include the logs
I’ve attached my PMS logs. I can’t find any hard codes log but for example I know that the command works via CLI, as its removed commercials and converted to MP4 one of my PLEX recordings.
I searched your entire log and did not see the RCwrapper.sh even being called. you need to recheck your work
Example Here’s exactly what I use in the Plex post processing field:
/home/user/RCfilmPlexPost/./RCwrapper.sh
do you see how i used the full path plus the ./ for exe
also make sure you have all the paths correct in the RCwrapper.sh & RCfilmPlexPost.conf files
I am making the presumption that manjaro is a standard linux distro i have not run it and therefore this has not been tested on it but if long as it can run Python 2.x, ffmpeg, media info & comskip all is good
I do have PMS version Version 1.9.5.4323 if that is an issue. I dont have an update available…

/mnt/Media/packages/RCfilmPlexPost/./RCwrapper.sh is the full command in the Plex post processing field.
Also the below screen shot shows I can run through CLI, and I get an MP4 file with no commercials.
check your PMS logs again just after a show finishes a recording then look to see if PMS tried to run RCwrapper.sh if it tried to run it it would say it did or a reason why it did not run.
one thing comes to mind try switching to the plex user and run RCwrapper again if it fails then you’re obviously having a permissions issue.
Command to switch user: sudo su plex
if that is the case, you will need to recursively change the permissions of the temporary folders that RCfilmPlexPost uses and
The folder that contains RCfilmPlexPost as well as the dependent programs like mediainfo, ffmpeg, python2, comskip.
The best practice is to just change the group ownership of those directories and add Plex group permissions to your username
Plex has its own limited user in the linux distros so you will need to give it permissions to exe and rw Dir’s outside of plex.
Command for you: sudo chown -R USER:plex /mnt/Media/Packages/ *******
I have recently updated the RCFilmPlexPost Script to transcode to HEVC with MacOS 11 & iOS 11 decode Compatibility.
(Read the readme.)
Does anyone have any idea on how to implement this on an Nvidia Shield?
I’m fine with running the script on a separate machine, but need the shield to kick off the script somehow.
@miguelt678 said:
Does anyone have any idea on how to implement this on an Nvidia Shield?I’m fine with running the script on a separate machine, but need the shield to kick off the script somehow.
I don’t have a shield but I’d be curious about the details of how you get it running
I got this working in the CLI so next is putting it on my server and getting it to work in Plex so that it’s automatic. Great work!
@ZeRoSyNC said:
I have recently updated the RCFilmPlexPost Script to transcode to HEVC with MacOS 11 & iOS 11 decode Compatibility.
(Read the readme.)
I am having some trouble getting this running correctly on my Mac (running ElCap).
The issue is that it fails to run correctly when invoked by Plex. The file goes to where it would normally go, and the Recording Schedule pages notes that there was a post-processing error. No log, no temps, no nothing…
it runs beautifully from the command line (python RCfilmPlexPost.py filename.ts). Logs fine, saves all the interstitials and temps, does the HEVC, etc.
PlexComskip runs fine; I really like the error handling and HEVC compression options with RCfilmPlexPost, and so would like to get it to run.
I’ll be the first to say that I’m far from a scrip-wise coder. I appreciate any help you can give me (including how/where to look at the Plex log to see where the problem is…)
thanks…great work!
EDIT to the above:
I’m an idiot…
I went in and did a sudo chmod +x on RCfilmPlexPost.py
and all appears to be well.
Anyways, GREAT piece of code…nice improvement over the original.
lol it happens 
I have been running this fairly seamlessly on my Mac (sans the wrapper, as it appears to be unnecessary on the Mac).
I would like to modify the script so that it uses h254 encoding, as the processing time for h265 is significantly longer on my rig, and I have plenty of room on my hard drive. Is this as simple as modifying the ffmpeg_args definition at line 217, and then editing the ‘(HEVC)’ out of lines 247 and 248 to maintain clarity in the file naming?
I will, of course, try it out, and will also probably try to add a choice of encoding into the code (see earlier comment about coding ability; this will be a growth opportunity). Some confirmation that I’m headed in the right direction first would be treated appreciated.
@ZeRoSyNC said:
one thing comes to mind try switching to the plex user and run RCwrapper again if it fails then you’re obviously having a permissions issue.
if that is the case, you will need to recursively change the permissions of the temporary folders that RCfilmPlexPost uses and the folder that contains RCfilmPlexPost as well as the dependent programs like mediainfo, ffmpeg, python2, comskip.The best practice is to just change the group ownership of those directories and add Plex group permissions to your username. Plex has its own limited user in the linux distros so you will need to give it permissions to exe and rw Dir’s outside of plex.
Command for you: sudo chown -R USER:plex /mnt/Media/Packages/ *******
I’m moving over to an Ubuntu 16.04LTS server. Everything works well without the RCfilmPlexPost script.
PMS writes it’s files with a plex:plex ownership and drwxr-xr-x set of permissions
I have added the “regular” Ubuntu user “user1” to the group “plex” and vice versa
I am able to run the RCwrapper.sh just fine from the CLI, until the end, when it is unable to write the resulting .mp4 file back to the final directory, due to the permissions above. When I do a “sudo su plex” and run it from the CLI, all is well.
I then tried the suggested “command for you” from above. Same result.
Wondering if you have any other ideas? This is pretty clearly an issue with permissions writing the .mp4 file back to the final directory.
Is there a way to perhaps have user plex create the final directory with a different set of permissions?
jp
