MacOS Plex DVR Commercial Removal Guide for Dummies

In an effort to help out, here is my guide. Let me know if you spot errors. And if you have a question, please don’t quote the whole guide. The relevant part will do :slight_smile: The Long Method is also the recommended route to install.

#MacOS Guide to Commercial Removal in Plex DVR

##BUILDING COMSKIP

LONG METHOD
Install Xcode from the Mac App Store.

Install HomeBrew.

You don’t really need to go to the website as it’s installed using a command in Terminal.

Open Terminal and type (as one line) or paste:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once installed, type:

$ brew install autoconf automake libtool pkgconfig argtable ffmpeg sdl

You may be asked to install the Xcode Command Line Tools and accept the license.

Download or clone the Comskip repository from GitHub and extract the file if needed.

You can generally follow the Building from GitHub instructions to build Comskip. The main thing is changing directory so you are in the Comskip directory. You can do this easily if you’re not sure by opening Terminal, typing cd, adding a space, and dragging the Comskip folder to the Terminal window and pressing Enter. Once there, run each of the commands listed:

$ ./autogen.sh
$ ./configure
$ make

The binary files, comskip and comskip-gui, will be built and appear in the Comskip folder if no errors were encountered, although you may get warnings during the build which is fine. You can move these two files to your /usr/local/bin folder to make them easier to access in the Terminal, but that is up to you. Comskip-gui is not really needed. It is just a version of comskip that gives you a visual frame by frame analysis in a window as it runs.

SHORT METHOD
Download the latest release of ETV-Comskip from GitHub here.

Don’t run any of the scripts. All you really need is the bin and lib folders, everything else can be discarded. The bin folder has comskip and comskip-gui prebuilt and some other unrelated binaries that can be discarded if you want. The lib folder has the libraries comskip requires to run as well as some extras but keeping them is fine.

If you want, you can move the bin and lib folders to another folder called Comskip or something (doesn’t matter), but comskip must be in the bin folder and the libraries must be in the lib folder. This copy of comskip has been modified to run without installing all of its dependencies with Homebrew and can be shared as long as the bin and lib folder structure is kept intact.

Download FFMPEG. You can use this static build .

You can probably extract the ffmpeg binary file and put that in the bin folder too, just to keep it together, or place it in your /usr/local/bin folder.

##INSTALL / SETUP PLEXCOMSKIP

PlexComskip requires python to be installed in order to run.

Download or clone the GitHub PlexComskip repository.

Extract and rename the PlexComskip.conf.example file to PlexComskip.conf. This file will hold your settings for where the comskip and ffmpeg binary files are located on your system and some other self explanatory settings.

The main settings that must be set correctly is the locations of comskip and ffmpeg. If your binaries are not in PATH, you will need to specify the path to them. The path must be to binary file itself and not the folder they are contained in.

# Path to the comskip binary. comskip-path: /path/to/comskip

# Path to the ffmpeg binary. ffmpeg-path: /path/to/ffmpeg

This is important because PlexComskip constructs the command for comskip and ffmpeg to run. If these are not set properly, you may get an Error when PlexComskip runs. Check the PlexComskip logs to find out if you get errors.

##COMSKIP SETTINGS

Comskip settings are all located in a file called comskip.ini. These settings will need adjusting (and there are many!) to attempt to get the best analysis from comskip. Lucky for you, some people have shared their settings, but the end results will vary. You just have to keep tuning them to find the best results.

You can find more information on tuning these settings here.

PlexComskip comes with a comskip.ini file and those work fine but you may find others here that could work better:

MCEBuddy2.x Comskip INI Directory
Comskip Support Forum - Country INI files
Comskip Support Forum - Tuning

Just replace the comskip.ini file in the PlexComskip folder or tell PlexComskip where to find it by uncommenting this line (remove #) in the conf file:

# comskip-ini-path: /path/to/comskip.ini

Just set the new path to the comskip.ini file.

##TESTING PLEXCOMSKIP (OPTIONAL)

Open Terminal.

Check to see if you have Python installed by typing python and then pressing Enter. It should open the interpreter with python version and a prompt. If it does, exit by typing exit() If you don’t have Python installed, it will probably tell you no command found, but I believe Python is installed by default on Mac OS X. If not, you can install the package or through Homebrew, if you installed it, by typing brew install python in Terminal. Generally installing python using any of these methods will install it in the right place and it helps to have it up to date. This guide is tested with Python 2.7.12.

Type python, add a space, drag the PlexComskip file into the Terminal window or type the path, and then finally drag the media file into the Terminal window or the the movie file’s path. The command should look like:

$ python /path/to/PlexComskip.py /path/to/movie_file

There should be a space between these three. Then press Enter. If everything is working like it should, you should see a whole lot of text scroll by and it will tell you if it completes or not. If no issues, you are ready to set the PlexComskip path in PMS.

##ADDING SCRIPTS TO PLEX

Once you got the Comskip build and working or PlexComskip setup and maybe tested in Terminal, all you need now is to provide Plex the PlexComskip.py file path to run after after a recording has finished.

Make sure your are running PMS 1.2.0.2838 (DVR BETA 3) or later to make it easy on yourself as prior betas required extra steps using the command line to add this post processing script.

Go to SETTING → SERVER → DVR (BETA)

Click on DVR Settings and scroll down to POSTPROCESSING SCRIPT. Enter in the path to the PlexComskip.py file in that field. If you are unsure what the path is, open Terminal and drag the PlexComskip file into the window. Copy that path.

1 Like