Intro/Credit Detection

I was looking through the settings and saw that there was a way to set up the Intro & Credit detection as one of the three options:

  1. Never
  2. Scheduled Task
  3. Scheduled Task & As Media Is Added

Is there not an option available to only perform these scans as media is added?

No, there’s no such option.
Is there a specific use case for which you only want to apply this to newly added media (but not media already in your library)?

The usecase I have is that it was already performed and intros/credits are correctly marked, but every night it scans all of my media again and the connections in the morning tend to get throttled to the point that nothing plays.

I have to restart the server to get it to “wake up.” I’d much rather have it only scan it once when it’s added, rather than perpetually each night.

That sounds wrong and not how Plex usually behaves.
I’ve seen Plex reprocessing files during scheduled maintenance if the analysis didn’t succeed before, e.g. if there’s an issue with the container.

Can you confirm the intro/credit markers are in the media details?

I can see in the logs that it’s trying to run the IntroDetector well beyond the scheduled task hours.

Snippet from the logs:

Jan 19, 2025 08:29:03.677 [137822585498424] DEBUG - [JobRunner] Job running: "/usr/lib/plexmediaserver/Plex Media Fingerprinter" -raw -length 726.01499999999999 "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Detection/cc07b212-9b63-415b-a0ae-4b16c8b98229"
Jan 19, 2025 08:29:03.677 [137822585498424] DEBUG - [JobRunner] Jobs: Starting child process with pid 30931
Jan 19, 2025 08:29:03.677 [137822558235448] DEBUG - Transcoder: Cleaning old transcode directories.
Jan 19, 2025 08:29:03.677 [137822558235448] DEBUG - Whacked session d2dd0f62-afc5-439e-b98a-ea113b5e5fbb, 0 remaining.
Jan 19, 2025 08:29:03.677 [137822558235448] DEBUG - Cleaning directory for session d2dd0f62-afc5-439e-b98a-ea113b5e5fbb (/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-d2dd0f62-afc5-439e-b98a-ea113b5e5fbb-ab4f4676-5c24-4f38-98f6-b905283fd2f8)
Jan 19, 2025 08:29:04.494 [137822585498424] DEBUG - Killing job.
Jan 19, 2025 08:29:04.494 [137822585498424] DEBUG - Signalling job ID 30931 with 9
Jan 19, 2025 08:29:04.494 [137822700841784] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Fingerprinter' exit code for process 30931 is 0 (success)
Jan 19, 2025 08:29:04.510 [137822585498424] DEBUG - Activity: updated activity f5a3bd43-4f7e-49a0-a903-395bac571939 - completed 99.7% - Butler tasks
Jan 19, 2025 08:29:04.511 [137822585498424] DEBUG - IntroDetector: Initializing for "/nfs/plex/Plex/Anime/K-ON!/Season 2/K-ON! S02E21.mkv" (12540)
Jan 19, 2025 08:29:04.511 [137822585498424] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/12540
Jan 19, 2025 08:29:07.386 [137822585498424] DEBUG - We're going to try to auto-select an audio stream for account 1.
Jan 19, 2025 08:29:07.386 [137822585498424] DEBUG - Selecting best audio stream for part ID 73996 (language: )
Jan 19, 2025 08:29:07.386 [137822585498424] DEBUG - We're going to try to auto-select a subtitle for account 1.
Jan 19, 2025 08:29:07.386 [137822585498424] DEBUG - Selected a foreign audio track: ja
Jan 19, 2025 08:29:07.386 [137822585498424] DEBUG - Audio Stream: 205684, Subtitle Stream: -1
Jan 19, 2025 08:29:07.387 [137822585498424] WARN - MDE: unable to find a working transcode profile for video stream
Jan 19, 2025 08:29:07.387 [137822585498424] WARN - MDE: unable to find a working transcode profile for video stream
Jan 19, 2025 08:29:07.387 [137822585498424] DEBUG - Cleaning directory for session 3bc00efa-734d-40dc-9987-0b5652f361c8 ()
Jan 19, 2025 08:29:07.387 [137822585498424] DEBUG - Starting a transcode session 3bc00efa-734d-40dc-9987-0b5652f361c8 at offset -1.0 (state=3)
Jan 19, 2025 08:29:07.387 [137822585498424] DEBUG - Streaming Resource: Added session 0x7d59596ad688:3bc00efa-734d-40dc-9987-0b5652f361c8
Jan 19, 2025 08:29:07.387 [137822585498424] DEBUG - [Universal] Using local file path instead of URL: /nfs/plex/Plex/Anime/K-ON!/Season 2/K-ON! S02E21.mkv
Jan 19, 2025 08:29:07.387 [137822585498424] DEBUG - TPU: hardware transcoding: final decoder: , final encoder: 
Jan 19, 2025 08:29:07.388 [137822585498424] DEBUG - [JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/e613bce-3d5ad59c62e771ae9cb5738e-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:1 aac -analyzeduration 20000000 -probesize 20000000 -i '/nfs/plex/Plex/Anime/K-ON!/Season 2/K-ON! S02E21.mkv' -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[0]" -map "[0]" -metadata:s:0 language=jpn -codec:0 flac -b:0 4096k -f flac -map_metadata -1 -map_chapters -1 -t 726.01499999999999 "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Detection/df199a73-83cc-49bf-b02e-6a7955c0197f" -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/3bc00efa-734d-40dc-9987-0b5652f361c8/75661838-9340-4341-8c63-bcfe7784b87c/progress
Jan 19, 2025 08:29:07.388 [137822585498424] DEBUG - [JobRunner] In directory: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-3bc00efa-734d-40dc-9987-0b5652f361c8-75661838-9340-4341-8c63-bcfe7784b87c"
Jan 19, 2025 08:29:07.388 [137822585498424] DEBUG - [JobRunner] Jobs: Starting child process with pid 30932

The scheduled task hours are set to 02:00 to 05:00, but this ran beyond 10:00, and was still trying to run the IntroDetector on shows. There isn’t a credits marker on those, but there is an intro marker.

Looking through the logs, I do see this:

Jan 19, 2025 09:47:50.020 [137822541458232] DEBUG - [Req#143da/Transcode/78ce12f4-3b3e-4e31-b8d1-28458ac16f37/20894eed-fe22-417e-b5b7-a8cfed5a0577] Streaming Resource: Unthrottling session 0x7d5959b9a828:78ce12f4-3b3e-4e31-b8d1-28458ac16f37 which is using static transcoder slot.  Used slots is now 1

Which does make me think it might be something else causing the connection issues, but I can’t figure out what setting needs to be turned off.

Scheduled Task Settings:

I’ve verified that this is indeed the Intro & Credit detection that’s causing the issue.

I modified the window so that it would trigger now, and had the intro & credit detection tasks set to Never, and the tasks ran perfectly fine without any issues.

I then set the intro & credit detection tasks to as a scheduled task, and changed the window so that it would trigger. This is what I noticed:

  1. The NAS drive activity spiked significantly, upwards of ~100 MB/s, and with zero other server activity.

  2. The RAM usage spiked to max virtually the max allowed:

  3. After about 10 minutes of running the intro & credit detection, the server began to crawl to the point that I had to reboot the VM to fix it. I was unable to play any video whatsoever, which is the same behaviour I was seeing previously.

My theory is that it has something to do with the RAM being maxed out during this task process, but I’ve never had this issue when adding media and having it run the intro & credit detection at that time. I’ve only seen it be an issue when it runs as a scheduled task.

Also of note: the NAS is connected to the server via a 10G SFP+ line, and the Plex share is perfectly accessible to any other device during the times that Plex loses its mind.

If there’s not an option to only do the intro/credit detection when adding new media, I’ll have to set the option to never and remember to turn it on when adding new media, which is obviously not ideal.

Which NAS make & model please ?
Which Distro and CPU please ? (Is this proxmox?)

you’re using a VM on a Linux host ?

NAS: QNAP TS-435XeU-4G-US
Proxmox running on MS-01, intel 12900H CPU

Ubuntu Server 24.04.1 LTS VM running on proxmox with 8 cores and 8 GB RAM

I’ve had this happen once before.

The solution for me was:

  1. Change the Scheduled Task hours.
  2. Restart Plex
  3. Change them back

Pulling 100 MB/sec is not unusual. Intro and Credit detection reads through the entire file (potentially) until it finds the end of the Intros and start of the credits.

For Credits, it’s going to pull each frame from the file and look at it. This is CPU intensive.

Hmm, I’ve technically just done those 3 steps, so I’ll wait and see if it loses its mind again tonight.

In either case, is there any reason there isn’t a only when new media is added option for the intro & credits detection? Some of the shows it’s perpetually scanning will never have results for.

I believe that normal behavior for files that have been scanned for intro/credits should never be scanned for it again after. I would hope that even in a file with no detectable intro/credits, that Plex would remember that and avoid scanning the file again.

I have my library set to do partial scan.

PMS normally scans media only when you add it for the library section(s) where it’s enabled. ( I have it turned off because I have so much media it would be weeks running through it all )

If you have a piece of media which it scans over & over then it’s recommended to reprocess it (remux) or replace (there’s something wrong with it – which your full logs should show)

Is the /tmp folder mapped for the container?
If it’s not, I understand it would go to RAM. Which might be too small to hold all the audio of a whole season at once. Which is exactly what happens during intro detection.

Is the /tmp folder mapped for the container?
If it’s not, I understand it would go to RAM. Which might be too small to hold all the audio of a whole season at once. Which is exactly what happens during intro detection.

I’m not entirely sure here. I don’t think I’m using any containers, but I could be mistaken. I didn’t use docker for the install, and it’s on a VM, instead of an LXC.

Could that still be an issue? How could I check that?

Looks to still be doing the same thing this morning, so changing the time and restarting the server didn’t help.

Also, I’m seeing /tmp being utilized by PMS, and it has 80G free, but RAM is still pegged.

Update: This is definitely a RAM issue.

I doubled the RAM for the VM from 8 GB to 16 GB and it seems significantly more stable.

It was using 15 GB throughout the entire scheduled task window, but it was able to successfully complete.

I’ll keep monitoring over the next few days/week to see if it goes nuts again.

FYI 8GB ram is fairly now for modern standards. Not surprising that Plex+OS is maxing it.
Edit: some NAS’s can get away with lower RAM values but that is probably due to a lower OS overhead.

I think what initially threw me off was that the LXC Proxmox helper install script (specifically this: Proxmox VE Helper-Scripts) defaults to only 2GB RAM.

I had originally gone this route before and had the same issues, but chalked it up to LXC having issues with NFS shares, and went full VM, but it still had the same issues.

I gave the VM 8GB thinking it was overkill, but it looks like that’s still too low.

Of note: I had originally been running plex on a windows desktop with 32GB of RAM with the media stored locally, so I introduced numerous variables switching to a dedicated server and NAS. The memory usage was not even on my bingo card for the source of the problems.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.