Album Art filling up 1TB SSD with very large images

So the good news is the new Album ArtLocal Files Only” feature does help in reducing library metadata size.

Bad news is that there are still metadata images (Artists) mainly around 5MB on avg but some are ridiculous size like 25MB and this uses almost 900gig of storage.

Good news is most of my 66,317 albums have now been added over a 14 day period scanning 24/7 and the SHIELD runs surprisingly well with this DB size (1.8gig).

The 1TB SSD was 100% full at one point, but the bundle clean and deleting gigs of *.tmp files cleared up 50gb.

Album art shows up perfectly as its embedded in all the tracks.

Still think there needs to be a image size filter incorporated into library settings as suggested in my earlier post.

fwiw that is way larger a library than is recommended for that hardware, just based on my experience.

Thats for sure @elan but what its worth - my experience when using a 1TB USB 3.1 external SSD and gigabit LAN / NAS I’m only seeing around 20% slower response times to a fresh install on the Shield so I am happy with that.

Storage, is the only issue and I don’t think it matters if you have a Quad Xeon server or a Shield - large SSD’s are expensive no matter the base hardware thus my request in this thread to be a little more mindful that terabytes worth of metadata are not exactly necessary - unless u are projecting your album/artist art onto a IMAX screen of course.

for those familiar with PHP and scripts, you can run this script on your Plex server metadata folder and it will resize your images to a more reasonable size:

thanks to Fursje
https://gist.github.com/Fursje

<?php

$a = new img_resize();
$a->run();

class img_resize {

        public $img_files = array();
        public $img_path = "";
        public $bad_files = array();
        public $img_pix_limit = 921600; // 1280*720

        public function __construct() {
                $this->img_path = getcwd();
                $this->img_path = '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/';
        }

        public function run() {
                $this->_get_images();
                $this->_resize_images();
                print_r($this->bad_files);
        }


        private function _resize_images() {
                foreach ($this->img_files as $img_file) {
                        $mogrify_out = array();
                        $cmd_resize = sprintf("mogrify -resize 921600@ '%s'", $img_file);
                        exec($cmd_resize,$mogrify_out,$mogrify_ret);
                        if ($mogrify_ret == 0) {
                                print sprintf("info: successfully resized:[%s]\n",basename($img_file));
                                $this->img_convert_success[] = $img_file;
                        } else {
                                $this->img_convert_fail[] = $img_file;
                        }
                }
        }
        private function _get_images() {
                $cmd = sprintf("find '%s' -type f -size +400k",$this->img_path);
                exec($cmd,$found,$ret);
                if ($ret == 0) {
                        foreach ($found as $file) {
                                $identify_data = array();
                                $cmd_identify = sprintf("identify '%s'",$file);
                                exec($cmd_identify,$identify_data,$identify_ret);
                                if ($identify_ret == 0) {
                                        // JPEG 1920x1080
                                        if (preg_match("/.*JPEG\s([\d]{1,})x([\d]{1,})\s.*/",$identify_data[0],$identify_m)) {
                                                $tmp_px_size = $identify_m[1]*$identify_m[2];
                                                if ( $tmp_px_size > $this->img_pix_limit ) {
                                                        print sprintf("info: [%s] size:[%sx%s] Needs resizing: [%s > %s]\n",basename($file), $identify_m[1], $identify_m[2], $tmp_px_size, $this->img_pix_limit);
                                                        $this->img_files[] = $file;
                                                }
                                        } else {
                                                $this->bad_files[] = $file;
                                        }
                                } else {
                                        $this->bad_files[] = $file;
                                }
                        }
                }
        }
}

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