Plex Re-Runs ComSkip During Scheduled Maintenance

Plex keeps Re-Running ComSkip During Scheduled Maintenance on files that it has already marked.
Why is this happening?

You’ll need to grab your logs so we can take a look.

Thanks for responding.
I little background. Moved my DVR Library to a larger drive.
This caused Plex to re-run Comskip, no problem kept Scheduled Tasks on for 20hr/day for 2 days so Plex could re-do the Ad Markers.

But Plex is re-doing them all again,.
You’ll see in the log that, for one example:
Mar 18, 2026 09:15:05.750 [125203169254200] INFO - Library section 32 (DVR TV) will be updated because of a change in “/media/dvr/DVR TV/Modern Family (2009)/Season 06/Modern Family (2009) - S06E02 - Do Not Push.log”

But… there was nothing (that I know of) that would cause a change.
In any event Plex is repeatedly re-running Comskip on files that already have Ad Marks

Attached is Plex Media Server.log.zip

Plex Media Server.log.zip (58.0 KB)

1 Like

Another example:

XML for a show has:
<Marker id="6050" type="commercial" startTimeOffset="403900" endTimeOffset="591260"> <Attributes id="6050"/> </Marker> <Marker id="6050" type="commercial" startTimeOffset="854150" endTimeOffset="981310"> <Attributes id="6050"/> </Marker> <Marker id="6050" type="commercial" startTimeOffset="1533570" endTimeOffset="1755920"> <Attributes id="6050"/> </Marker>

And Plex will still re-run ComSkip

Something is up with your tuner. The logs are filled with errors and warnings

Mar 18, 2026 09:05:19.010 [125203154488120] WARN - Subscription: No container available for /tv.plex.providers.epg.cloud:4/metadata/plex%3A%2F%2Fshow%2F6455689a05b746d5f6d1e9ea
Mar 18, 2026 09:05:19.010 [125203154488120] ERROR - Subscription: Error refreshing sub: No container found

I’m not suggesting that this relates to your issue but it does make seeing the issue in the logs more difficult. Could you download your entire PMS log set and share that please?

Logs attached.

I’ll look into the tuner issues separately (HDHomeRun is my tuner)

Plex Media Server Logs_2026-03-18_11-42-53.zip (293.1 KB)

You’ll likely need to enable debug (but not verbose) server logs for them to be useful for troubleshooting this. Right now debug logging is disabled so they don’t show the commercial skipper actually being run, or the debug context around it running.

You probably need to get this resolved before your logs will be helpful in understanding the comskip issue.

There is also a couple errors transcoder issues in there. I would advise to not using ramdisk for transcoding. How much memory do you have on this host?

