Detect Commercials and mark for skip, not working

I’m running the latest PMS version and was testing with the iOS Plex app 7.5.1 and the 6.6.10 Plex Preview app.

I recorded a few shows and have DETECT COMMERCIALS set to Detect Commercials and mark for skip.

The logs show the detect commercials running:
Plex Media Server.2.log:Sep 06, 2020 18:31:57.282 [0x7fe35ffff700] DEBUG - Job running: EAE_ROOT=’/tmp/pms-2d022573-0130-4d5b-a1b3-3ced4fcf3394/EasyAudioEncoder’ FFMPEG_EXTERNAL_LIBS=’/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/96550d8-3281-linux-x86_64/’ ‘/usr/lib/plexmediaserver/Plex Commercial Skipper’ ‘–ini=/usr/lib/plexmediaserver/Resources/comskip.ini’ ‘–output=/opt/plexmedia/TV/Friends (1994)/Season 09’ ‘-t’ ‘–quiet’ ‘/opt/plexmedia/TV/Friends (1994)/Season 09/Friends (1994) - S09E20 - The One with the Soap Opera Party.ts’
Plex Media Server.2.log:Sep 06, 2020 18:37:34.639 [0x7fe403f52700] DEBUG - Jobs: ‘/usr/lib/plexmediaserver/Plex Commercial Skipper’ exit code for process 24148 is 0 (success)
Plex Media Server.3.log:Sep 06, 2020 18:01:57.578 [0x7fe34aff5700] DEBUG - Job running: EAE_ROOT=’/tmp/pms-2d022573-0130-4d5b-a1b3-3ced4fcf3394/EasyAudioEncoder’ FFMPEG_EXTERNAL_LIBS=’/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/96550d8-3281-linux-x86_64/’ ‘/usr/lib/plexmediaserver/Plex Commercial Skipper’ ‘–ini=/usr/lib/plexmediaserver/Resources/comskip.ini’ ‘–output=/opt/plexmedia/TV/Pawn Stars (2009)/Season 08’ ‘-t’ ‘–quiet’ ‘/opt/plexmedia/TV/Pawn Stars (2009)/Season 08/Pawn Stars (2009) - S08E17 - The Chum-Sake.ts’
Plex Media Server.3.log:Sep 06, 2020 18:03:53.641 [0x7fe403f52700] DEBUG - Jobs: ‘/usr/lib/plexmediaserver/Plex Commercial Skipper’ exit code for process 22422 is 0 (success)

However, when I play the shows on iPhone or the latest Roku preview app, I never receive any option to skip the commercials.

Does anyone know what could be causing this or what to check to see if they are really being marked for skip? Also, can I disable commercial skipping for TV Shows and just have it run the commercial skipper after a show is recorded?

Thanks!

Server Version#: 1.20.1.3252
Player Version#: 6.6.8 and 6.6.10 (Preview) on Roku, 7.5.1 on iOS
Tuner Make/Model: HDHomeRun Quatro
Guide/Lineup name: Verizon FiOS DC Metro
Using XMLTV?: no
Channel number/Name: n/a

Here are the logs, there should be at least 1 or 2 recordings in those. I can confirm I looked at the metadata of the recorded shows after comskip supposedly ran and there is nothing there but the season, episode and show name.Plex Media Server Logs_2020-09-07_20-58-50.zip (7.1 MB)

Can you share the item XML for that episode?

Is a picture OK? I tried pasting the XML in here but it’s blank after I hit reply.

Any updates? What should I be seeing in the XML if the mark for skip was working?

OK, i have a few recordings that have commercial start and end and when playing on my Roku with version 6.6.10, i was prompted to Skip Ads.

I’m unsure of why it is working on some recordings but not others.

The XML data you posted doesn’t show any commercial markers having been generated for that recording. They’ll look something like this:
image

As to why they weren’t generated, full logs from the time of the recording my provide some clue. The log snippet you provided above doesn’t show the outcome of the commercial detection. There should have been some information immediately after the exit message, similar to this (for a successful case):

Sep 08, 2020 20:30:30.851 [0x70000e6bf000] DEBUG - Jobs: '/Applications/Plex Media Server.app/Contents/MacOS/Plex Commercial Skipper' exit code for process 6643 is 0 (success)
Sep 08, 2020 20:30:30.851 [0x70000f38a000] DEBUG - Recorder: EDL built after 31.0 seconds.
Sep 08, 2020 20:30:30.852 [0x70000f38a000] DEBUG - Updating part with ID=13731 [/Volumes/Seagate 8TB/DVR TV/The Andy Griffith Show (1960)/Season 04/The Andy Griffith Show (1960) - S04E06 - Gomer the House Guest.ts]
Sep 08, 2020 20:30:30.855 [0x70000f38a000] DEBUG - Doing expensive tags write for 'Gomer the House Guest' because something changed.
Sep 08, 2020 20:30:30.856 [0x70000f38a000] DEBUG - Updating part with ID=13731 [/Volumes/Seagate 8TB/DVR TV/The Andy Griffith Show (1960)/Season 04/The Andy Griffith Show (1960) - S04E06 - Gomer the House Guest.ts]
Sep 08, 2020 20:30:30.856 [0x70000f38a000] DEBUG - Removing all intermediate files at path The Andy Griffith Show (1960) - S04E06 - Gomer the House Guest.ts

I’m having the same issue, but with Android playing on Chromecast and Plex for Windows.

