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-01-23 bleze Wrote:what about posters/covers. would help on scrolling instead of those placeholders showing up when scrolling fast I would like to see this kind of thing as well; using the .dds format for every image possible would most likely make XBMC run much more smoothly on ION machines and the like. It is entirely up to the devs to implement such a thing though. - EMK0 - 2010-01-24 how are u guys compressing the whole fanart folder? i can only do one at a time with the nvcompress. Could someone reattach the file that was on the first post please. - fidoboy - 2010-01-24 Hi all, i've readed with interest all this thread and what i'm reading is amazing for users (like me) with ION based machines and Atom processors (i've watched both videos in youtube and the performance gain is really good). Currently i'm using XBMC Live (linux) and it could be nice to test this new feature on my Zotac MAG HD-ND01, it could be very very useful if someone (may be in another different thread) could post the steps needed to use this feature (yes, i already know about advancedsettings.xml change) and to create a cron job that converts all images daily (or every x hours). WHere can i download de nVidia CUDA tools to convert the images? how can i create a little script to convert and remove original images in target folder or folders (i'm not sure where must i run this script) Well, any help would be most welcome, thanks in advance and keep up the good work guys! kind regards, - IceNine - 2010-01-25 EMK0 Wrote:how are u guys compressing the whole fanart folder? i can only do one at a time with the nvcompress. Could someone reattach the file that was on the first post please. I am compressing with nvcompress also, on the ION machine that XBMC is running on. I just wrote a little script to automate the process, but that was before I knew the .tbn files would recreate themselves if I moved them so I kinda need to rewrite it to be a bit more elegant. Unfortunately I'm not much a scripter, so if nobody beats me to it it might take a little while. I'll paste in the original script anyway if you want to use or modify it. All it does is rename all the .tbn files in the Video/Fanart folder to .jpg (have to for nvcompress to work), run nvcompress on all of them, then rename them back to .tbn. EDIT: Don't use this script, I have reworked it later on in the thread to be much more functional. Code: #!/bin/sh - fidoboy - 2010-01-25 IceNine Wrote:I am compressing with nvcompress also, on the ION machine that XBMC is running on. I just wrote a little script to automate the process, but that was before I knew the .tbn files would recreate themselves if I moved them so I kinda need to rewrite it to be a bit more elegant. Unfortunately I'm not much a scripter, so if nobody beats me to it it might take a little while. I'll paste in the original script anyway if you want to use or modify it. All it does is rename all the .tbn files in the Video/Fanart folder to .jpg (have to for nvcompress to work), run nvcompress on all of them, then rename them back to .tbn. Many thanks for sharing the script IceNine, but how can i get nvcompress installed on my XBMC machine? i can't see how to get it... - IceNine - 2010-01-25 fidoboy Wrote:Many thanks for sharing the script IceNine, but how can i get nvcompress installed on my XBMC machine? i can't see how to get it... Well that is a project that took me almost a whole day. Hopefully I can help you out! First what you will need: nVidia Texture Tools CUDA Tools g++ and gcc versions 4.4 and 4.3 libjpeg and dev files cmake Code: sudo apt-get install g++ g++-4.3 gcc-4.3 libjpeg62-dev cmake CUDA isn't strictly needed, nvcompress will still work pretty quickly with the -fast option, but CUDA still seems fastest. If you don't want to use CUDA, don't install the cuda tools because the texture tools won't compile without some extra work with g++ 4.3. To install the CUDA tools, in terminal go to the directory where you downloaded the CUDA file I linked and run Code: sudo sh cudatoolkit_2.3_linux_32_ubuntu9.04.run Now you have to add the cuda libraries to your shared libraries by editing a file. I use nano for my text editor, feel free to use whatever you like. Code: sudo nano /etc/ld.so.conf and add this line to the end Code: include /usr/local/cuda/lib/ After you save the file, run Code: sudo ldconfig -v to update the libraries. Assuming you want CUDA acceleration, after you have installed g++ and ran the CUDA tools installer, move to the nvidia-texture-tools directory (wherever you unzipped it to) and run Code: ./configure You should see in the list of things that come up that JPEG is found and CUDA is found. Something like this: Code: -- Configuring nvidia-texture-tools 2.0.7-1 If that works well, and you are on Ubuntu Karmic then you need to set up g++ to compile using version 4.3. Code: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 44 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.4 You can confirm that this finished right by running Code: sudo update-alternatives --display gcc Now set the system to run version 4.3 instead of 4.4. MAKE SURE TO CHANGE THIS BACK WHEN YOU ARE DONE. Code: sudo update-alternatives --config gcc You should see something like this: Code: There are 2 choices for the alternative gcc (providing /usr/bin/gcc). In this case you would type 1 and hit enter. Just put whatever number you have to switch to version 4.3. After this is done, in the nvidia-texture-tools folder, type Code: sudo make and, assuming everything compiled ok (I got some warnings in the compile process but it did finish and everything seems to work fine) type Code: sudo make install and it should install the files properly. At this point you can change your default compiler back to version 4.4 by running the same command as above and set back to auto (option 0 in the example). Try to run nvcompress (you should be able to do this anywhere in the command line now) and if you get the typical list of options than you are good to go. Initially I had some issues with nvcompress not seeing the needed shared libraries. You'll know if you have this same problem if, when you try to run nvcompress, you get an error saying it can't find some shared library. If this is the case, follow the next instructions. Move to the /usr/local/bin directory and check if nvcompress is really not seeing libraries. Code: cd /usr/local/bin You should see a list of libraries that nvcompress depends on. If you have any entries that say Not Found at the end than some libraries aren't being seen. I was missing one (libcudart.so.2) at the end of all these steps, but I fixed this by copying the file to a library I knew was working. Code: sudo cp /usr/local/cuda/lib/libcudart.so.2 /usr/local/lib/libcudart.so.2 You only need to do something like this if nvcompress gives an error that it can't find a shared library. Hopefully this should be thorough enough and I didn't forget anything. Pretty much all of this info I found digging around on Google. If anyone runs into any problems that I didn't cover here I can try to help, but I'm not much of a linux guru. - IceNine - 2010-01-25 Here is a new script that I scraped together today that will work much better for how DDS is used, at least for the time being. This script will scan your Fanart folder (currently only for Video fanart, it would be simple enough to add Music fanart if you use that), find any new .tbn files that don't have a .dds file also and convert them. This way you will always have both .tbn and .dds versions of any fanart. It will make things much easier if you switch between the two modes and XBMC won't always be remaking the .tbn files. Code: #!/bin/sh - fidoboy - 2010-01-25 WOW! Great tutorial IceNine, it's really useful, many thanks! i'll try it ASAP. I hope not to have any problem (i'm using karmic also). kind regards, - fidoboy - 2010-01-25 Hi again IceNine, i'm trying to get this working right now, but i've problems when using "sudo make" into "nvidia-texture-tools" folder, it gives me an error saying that target is not specified and there isn't any makefile. What i'm doing wrong? - arco - 2010-01-25 fidoboy Wrote:Hi again IceNine, i'm trying to get this working right now, but i've problems when using "sudo make" into "nvidia-texture-tools" folder, it gives me an error saying that target is not specified and there isn't any makefile. Did you run configure first? Code: sudo ./configure @IceNine, thanks for the script! I'll try it out on my box later. - IceNine - 2010-01-25 fidoboy Wrote:Hi again IceNine, i'm trying to get this working right now, but i've problems when using "sudo make" into "nvidia-texture-tools" folder, it gives me an error saying that target is not specified and there isn't any makefile. Now I knew I was going to forget something. I think the problem is that you need to install cmake along with the other dependencies to compile this. EDIT: I tried to compile the nvidia tools on a fresh Ubuntu 9.10 install and have updated the instructions so they actually work now. You should be able to follow them to the letter and it will work. - TeknoJnky - 2010-01-25 Very interesting thread. Has anyone attempted to use the dds on the osx/appletv? - fidoboy - 2010-01-26 arco Wrote:Did you run configure first? You are right arco, i was so excited with this that i forgot that line! Now all is working like a charm, i've also created a cron job to automate the process every day... I'll report any extrange issue here. Again, big thanks to IceNine for his effort... Another little question, can i uninstall gcc++4.3 and other libraries after doing this process? do they affect to my comp performance if i keep them installed? kind regards, - IceNine - 2010-01-26 Feel free to uninstall the libraries in my instructions, they aren't really needed (unless you compile something in the future, then you might need them again). There really isn't any problem leaving them installed, the only thing they will do to your machine is take up a few MB of hard drive space. - JumJum - 2010-01-26 Wow, the difference with dds fanart is amazing, great work! Here's a script creates dds files for any tbn files that don't have one already. It doesn't rename all the files like the other scripts and it has a progress indicator. Code: #!/bin/sh I seriously can't tell anymore if a fanart is loaded from the 2 sec cache or not. That was the only little annoyance I had with with XBMC. Again, wonderful work! XBMC is now perfect! |