XBMC Community Forum
Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+--- Thread: Compressed textures for FanArt - testing here with XBMC 2009-10-05 (r23431) or newer (/showthread.php?tid=59115)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


- Balthazar2k4 - 2010-02-05 02:52

Louike Wrote:if you remove the .dds file there will be a white background.

Thanks. I had it working all along it was just my testing method was flawed Wink


- headcase - 2010-02-05 19:21

bomana Wrote: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

Awesome, thank you.


- bleze - 2010-02-05 19:33

On Windows 7 x64 on a Intel I7 nvcompress.com 64 bit cannot load jpeg's. Running the win32 version works fine but I find that the -fast parameter actually is slower than running without.

-bc1 -fast: 1.950 seconds
-bc1 : 1.537 seconds
(both with CUDA enabled)


- IceNine - 2010-02-05 20:30

bleze Wrote:On Windows 7 x64 on a Intel I7 nvcompress.com 64 bit cannot load jpeg's. Running the win32 version works fine but I find that the -fast parameter actually is slower than running without.

-bc1 -fast: 1.950 seconds
-bc1 : 1.537 seconds
(both with CUDA enabled)

I also have the same issue with the 64-bit nvidia tools on Vista, the 32-bit ones work fine.

As for the times, I'm not positive but I think the -fast option doesn't use CUDA even though it reports that it's on, but it is MUCH faster than normal compression without CUDA. If you compare the times with just '-fast' and '-nocuda -fast', they are the same.


- bleze - 2010-02-05 23:56

The speed increase is amazing on my ASRock ION 330! Quality looks fine to me, but hard to tell with skin overlapping ect. I can't wait till this is standard. Will give the GUI such a boost especially when posters are supported also (perhaps skin gfx also?)
Thumbs up! Please make support for reading fanart.dss from movie folder (basically copy file to cache I guess?)


- ubuntuf4n - 2010-02-06 01:56

I would like to see whole skins in this standard, maybe they could also use the positive effects of this format.


- bomana - 2010-02-06 03:12

headcase Wrote:Awesome, thank you.

Smile You are very welcome.

I did some nvcompress testing on various boxen with and without CUDA and -fast. Seems like use CUDA on ION is the result. On my dual Xeon testbox CUDA isn't working and -fast is much faster. I added a -f switch to tbn2dds if that is better on your platform.

enjoy.


- Jezz_X - 2010-02-06 03:48

The skin if it uses xbt instead of xpr (or uncompressed) is already using this for some of this in its code because the TexturePacker already compresses the skins images into some formats that are better for straight reading by the gpu.

But I'll be damned if I can find any of the info on it now Smile


- D0nR0s4 - 2010-02-06 20:43

Works perfect over here, file sizes are 500% bigger, but no lags or artifacts at all with fanart, hope this will be integrated soon.


- bleze - 2010-02-06 21:50

Funny to see how slow Posters actually are compared to fanart. Crazy! It's like instant