Mar 18, 2026 11:16:45.180 [125245984213816] ERROR - [Req#b7dd/Transcode/a577e664-31cd-4cf3-843b-a15ff3ab5a84/92a60fe6-88a4-4c59-8985-fb4ef0bd0c00] [AVFormatContext @ 0x77f0abebd580] Requested output format '' is not known.
Mar 18, 2026 11:16:45.181 [125245997128504] ERROR - [Req#bb8f/Transcode/a577e664-31cd-4cf3-843b-a15ff3ab5a84/92a60fe6-88a4-4c59-8985-fb4ef0bd0c00] [out#0 @ 0x77f0a9880080] Error initializing the muxer for /mnt/ramdisk/Transcode/Detection/eab417ae-832d-4b7d-9669-7399ddae29b6: Invalid argument
Mar 18, 2026 11:16:45.181 [125245984213816] ERROR - [Req#bb90/Transcode/a577e664-31cd-4cf3-843b-a15ff3ab5a84/92a60fe6-88a4-4c59-8985-fb4ef0bd0c00] Error opening output file /mnt/ramdisk/Transcode/Detection/eab417ae-832d-4b7d-9669-7399ddae29b6.
Mar 18, 2026 11:16:45.182 [125245997128504] ERROR - [Req#bb91/Transcode/a577e664-31cd-4cf3-843b-a15ff3ab5a84/92a60fe6-88a4-4c59-8985-fb4ef0bd0c00] Error opening output files: Invalid argument

That’s unexpected I mostly Direct Play media and for Live TV I use the HDHomeRun App
Ramdisk is at 16G

Resolved. I removed the orphaned DVR schedules, ran a Guide Refresh and no errors.
I’ll Schedule an early Ssheduled Tasks and upload new (debug) logs in a few hours.

1 Like

Debug logs attached.

I verified with htop that Plex was running ComSkip on files already marked with skip markers.

Plex Media Server Logs_2026-03-18_14-56-49.zip (3.6 MB)

Can you provide the full XML info for this one?

/media/dvr/DVR TV/Modern Family (2009)/Season 04/Modern Family (2009) - S04E07 - Arrested

It’s one of the recent scans which indicate that commercials were found:

Mar 18, 2026 14:35:54.797 [131492584205112] INFO - Library section 32 (DVR TV) will be updated because of a change in "/media/dvr/DVR TV/Modern Family (2009)/Season 04/Modern Family (2009) - S04E07 - Arrested.log"
Mar 18, 2026 14:35:54.815 [131492600585016] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Commercial Skipper' exit code for process 67802 is 0 (Commercials found)
Mar 18, 2026 14:35:54.816 [131492466342712] DEBUG - [Req#8949/AdDetector] EDL built after 90.8 seconds.
Mar 18, 2026 14:35:54.820 [131492466342712] DEBUG - [Req#8949/AdDetector] Doing expensive tags write for 'Arrested' because something changed.
Mar 18, 2026 14:35:54.821 [131492466342712] DEBUG - [Req#8949/AdDetector] AdDetector: Removing all intermediate files at path `/media/dvr/DVR TV/Modern Family (2009)/Season 04`

Also, can you check the path /media/dvr/DVR TV/Modern Family (2009)/Season 04 to ensure there are no leftover *.edl, *.log, or *.txt? Their presence would indicate a problem with the cleanup process for ad detection.

1 Like

Modern Family (2009) - S04E07 - Arrested.xml.zip (4.3 KB)

None I actually have a script I run daily to check for leftover Comskip files

XML Attached

@Atomatth , @pshanew
I’ve been doing investigation myself.
I’ve identified that the very few files (32) that Plex correctly marked in the database have, for one example :
{“at:channelIdentifier”:“5fc76be06b022a002d868cc5-5fc705fbdd53a6002d8f92f7”,“at:mediaGrabBeginsAt”:“1773018000”,“at:mediaGrabDevice”:“device://tv.plex.grabbers.hdhomerun/10AB3137”,“at:mediaGrabOriginalDuration”:“1858180”,“at:mediaGrabPostProcessed”:“1”,“at:mediaGrabStatus”:“complete”,“at:origin”:“dvr”,“ma:videoProfile”:“high”,“url”:“at%3AchannelIdentifier=5fc76be06b022a002d868cc5-5fc705fbdd53a6002d8f92f7&at%3AmediaGrabBeginsAt=1773018000&at%3AmediaGrabDevice=device%3A%2F%2Ftv%2Eplex%2Egrabbers%2Ehdhomerun%2F10AB3137&at%3AmediaGrabOriginalDuration=1858180&at%3AmediaGrabPostProcessed=1&at%3AmediaGrabStatus=complete&at%3Aorigin=dvr&ma%3AvideoProfile=high”}

Which is (I believe):
{
“at:channelIdentifier”:“…”,
“at:mediaGrabBeginsAt”:“1773018000”,
“at:mediaGrabDevice”:“device://tv.plex.grabbers.hdhomerun/10AB3137”,
“at:mediaGrabOriginalDuration”:“1858180”,
“at:mediaGrabPostProcessed”:“1”,
“at:mediaGrabStatus”:“complete”,
“at:origin”:“dvr”,
“ma:videoProfile”:“high”,
“url”:“…”
}

Key fields:

  • at: prefix = Acquisition / TV (DVR) metadata

  • at:origin = dvr → recorded via Plex DVR

  • at:mediaGrabStatus = complete → recording finished

  • at:mediaGrabPostProcessed = 1 → post-processing completed

    • This is the critical flag your script is detecting
  • ma:videoProfile = high → media analysis result

:backhand_index_pointing_right: Interpretation:
**Fully recorded + post-processed (includes commercial detection phase)

(Yes, I’m using ChatGPT** :grinning_face: )

But for the 1,000+ files that Plex has not marked as Ad Marked (even after running Comskip multiple times) looks like:
{“ma:videoProfile”:“high”,“url”:“ma%3AvideoProfile=high”}

Now, one way is for me to edit the database to add the necessary indicators, but I would prefer finding out why this is occurring and fixing that so that Plex can add the indicators on the next Comskip

Hmm… That’s an interesting interpretation by ChatGPT. Unfortunately I can’t determine whether or not it’s accurate owing to the fact that my DVR library is configured to perform ad detection “For all items.” I have it configured this way because I move items into this library from NextPVR.

I can say that PMS doesn’t use that bit of metadata (at:mediaGrabPostProcessed) when configured to detect for all items (as it doesn’t exist for many items in my DVR library). In this configuration, it appears to rely solely on the presence or absence of existing ad markers in the database to determine whether or not to run detection again.

Mine is a dedicated DVR library so it makes sense to use “For all items.”

I also have it set for all items. I failed to mention, and it should not matter, that I moved my DVR Library to a new (larger) HD. I expected that Plex would re-scan for Ads, but did not expect that Plex would do it multiple times for the same show.

Not for me! I have checked and Plex has the ads marked in the database, but still re-processes them,

Weird. Maybe the extra metadata is used if present (the “at:” block) and it falls back to presence of markers if not, at least if configured for all items?

Out of curiosity, and in case it might be relevant, how did you perform the move? Did you copy all the media to the new location, add it to your library, scan, and then remove the old location? Or directly modify the media_parts table in the DB?

Stopped PMS, then rsync’d the media from the old drive (renamed) to the new drive (same name as the old hd) , unmounted the old drive then started plex and did a scan, and media refresh.

Didn’t really consider that would be wrong, but now that I look, it is what plex recommends:
https://support.plex.tv/articles/201154537-move-media-content-to-a-new-location/

1 Like

Those “Errors” are scheduled recordings that are not airing in the period covered by the Guide!
I deleted them from my scheduled recordings! :open_mouth:
Good thing I made a database backup :grinning_face:

Going to try a do-over
When I moved my DVR to a larger HD, I “re-used” the Library.
Just Deleted my DVR Library and then Added a DVR Library.
I’ll know if that works in a few days after this initial Ad-Detection Scan.

1 Like

Deleting my DVR Library and then Adding the DVR Library back worked :grinning_face:
Plex is no longer re-running ComSkip on files already marked as Ad Detected.

1 Like