Server Version#: Plex Media Scanner v1.27.2.5929-a806c5905
Why does Plex Media Scanner updating the date/time of TV shows that are stored as mp4 files when scanning the media library?
I noticed this every time I go to backup my media library files, only the date/time is changed for mp4 files only (it does not do it with mkv files). I can see in “Plex Media Server.log” that the corresponding directory was scanned by Plex Media Scanner the exact date/time the mp4 timestamp gets changed because in the log it will have the full name of each mp4 file and log:
“File ‘<episode-file-name>.mp4’ changed write time, can’t skip.”
Is there any way to turn off this behavior, or is this a possible bug? Every week when I backup my media files, all my mp4s get unnecessarily backed up again even though only the file timestamp was changed by Plex Media Server.
Well, Plex is the only program scanning my media files and it logs that the time is being “written” for every media file I find that has its time stamp changed.
Why would the timestamp on my mp4 files be set to the exact hour/minute/second that Plex Media Scanner is scanning the directory?
For example, for my Plex copy of my Billions TV Series DVD collection…
.
.
.
E:\Downloads\Plex Media Server Logs_2022-07-04_22-02-15\Plex Media Server.log (9 hits)
Line 1830: Jul 04, 2022 20:16:41.979 [0x7fe990090b38] INFO - Library section 1 (TV Shows) will be updated because of a change in "/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4"
Line 16929: Jul 04, 2022 20:20:37.041 [0x7fe98b3e6b38] DEBUG - File '/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4' changed write time, can't skip.
Line 16935: Jul 04, 2022 20:20:37.109 [0x7fe98b385b38] DEBUG - Scanner [Plex TV Series]: found cloud match for file '/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4': 'Billions'
Line 16937: Jul 04, 2022 20:20:37.111 [0x7fe98b385b38] DEBUG - Looking for path match for [/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4]
Line 16944: Jul 04, 2022 20:20:37.164 [0x7fe98b385b38] DEBUG - Turbo analysis on modified item 124989 [/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4]
Line 16946: Jul 04, 2022 20:20:37.165 [0x7fe98b385b38] DEBUG - Updating part with ID=132428 [/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4]
Line 24669: Jul 04, 2022 20:24:03.069 [0x7fe98b004b38] DEBUG - IntroDetector: Initializing for "/volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4" (67348)
Line 24680: Jul 04, 2022 20:24:03.087 [0x7fe98b004b38] DEBUG - [Universal] Using local file path instead of URL: /volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4
Line 24682: Jul 04, 2022 20:24:03.088 [0x7fe98b004b38] DEBUG - [JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex\ Media\ Server/Codecs/d53cb63-4323-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxx "/volume1/@appstore/PlexMediaServer/Plex Transcoder" "-codec:#0x02" aac -analyzeduration 20000000 -probesize 20000000 -i /volume1/media/TV/Billions/Billions.S01E01.Pilot.mp4 -filter_complex "[0:#0x02] aresample=async=1:ocl='5.1':rematrix_maxval=0.000000dB:osr=96000[0]" -map "[0]" -metadata:s:0 language=eng -codec:0 flac -b:0 4096k -f flac -map_metadata -1 -map_chapters -1 -t 1785.9300000000001 "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/Plex Media Server/Cache/Transcode/Detection/7d561aff-c1ba-4d44-9176-5c8862af3f23" -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/72a8e838-3e15-41da-9f4c-d2b00cbb615c/4307cf32-51a4-48bc-a851-68c4dd11bb64/progress
.
.
.
You can see below what Plex Scanner did to all the files within /volume1/media/TV/Billions on Jul 04 20:16:41 and that is exactly when the timestamp every file was changed to. It has to be Plex that is doing the timestamp change because all the date/times match up perfectly. It is almost as if Plex is doing a “touch” on every file in that directly at the time it logs this “will be updated” message…
Why have you make user PlexMediaServer the owner of your media?
This is dangerous
This is not required.
In all the documentation, I’ve written to grant “READ-ONLY” or “Read/Write” (if needed) to System Internal User PlexMediaServer.
At no point have I stated to change the ownership (which WILL change the modified time)
You do present an interesting challenge. I will investigate it but have never seen PMS modify media timestamps when scanning even when it owns the media.
I thought PlexMediaServer had to have Full Control to the media file system for Synology DSM7. I read that in your post here where you say “You want to make certain that user PlexMediaServer has Full Control of all files and folders in the Plex share” Plex Media Server - Synology DSM 7 Preview - Issues ( Archive ) - Plex Media Server / NAS & Devices - Plex Forum. I must have mistakenly assumed it also needed Full Control to the share the media files were on (my bad).
If I can change PlexMediaServer’s permissions to Read/Write to the media share and see if the behavior for MP4 files go away, I am willing to try that. I can also change the ownership to admin:users if that will suffice. I do not have “Allow media deletion” enabled in the Plex Media Server settings, so I can probably change PlexMediaServer to Read-Only if Read-Write doesn’t fix the behavior for MP4 files, right?
In that post, I am referring to the Plex shared folder (where all the METADATA is stored). No media is involved in the migration from DSM 6 → DSM 7
The purpose of that action is to give the new username PlexMediaServer full control over all the metadata files (Plex shared folder) so it can then convert them to DSM 7 format.
For your media, which is how I have mine,
I own all my media (chuck:users)
In Control Panel - Shared Folder - Movies (EDIT), I grant “PlexMediaServer” permission to “Read-only” and "Apply to this folder, sub-folders, and files,
This provides a lot of capability:
From any computer on my LAN, I have full access and control of my media.
At no point in time can Plex change anything.
Linux provides all the security to prevent media from being deleted (even if I’ve accidentally enabled ‘Allow media deletion’ in my settings.
@pshanew , I don’t think so, do you have any idea how to do that on Synology DSM7.1? I do have “Enable File Station Log” check boxed for my media share and I do have Log Center installed, but it doesn’t look like it tracks access time (or I do not know how to config it to do so)
Thank you for your help… I have changed my media library folder and subfolders to read-only for PlexMediaServer… but that still begs the question on why Plex Scanner was changing the timestamp on on my mp4 files, and not touching my mkv files.