Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer (/showthread.php?tid=59115) |
- IceNine - 2010-02-03 Marvel Wrote:I couldn't get the 64 bit nvidia texture tools working with the supplied batch file on Windows 7 x64, switched over to the 32 bit texture tools and it worked first time grrr Chances are that the path to the tools is different for 32- and 64-bit versions. I know that 64-bit Vista has different Program Files folders for 32- and 64-bit apps. If you really want it to work with the 64-bit tools, just find the exact path where they are installed on your machine and put that in the script. - Marvel - 2010-02-03 yeh mate i tried changing the paths but it wouldnt work for some reason it just kept grumbling about jpg isnt a supported format. Infact the above batch file is the correct path for the 64bit version i had to change to "C:\Program Files (x86)\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x" for the 32bit - thedalmeny - 2010-02-03 Just wondering.. Does XBMC recognize .dds for setting backdrops? I'm guessing it does... - IceNine - 2010-02-03 thedalmeny Wrote:Just wondering.. Not yet that I know of. Right now it is only coded to load .dds files in fanart. In the future this will probably be expanded to other images in XBMC, and the way the devs have been talking in this thread it looks like .dds will be the default compression for all cached images at some point in the future. As of right now though, it only works for fanart. - Marvel - 2010-02-03 I cant believe the difference this makes on the asrock 330ht its amazing. Just wanted to say a big thankyou to the xbmc team top draw as always M. - headcase - 2010-02-03 I went crazy on the existing script posted earlier in the thread (sorry at work, will post what I did when I get home), have it looping every couple of seconds to always check for new fanart and have it launched at boot with an init script. The one conditional that I didn't count on is if you change fanart for a movie. Apparently, the file name for the new fanart stays the same as the old one so the dds never gets recreated? I thought I was all done, but now I'll have to go look at how to act on time stamps in a bash script. Yet another (?) dds script.. - bomana - 2010-02-04 Skimming backward it seems like a few scripts are floating around there to deal with the dds conversion until a proper solution is in place in xbmc. Anywho, I wrote a script to convert my existing fanart. Then I wrote a script to monitor for new fanart. Then I thought that perhaps somebody else wants it, so I spent a short while merging them together, and cleaning up a little bit. It is messy. It is virtually untested (I have not tested on my production xbmc box -file server is down waiting for new sas kit). The script can be found here. Dependencies are inotify-tools and nvcompress. It uses inotify to monitor the dir(s) for files that are opened for writing, so there is no polling going on. When the opened file is closed nvcompress is run on the file. This should cover the case where you keep the original file and it gets over written with a new fanart while keeping the same file name. This script handles jpeg and png original images, as those are the only formats I have seen from themoviedb. There is an option to convert existing directories. (-c) Or an option to monitor directories. (-m) There is an option to delete the original file after conversion. (-r) There is an option to daemonize the process (run in background), in which case all output will be to logs. (-d) Logs are /tmp/tbn2dds.*, you can `tail -f /tmp/tbn2dds.log` to monitor nvcompress' progress if you running in '-d' mode. Example usage would be: tbn2dds -md /home/xbmc/fanart or tbm2dds -cr /home/xbmc/fanart The script is a hack. It is uggly. It is bad. It will make you cry. It will make neighborhood children laugh at you as they pelt you with their leftover lunches. There is virtually *NO* sanity checking at all. Use at your own risk. enjoy, Andreas - Balthazar2k4 - 2010-02-04 I am either an idiot or just flat out missing something, but I am running the latest SVN and I have converted my TBN files to DDS files. I made the change to the advancedsettings.xml and then moved the TBN files out of the fanart directory so that I could ensure the DDS files are being used. Now, I have no fanart in XBMC, what gives? - spiff - 2010-02-04 renaming the dds back to tbn. - Balthazar2k4 - 2010-02-04 spiff Wrote:renaming the dds back to tbn. Hmmm, I tried that too and I still got nothing. Let me make sure I understand the process. First, I change the extension of the files from TBN to JPG. I then run Nvidia Texture Tools to convert the JPG to DDS. I then rename the DDS to TBN and voila! Nope, not working for me.... - Louike - 2010-02-04 according to the scripts in this thread it's the .jpg that has to be renamed back to .tbn. edit: I just added the dds files and it does make a big difference, the performance issue's i had in some views of Alaska disappeared aswel. Nice work! - IceNine - 2010-02-04 Louike Wrote:according to the scripts in this thread it's the .jpg that has to be renamed back to .tbn. This is correct. If you use the scripts in the thread, or do the conversions manually you would follow these steps: 1. Change the extension of all the .tbn files to .jpg 2. Convert all the .jpg to .dds. This will make a copy of the file in .dds format, the .jpg will still be there. 3. Change the extension of all the .jpg files back to .tbn Don't change the .dds extension to .tbn, it won't work. The image loader in XBMC works on file extension so if a .dds format file has a .tbn extention, XBMC won't load it right. This way you will have a .tbn and .dds version of every fanart. You'll want to keep both in the Fanart folder because you need the .dds files there and the .tbn's will just be recreated if you move them. This does take up more space to have duplicates, but so it goes for now. Also, make sure you don't change the filename on any of the files, even the .dds files because XBMC won't be able to find them if you do. If everything is done right, when you are done you should have a .tbn and .dds version for every file name. - Balthazar2k4 - 2010-02-04 IceNine Wrote:This is correct. If you use the scripts in the thread, or do the conversions manually you would follow these steps: OK. That being said, how do you know it is working as it should? With both the TBN and DDS files together the only thing I should look for is a noticeable improvement in speed? - Louike - 2010-02-04 if you remove the .dds file there will be a white background. - neomits - 2010-02-04 This sounds great, and thanks for all the input everyone. Question (coming from someone with zero scripting experience) Whenever I try to run the batch script on a windows machine it keeps telling me that %%x is a supported format when running the command <"C:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools 2\bin\nvcompress.exe" -fast -bc1 %%x > if I put a single file name in place of %%x it works fine. Any thoughts as to what I'm typing wrong or what I can do to fix it? What does %%x mean in scripting? |