Plex is dumping hundreds of jpg files into tmp folder. Can this location be changed?

Server Version#: 1.25.4.5487
Player Version#: N/A

My /tmp/ folder is jam packed of .jpg files. All are album art. My question is. Why is it all being dumped into /tmp/ ? Will it get cleaned up automatically? And is there a way to point it to a different location? For example /tmp/plex_tmp/ ? I use /tmp directory regularly and need it to stay somewhat clean. But Plex is dumping hundreds of these .jpg files in there.

NOTE THE LAST LINE IN THE FOLLOWING LOG

Feb 09, 2022 03:11:40.047 [0x7f160bace848] DEBUG - [FFMPEG] - Setting default whitelist 'file,crypto,data'
Feb 09, 2022 03:11:40.047 [0x7f160bace848] DEBUG - [FFMPEG] - Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
Feb 09, 2022 03:11:40.047 [0x7f160bace848] DEBUG - [FFMPEG] - ISO: File Type Major Brand: M4A 
Feb 09, 2022 03:11:40.047 [0x7f160bace848] DEBUG - [FFMPEG] - Unknown dref type 0x206c7275 size 12
Feb 09, 2022 03:11:40.048 [0x7f160bace848] WARN - [FFMPEG] - stream 0, timescale not set
Feb 09, 2022 03:11:40.048 [0x7f160bace848] WARN - [FFMPEG] - stream 0, timescale not set
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - Before avformat_find_stream_info() pos: 123053 bytes read:155663 seeks:0 nb_streams:3
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=d8 avail_size_in_buf=59758
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=e0 avail_size_in_buf=59756
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 16 bytes (128 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=db avail_size_in_buf=59738
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - index=0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - qscale[0]: 2
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 67 bytes (536 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=db avail_size_in_buf=59669
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - index=1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - qscale[1]: 5
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 67 bytes (536 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c2 avail_size_in_buf=59600
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - Changing bps from 0 to 8
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - sof0: picture: 800x800
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 0 2:2 id: 0 quant:0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 1 1:1 id: 1 quant:1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 2 1:1 id: 2 quant:1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - pix fmt id 22111100
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - Format yuvj420p chosen by get_format().
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 17 bytes (136 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=59581
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=59551
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 53503 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=59522
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 6019 bytes (48152 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=53493
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 46536 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=53440
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 6904 bytes (55232 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=46508
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 44537 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=46461
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 1924 bytes (15392 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=44527
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 40340 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=44464
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 4124 bytes (32992 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=40327
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 31927 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=40254
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 8327 bytes (66616 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=31874
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 22326 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=31827
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 9501 bytes (76008 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 20395 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=22283
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 1888 bytes (15104 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=20376
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 18620 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=20330
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 1710 bytes (13680 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=18611
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 14539 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=18567
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 4028 bytes (32224 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=14523
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 58 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=14478
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 14420 bytes (115360 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=d9 avail_size_in_buf=0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - decode frame unused 0 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=d8 avail_size_in_buf=31599
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=e0 avail_size_in_buf=31597
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 16 bytes (128 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=db avail_size_in_buf=31579
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - index=0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - qscale[0]: 2
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 67 bytes (536 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=db avail_size_in_buf=31510
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - index=1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - qscale[1]: 5
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 67 bytes (536 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c0 avail_size_in_buf=31441
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - Changing bps from 0 to 8
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - sof0: picture: 500x500
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 0 2:2 id: 0 quant:0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 1 1:1 id: 1 quant:1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - component 2 1:1 id: 2 quant:1
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - pix fmt id 22111100
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - Format yuvj420p chosen by get_format().
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 17 bytes (136 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=31422
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=31389
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=31206
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=c4 avail_size_in_buf=31173
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 0 bytes (0 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - escaping removed 389 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=da avail_size_in_buf=30990
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker parser used 30601 bytes (244808 bits)
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - marker=d9 avail_size_in_buf=0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - decode frame unused 0 bytes
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - demuxer injecting skip 2112 / discard 0
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - skip 2112 / discard 0 samples due to side data
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - skip whole frame, skip left: 1088
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - All info found
Feb 09, 2022 03:11:40.048 [0x7f160bace848] DEBUG - [FFMPEG] - After avformat_find_stream_info() pos: 123059 bytes read:155663 seeks:0 frames:3
Feb 09, 2022 03:11:40.049 [0x7f160bace848] DEBUG - [MI] Chapters had generic titles, clearing.
Feb 09, 2022 03:11:40.049 [0x7f160bace848] DEBUG - MediaFile: found embedded image, saved to '"/tmp/00cd8b931216cb92b6b3a8e7ba9495b1.jpg"'

If you look at the variables defined in /systemd/system/plexmediaserver.service,

you can override them in a customization file for your system.

Moving the TMPDIR is common.

Thanks, Ill take a look.

Can you tell me why these are even put there? I thought all album art was in
/plexmediaserver/Library/Application Support/Plex Media Server/Cache/

I don’t know why the new music scanner does that.

I don’t have minimal music on my server but have never seen it fill up /tmp; although my /tmp is a tmpfs file system (RAM) and is cleared out each restart

Thanks. Mine is RAM disk as well, but it gets rebooted only if there is a power outage (maybe once every few years).

For anyone coming across this later, I did the following:

edited via:

sudo systemctl edit plexmediaserver

and put in:

Environment="TMPDIR=/tmp/temp_plex_dir/"

then

sudo service plexmediaserver restart

Make sure you create the directory manually, plex wont do it for you, and next update of the server will fail due to config not finding that folder.

Best not to edit plexmediaserver directly as your changes will get overridden upon the next server update.

Best to create an override.conf as per the links earlier in this thread.

Best not to edit plexmediaserver directly as your changes will get overridden upon the next server update.

Best to create an override.conf as per the links earlier in this thread.

running that systemctl edit command does precisely that, it creates the override.conf file

1 Like

Oh, okay. Didn’t realise that. I’ve always created the override.conf first. Noted for future reference, thanks.

Yeah, not sure when this note was added, but comment at the top of the file says:

$ cat /plexmediaserver/lib/plexmediaserver.service
# DO NOT EDIT THIS FILE DIRECTLY!
#
# Plex Media Server's variables can be customized by creating an 'overide.conf'
# file using 'systemctl edit plexmediaserver' which will create the following;
# /etc/systemd/system/plexmediaserver.service.d/override.conf

I think this is the best approach because then you are eliminating any possible permission and directory structure issues .

1 Like

Hey @ChuckPa , it appears that those particular jpg files are not being put into the TMPDIR. Bug? Or do I need to change it elsewhere as well for these files? They got dumped into /tmp/ as before even with config change.

As I mentioned in post above I have “Environment=“TMPDIR=/tmp/temp_plex_dir/”” already set

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