Reduce storage size of 'thumbs' folder (MovPic + TVSeries) (1 Viewer)

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Note: This tool is only meant for users who want to reduce their 'thumbs' folder storage size. It is *NOT* required.

    Moving Pictures and MP-TVSeries store large images in this folder and their accumulated size can add up quick, even causing delays when scrolling fast. At first this batch file was only meant to solve the PNG image format that MovingPictures uses in some versions (some with JPG extension), but it has expanded into more.

    In short this script now converts all the images into the JPEG image format and reduces their filesize to be below certain thresholds. It will first try reducing the JPEG quality, by removing information most human eyes can't distinguish. When the first reduction fails, it will try again with a more aggressive reduction, and if that fails it will reduce the image size slightly.

    The filesize thresholds are 350kB for Fanart/Backdrops, 150kB for covers and 20kB for cover thumbnails. On my own collection roughly 60% was already below those thresholds, an additional 30% worked after the first reduction (JPEG 85), another 9.5% required JPEG 70 and only a stuborn 0.5% needed the maximum reduction. I personally found no visual difference after all was done, but then again my eyes aren't getting any younger :D

    To use this tool:

    • Please download Nconvert directly via: Nconvert 32-bit or Nconvert 64-bit
    • Download the attachment and unzip it inside the unzipped folder of the Nconvert tool.

    Then simply execute "!MediaPortal Fix Thumbs.cmd" and it will do the rest.

    Please be patient, the process takes a while. An added delay is caused by the fact that all the images are first duplicated into the Temporary folder, then processed, and finally copied back (ugly but it works and avoids problems). A crude log file is created so you can verify the process afterwards.
     

    Attachments

    • !MediaPortal Fix Thumbs.zip
      1.3 KB
    Last edited:

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    RoChess mentions this mostly above but just wanted to point out, with the next release:

    1) All images will be stored as JPGs.
    2) The "incomplete image" bug will be resolved.
    3) The image caching issue will be resolved.

    You can expect something later this week I think.
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    So in the upcoming release the function (what it does) of this 'fix' will be implemented?
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    RoChess' script converts existing covers from PNGs to JPGs and reduces the image size to a height of 800 pixels. For people with large collections this will save a lot of disk space because PNGs are large, and themoviedb.org has some ridiculously huge cover images.

    With the next release of Moving Pictures we will begin to save images as JPGs instead of PNGs. We will probably add the resizing functionality as well, but I haven't decided on that yet. Leaning towards yes. And as a side note, two somewhat related bugs will be fixed, the problem with cover art and backdrops getting loaded into the skin cache and the problem with some covers and backdrops not fully downloading.

    We will not be converting existing image files from PNG to JPG.
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    Right, thanks, I guess I'll be running RoChess's thing first ;)
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #6
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    My 'trick' does not change the PNG extension into JPG. It does convert all the images into the JPEG format, but it leaves the file extension alone, because those are stored inside the database and would cause problems then.

    But to avoid the conflict with the MediaPortal skin cache function as fforde highlighted (MediaPortal tries to cache all the PNG files in the thumbs folder, so it crashes on the large amount of cover and backdrop images), it would still be advisable to delete the PNG files from the MovingPictures thumbs folder after you are running the version with fforde's fix included.

    Then the MovingPictures plugin can obtain those again and store them in the right format (and update the database). But at least you will be able to spread this out by doing a few per day or per month depending on your how your bandwidth usage is limited.

    I run a small 32GiB C: drive partition (my goal is to switch to one of those Kingston or Intel 40GB SSDs), so I was simply getting worried about running out of space. That problem is now fixed :D
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    So what this does is: it makes JPEGs of the PNGs there are now, but still making MovPic think it's dealing with the same file, even though it's a JPEG now. So a PNG in a JPEG container.
    The upcoming MovPic version just saves images to come as JPEGs, no more PNGs. This means it's best to wait until that one's released and then run this fix?

    But does your fix make entirely new JPEG files or does it replace the PNG files?
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    This is getting way over complicated. There are no BMP files. If you are using Moving Pictures 1.0 Beta 2 images (covers and backdrops) are saved as PNG files. These take up more space than JPG files and if you have thousands of movies in your collection this can add up. RoChess' script converts these image files from PNG to JPG to save space, while leaving the filename the same so Moving Pictures doesn't lose track of it. It is extremely unlikely this will noticably improve performance of MediaPortal or Moving Pictures. It will save you a bit of disk space, that is all.

    If you have thousands of movies and are worried about an extra gigabyte or two of space used on your hard drive you may want to consider RoChess' script. Otherwise it can be safely ignored.
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    Okay, thanks. Sorry for being to hard headed :p

    I presume neither the fix in the upcoming release nor this one regarding the PNG/JPEG thing actually greatly improves performance?
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    42
    Texas
    Home Country
    United States of America United States of America
    Re: Reduce storage size of MovingPictures 'thumbs' folder.

    No worries, and no, this is not about performance. It's about disk space.
     

    Users who are viewing this thread

    Top Bottom