Server Version#: 1.41.4.9399 on Windows 10 22H2 (though given the number of .tmp files, this has been happening for some time)
Going through my log files, I noticed that there were some errors around preview thumbnail generation, and digging a bit deeper confirmed that recently generated preview thumbnail files (index-sd.bif) also have an identical index-sd.bif.tmp file alongside them. Based on my logs, it’s not intermittent - every video file I add that has preview thumbnails generated is leaving behind an identical .tmp file, with the following log message:
ERROR - [BaseIndexFrameFileManager] Couldn't delete the file "P:\Plex\Plex Media Server\Media\localhost\2\18049b1f056f752b061691a39f7898874dd42a7.bundle\Contents\Indexes\index-sd.bif.tmp": The process cannot access the file because it is being used by another process
The temp folder of individual images (Indexes/tmp/img-XXXX.jpg) appears to get cleaned up, it’s just the temp BIF file itself that can’t be removed because something is still holding on to it.
Nothing in particular is sticking out in the logs - it shows the transcoder exiting successfully, and the next message indicates the temp file can’t be deleted:
[154788] DEBUG - [BaseIndexFrameFileManager] Activity: registered new activity 4a24c972-09e3-4c69-ba24-f64a324047f5 - "Generating video preview thumbnails"
[168720] DEBUG - [JobRunner] Jobs: Starting child process with pid 89316
[154788] DEBUG - [BaseIndexFrameFileManager/JobRunner] Job running: set "FFMPEG_EXTERNAL_LIBS=\\\\?\\P\:\\Plex\\Plex\ Media\ Server\\Codecs\\e613bce-97f23d579c1001d8e9cc0d2e-windows-x86_64\\" & set "X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" & "C:\Program Files\Plex\Plex Media Server\Plex Transcoder.exe" -codec:v h264 -skip_frame:v nokey -i "Z:\TestLibraries\TVTest\TestShow (2000)\Season 01\S01E01.mkv" -threads 0 -nostats -q 3 -loglevel quiet -filter_complex "[0:V:0] fps=fps=0.500000:round=up,scale=w=320:h=240:force_original_aspect_ratio=decrease [out]" -map [out] "P:\Plex\Plex Media Server\Media\localhost\2\18049b1f056f752b061691a39f7898874dd42a7.bundle\Contents\Indexes\tmp\img-%06d.jpg" -progressurl http://127.0.0.1:32400/video/:/transcode/session/bif/4a24c972-09e3-4c69-ba24-f64a324047f5/progress
[154788] DEBUG - [BaseIndexFrameFileManager/JobRunner] In directory: "P:\Plex\Plex Media Server\Media\localhost\2\18049b1f056f752b061691a39f7898874dd42a7.bundle\Contents\Indexes"
<snip>
[173084] DEBUG - [Req#364a/Transcode/bif/4a24c972-09e3-4c69-ba24-f64a324047f5] Activity: updated activity 4a24c972-09e3-4c69-ba24-f64a324047f5 - completed 100.0% - Generating video preview thumbnails
[181884] DEBUG - Jobs: 'C:\Program Files\Plex\Plex Media Server\Plex Transcoder.exe' exit code for process 75056 is 0 (success)
[154788] ERROR - [BaseIndexFrameFileManager] Couldn't delete the file "P:\Plex\Plex Media Server\Media\localhost\2\18049b1f056f752b061691a39f7898874dd42a7.bundle\Contents\Indexes\index-sd.bif.tmp": The process cannot access the file because it is being used by another process
[154788] DEBUG - [BaseIndexFrameFileManager] Activity: Ended activity 4a24c972-09e3-4c69-ba24-f64a324047f5.
I don’t know if this is a widespread issue, but there’s at least one other person seeing this: Video Previews Thumbnails : PleX (and it does seem like something that could easily go unnoticed by the vast majority of people).
Full logs can be provided if needed.