Plex DVR Post Processing Script

      3 Comments on Plex DVR Post Processing Script

Here is a little script I put together to automate some actions I have after Plex has recorded a show for me.  It isn’t perfect, I am sure it needs some work, but it works well enough for now.  Any feedback would be appreciated.  Below is a quick list of what it does and what you need.

  1.  Follow the instructions on this post to get a majority of the tools installed.
  2. Install HandbrakeCLI and mkvtoolnix with brew at the command line:  brew install mkvtoolnix handbrakecli
  3. Don’t forget to add the Path to the script in your Plex DVR Settings.  i.e. /Users/media/
  4. Also check the box to process video while recording in device settings.  This will save the file as mkv which is needed in order to detect aspect ration properly.

Once you have all of that installed place the somewhere on your Mac and make sure it is executable.  To do that run chmod 755 in the terminal on the file  i.e. “chmod 755”

You can test the program by running the following in the terminal program.

sh doogiehowser.mkv

This will feed the script whatever video file you have.  In my case doogiehowser.mkv is the name of the video file.  If you want to monitor the progress you can use the terminal with the program tail to watch the progress.  i.e  “tail -f /tmp/postProcessPlex.log”

Download the script from my downloads directory.  It is called PlexPostProcessScript-1.0



3 thoughts on “Plex DVR Post Processing Script

  1. letsgo1776

    Thank you for the script. I removed the handbrake processing part. It was useful to solve the issue I was having where two shows completed recording in PLEX DVR simultaneously and then locking up my computer due to trying to strip commercials on two files at once.

  2. Stephen B.

    I tried to download the post processing script and it gave a 404 error. I noticed that you mentioned having to correct some links. Is this the same case for the post processing script or have you stopped supporting it. I was wanting to take a look at it to get ideas for my script.

    Thanks, S

    1. Christopher Silvertooth Post author

      Just fixed the link. I will probably be moving all of this to github or hosting from my own site in the near future.


Leave a Reply

Your email address will not be published. Required fields are marked *