View Full Version : Thumbnail Optimization?

14-01-2011, 02:51 AM
I use a third party service that mass embeds videos from a bunch of different adult video sites and I have it sending videos to a site built with adult watch and a site built with another video script.

I have embedded about 18k videos on the adult watch site and 28k on the other site using a different script. The strange thing that I noticed is that the adult watch site has used up about 7 gigs of my hosting space where as the other site with more videos has used only about 500 mb of my hosting space.

Since im just embedding I figured it was the thumbnails and after looking at my hosting accounts disk usage stats, the adult watch "images/videothumbs" folder is taking up almost all of the space.

So, I decided to look at the actual file size of the thumbnails themselves and compared them to the sizes of the thumbnails on my other site and when comparing the larges image of two sets of 9k images the larges images on the adult watch site was around 220k as compared to the largest thumb size on my other site which is 17k.

Also I noticed that multiple thumbnails are generated when embedding videos into the adult watch site. I right clicked on the video preview in the admin area and did the same to a thumbnail on the live site, and the image names were different.

I guess after all that bable lol, I am asking if the adult watch script should have some sort of image compression built that this other script has or am I missing an option in the admin panel?

And does anyone have any idea whats up with the multiple thumbnail thing or has anyone seen that before when embedding videos?

14-01-2011, 09:49 AM
Just a quick update to my question. I was looking at the files for my other video site script and it looks like it does in fact use php's image optimization to reduce the file size of thumbnails that are added when thrid part videos are embedded.

I read about this feature of php but would have no idea how to build it into adult watch script. part of it looks like:

function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
if( $image_type == IMAGETYPE_JPEG ) {
} elseif( $image_type == IMAGETYPE_GIF ) {
} elseif( $image_type == IMAGETYPE_PNG ) {

Is this function built into adult watch anywhere or could thumbnail optimization be added in an update?

14-01-2011, 02:43 PM
AdultWatch has 10 thumbnails per video since it has rotating thumbnails, which is why it takes more space.

14-01-2011, 03:28 PM
While that is a "cool" feature, without image compression which from what i read is not a big deal to add when creating a script like this is something that should be default to save some of this extra space. Before I pay for customization I think i will set up a test install and see if I can Frankenstein a fix, whether its changing it to non rotating thumbs or using image compression. I do appreciate the answer though, i was pretty confused as to why all the duplicates.

14-01-2011, 07:37 PM
well i actually found that there is a really easy fix for this situation. The php plugin file that I added to my adult watch install actually has a function that sends the ten images to my site. Obviously this is to conform to the rotating thumbnails that are part of the adultwatch script. The problem is that the ten images that are sent are all the same so the rotation isnt event noticed. All i did was edited the plugin to remove all thumbnail creation arrays except videoid-1.jpg and now when i send videos only one thumb gets sent instead of a bunch of small ones and one huge one. The service i use is video swiper and since im sure there are others that use this service with adultwatch, look to your vsmod plug if you are trying to conserve hosting space oh and you can safely delete the extra images from your server using ftp if youve already added a ton of movies.

27-01-2011, 02:52 AM
I forget exactly where I found how to do this but it actually only involved changing a "for loop" from 10 to 5 (i wanted 5 pics rather than 10).. There were was 1 loop for the Downloads and 1 other for Uploads..

And that was it.. the script works fine and takes it from there