It works with Plex for web, or if I play in Android app directly, but if I try to cast it to my TV the skip button never appears, nor does it appear in the Windows app.

I provided full server logs that should have several recordings in it. Ignore the text snapshot I pasted in and look at the .zip file I uploaded.

I recorded 3 TV shows today and 2 of them have the commercial start and endtimeoffset, like in your screenshot. However, the 3rd one doesn’t and I’m trying to understand why. I’m currently recording 3 Movies to see how they turn out and I’ll post new logs when they are done.

1 Like

From that, I can only surmise that it didn’t find any ads :confused:

Yep, I see them now.

They look very much like the example I posted from my system earlier. Yours:

Sep 07, 2020 19:05:51.555 [0x7fe403f52700] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Commercial Skipper' exit code for process 50355 is 0 (success)
Sep 07, 2020 19:05:51.555 [0x7fe344ff9700] DEBUG - Recorder: EDL built after 230.9 seconds.
Sep 07, 2020 19:05:51.556 [0x7fe344ff9700] DEBUG - Updating part with ID=18219 [/opt/plexmedia/TV/CSI Miami (2002)/Season 08/CSI Miami (2002) - S08E20 - Backfire.ts]
Sep 07, 2020 19:05:51.559 [0x7fe344ff9700] DEBUG - Doing expensive tags write for 'Backfire' because something changed.
Sep 07, 2020 19:05:51.561 [0x7fe344ff9700] DEBUG - Updating part with ID=18219 [/opt/plexmedia/TV/CSI Miami (2002)/Season 08/CSI Miami (2002) - S08E20 - Backfire.ts]
Sep 07, 2020 19:05:51.561 [0x7fe344ff9700] DEBUG - Removing all intermediate files at path CSI Miami (2002) - S08E20 - Backfire.ts

Where it differs somewhat is that there is a library scan for that library and directory 10 seconds later:

Sep 07, 2020 19:06:01.197 [0x7fe3677fe700] DEBUG - Library Updater: Requested that section 2 be updated, force=0, deep=0, subdir=/opt/plexmedia/TV/CSI Miami (2002)/Season 08 iTunes=0
Sep 07, 2020 19:06:01.197 [0x7fe3677fe700] DEBUG - Library Updater: Queueing section 2

I wonder if that has something to do with it. Maybe it’s being scanned and rematched, overwriting the existing metadata?

What do you use for your guide data, Plex’s native source or XMLTV? With Plex’s native data it populates the metadata from the EPG; with XMLTV I think it may source metadata using a library scan. That wouldn’t explain why it works for some of your shows and not others though.

Speaking of, can you provide XML info and logs for a recording where commercials were correctly marked? Perhaps if your new movie recordings work?

I’m using Plex’s native source.

I have made progress. I created 2 new libraries for Recorded TV and Movies. Once I pointed the recordings there, 5 out of 6 TV shows and 3 out of 3 movies recorded have the commercial skipping info in their XML.

I’m happy with this result, so I’m not going to troubleshoot any further, unless another issue pops up.

Thanks for everyones help!

Do we have to do anything to enable this feature? Will recordings automatically scan, analyze and mark shows for commercial skip?

I believe you have to set it to Detect Commercials and Mark for Skip in the DVR settings (it’s one of the options in the drop down)

I remember seeing that option. I guess that means that shows that have already been recorded will not have the ability to skip commercials.

Also, it states below the drop down…

Attempt to automatically detect and remove commercials from recordings. This process may take a long time and cause high CPU usage. ‘Detect and delete commercials’ will delete detected commercial footage from your video files. ‘Detect commercials and mark for skip’ will leave the video files intact.

Does anyone know just how much CPU usage goes up after enabling this option?

Also, I use MCE Buddy to re-encode/compress the recording to save space. Does that mean that once the video has been process, the commercial skip option won’t be there?

1 Like

I’ve seen forum posts that say different things. One post says that someone saw where the Skip Ads would go back through old library items via scheduled tasks but the main assumption is that because the setting is under the DVR options, it’s limited to DVR recordings only.

Since the Skip Ads is non-destructive (it doesn’t alter the video file by permanently removing chunks of the recording), I don’t see why it would be limited to DVR recordings only. It’s just a update the the episode XML file with the marker locations, but someone at Plex will have to confirm for us.

If commercial skip gets it wrong, can we manually edit the XML markers to fix it?

I am using a PostProcessing Script to have MCEBuddy transcode the file before putting it into my library to save space. Basically I am converting the file from the raw .TS format to an MKV format. I am also using MCEBuddy to run comskip to remove commercials. Removing commercials this way is destructive and sometimes because it is not accurate, we lose some of the show.

If I used MCEBuddy/Comskip to only mark the commercials, it does so by setting chapters. The chapters do show up during playback in Plex, but it’s more involved to skip to the next chapter. That is why I would most likely prefer that Plex handle the commercials.

So, if I enable the Detect Commercials option to “Detect and Mark for skip” or even with “Detect and Delete”, will this happen before or after the PostProcessing Script runs?

More generally, is there any way to get the Skip Ads to show up from the MP4 Chapter Markers? Alternatively, is there a way to generate the needed XML for a MP4 we’re adding to the library?

1 Like

I call a post process script in Plex to transcode recordings to an mp4. I set SNL on 10/03/202 to record and detect and skip commercials. The recording completed, transcoded, and the XML file had the markers for skipping. I was only seeing it working on the hosted Plex Web site and the latest version of the Android app. It seems to me this process does not create chapters.

1 Like