Reduce storage size of 'thumbs' folder (MovPic + TVSeries) | Page 6

Discussion in 'Moving Pictures' started by RoChess, January 6, 2010.

  1. Jeditrav

    Jeditrav Portal Pro

    Joined:
    May 17, 2007
    Messages:
    319
    Likes Received:
    20
    Ratings:
    +20 / 0
    Home Country:
    New Zealand New Zealand
    Thanks. I tried all of that, still doesn't work - get exactly the same error message and log. Having the "C:\DOCUME~1\Zalman\LOCALS~1\Temp\" folder open while running the cmd I see that a 'MovPic.png' file is created, and each time I click on that file the preview image is different, so it seems that it is creating/duplicating a 'MovPic.png' for each image but not correctly processing/copying them back to replace the original oversized images??? I don't know! Any other ideas?


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    Ok, that means the problem occurs on the image reduction or on the copying back part.

    It's a pretty dumb script, it transgresses into your thumbs folder, copies the pictures it finds to the temp folder as MovPic.png, then it tries to convert them into MovPic.jpg via the nconvert.exe, if successful it verifies if the filesize is below the threshold and if not, tries to nconvert.exe with strong compression settings, etc.

    Add a "pause" line before and after the following line:

    copy "%TMP%\MovPic.jpg" "%%i" > nul​

    Because that is the line that takes the final version of the reduced result to copy it back to the original filename. Then you can monitor the %TMP% folder, which is "C:\DOCUME~1\Zalman\LOCALS~1\Temp\" in your case to see if that file got created. If it did not get created, the problem lies in the nconvert.exe process. If it does and it does not get copied over to were it is supposed to go, then you most likely have to fix write permissions issues on that import path (maybe read only ACL?)
     
  4. Jeditrav

    Jeditrav Portal Pro

    Joined:
    May 17, 2007
    Messages:
    319
    Likes Received:
    20
    Ratings:
    +20 / 0
    Home Country:
    New Zealand New Zealand
    Write permissions etc are all good, I dunno what's wrong, doesn't want to work for me. I've since processed all the images through an IrfanView batch conversion, all done now.
    Thanks for your help.
     
  5. Terra

    Terra Portal Pro

    Joined:
    August 25, 2009
    Messages:
    230
    Likes Received:
    36
    Ratings:
    +55 / 1
    Home Country:
    Austria Austria
    Show System Specs
    I have the same problem "Error: Can't create file" I tried to change the TMP directory in the script and I also called the exe manually with the same command the script would use, no luck.

    The "MovPic" file was created successfully all the time, it seems that nconvert.exe can't see/find it and throws an error?!

    I also tried to launch the script in compatibilty mode and used the new nconvert 5.60, no luck :(

    I use Win7
     
  6. elliottmc
    • Premium Supporter

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hi,

    If you install MediaPortal 1.1.0RC1, then you do not need to do this. That is, MediaPortal will not try to cache .png thumb files (which is what has given the crashes on startup) from moving pictures or mytvseries. This was fixed on the MediaPortal side of things. (I know that the current build - not sure if this is public yet - of moving pictures has a fix for this problem as well)

    Mark
     
  7. RoChess
    • Premium Supporter

    RoChess Extension Developer

    Joined:
    March 10, 2006
    Messages:
    4,182
    Likes Received:
    1,304
    Ratings:
    +1,683 / 2
    Maybe that's the problem, I wrote this batch script with NConvert v5.54, possibly they changed syntax, so I'll download v5.60 myself and verify.

    Yes, the PNG problem is no longer the main reason for this script if you have updated things. But total storage can still be a problem. Even with MovingPictures v1.0.3+ having build in support to reduce images, you might be stuck with large filesized images with a resolution below the thresholds.

    There are plenty of 1MB+ covers and backdrops as such on themoviedb website. Since this script works on filesize and not resolution, it can help avoid running into storage problems. Especially for users on a small OS partition, or small SSD, this can become an issue.
     
    • Like Like x 1
  8. Terra

    Terra Portal Pro

    Joined:
    August 25, 2009
    Messages:
    230
    Likes Received:
    36
    Ratings:
    +55 / 1
    Home Country:
    Austria Austria
    Show System Specs
    First I used the exe that was linked in the first post, after that I tried to use the new 5.60 version. I don't think its the syntax...

    My main motivation in using this script is not saving disc space, I have enough. I want more performance in Moving Pictures.

    Terra
     
  9. trythisone

    trythisone Portal Member

    Joined:
    April 13, 2008
    Messages:
    16
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    I'm having the same can't create file error. But I can get around it by specifying a different output file (ie. -o "%TMP%\MovPic1.png" ).

    Update: By adding
    -o "%TMP%\MovPic1.png
    to every nconvert call and then putting

    Move "%TMP%\MovPic1.png" "%TMP%\MovPic.png"

    on the next line I was ablr to get the script to work
    (It's a bit of a hack, but less likely to break the script)
     
  10. heaso1

    heaso1 Portal User

    Joined:
    July 9, 2008
    Messages:
    6
    Likes Received:
    2
    Gender:
    Male
    Occupation:
    Pilot
    Location:
    Newcastle
    Ratings:
    +2 / 0
    Home Country:
    Australia Australia
    Show System Specs
    After a lot of swearing I finally got the batch file to run.

    I'm running XP pro and had the "Can't create file" error.

    I followed Trythisone's advice and amended the nconvert calls from:

    nconvert.exe -quiet -out jpeg -ratio -resize 0 1080 -q 85 -rmeta -rflag decr -opthuff "%TMP%\MovPic.png" > nul

    to

    nconvert.exe -quiet -out jpeg -ratio -resize 0 1080 -q 85 -rmeta -rflag decr -opthuff -o "%TMP%\MovPic1.png" "%TMP%\MovPic.png" > nul
    Move /y "%TMP%\MovPic1.png" "%TMP%\MovPic.png"

    Notice I had to add a /y to the Move command.

    Also, where the copy command is used to copy the newly shrunken file back to it's original directory, I had to alter the extension from:

    copy "%TMP%\MovPic.jpg" "%%i" > nul

    to

    copy "%TMP%\MovPic.png" "%%i" > nul

    Here's the finished product in case anyone wants to try it. After download, just rename the .txt to .cmd (and obviously put it in the same directory as the previously downloaded nconvert.exe file).

    Big thanks to Rochess for doing the hard work. I couldn't write a batch file to save my life! :)

    View attachment !MediaPortal Fix Thumbs heaso1 style.txt
     
  11. lanceuppercu

    lanceuppercu Portal Pro

    Joined:
    January 13, 2008
    Messages:
    142
    Likes Received:
    1
    Location:
    London
    Ratings:
    +1 / 2
    i've been running this script regardless, but is it "not needed" with the current versions anymore?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!