I have just setup coppermine and had no problems until I started adding video. I FTP uploaded my video and corresponding thumbs into the same folder. The video and thumbs are named with the following naming convention:
george1.jpg
george1.mpeg
george2.jpg
george2.mpeg
The thumbs show up fine in the album view but the video shows up as a 1x1pix white square. The video s also show up this way in the "Random Files" and "latest additions" views. There is an error message that is added to each page that has the video thumb error.
QuoteWarning: getimagesize(albums/Video/TS%20Bill/thumb_george3.jpg): failed to open stream: No such file or directory in /www/i/x/htdocs/DISPhoto/include/functions.inc.php on line 1065
I have searched the forum and read through several post on this topic but found nothing that helped me. Thanks for any help that you can provide. Please let me know if you need any additional info.
Here is a link to the page that has the error.
http://dauphinislandsurf.com/DISPhoto/thumbnails.php?album=20
rename the thumbnails to use the thumb_ prefix.
When I uploaded my thumbs, coppermine created it's own thumbs. Do I need to delete these and rename my orriginal thumbs to "thumb_george1.jpg"? Also should I resize my orriginal thumbs to be 100x100?
This pic shows what is uploaded now as well as the thumbs that coppermine created:
You need to delete the pics you first put up as thumbs, but by using coppermine, not by ftp.
Then ftp the pics with the 'thumb_' prefix into the same folder. You do not have to try and batch add these pics.
And your thumbs don't have to be 100x100, but would look best at the same height or width setting as your usual thumbs.
Casper, you have me on the right track but I still have errors. After deleting the orriginal images and ftping up the new thumb_prefix images I can see the thumbs when I go to edit files for the particular album. On any other page I get the same white square and error message as before.
bump
I had this when I first did this, but I cannot remember what I did to cure it.
Have you set the image size for the videos. Check in the edit pics that they do not say 0 x 0
The image size is set to 320x240 which is the video size. What file would I need to look at to see my orriginal setup entries. I'm wondering if I should change my path settings. This might not be the problem since everything else(photos) works fine.
I suspect this may be caused by the fact you have a space in the folder name. Try creating a new folder, with the space removed, and see if it works there.
Thanks again Casper! 8) I renamed all of my folders to names without spaces and everything is good. All of my mpeg's are using their apprpriate thumbs. The only problem that is still pending is the wmv files. I uploaded 5 wmv movies with their thumbs but the thumbs won't show up. All I get is the standard Coppermine WMV file image.
Here's the page:
http://dauphinislandsurf.com/DISPhoto/index.php?cat=14
Have you got any more ideas, everything that you've suggested so far has helped me. Come on give me one more hint. ;D
That's an empty cat, with no files???
I managed to delete the whole album. :( After I created another album I tried to batch add the files to it but I got a "no new files" error when I chose the orriginal folder. I renamed the folder and was able to add the files to the new album. I still get the same problem with the wmv files. I don't understand why the thumb work for the mpeg's but not for the wmv's.
Here's the link again. This time the files are there.
http://dauphinislandsurf.com/DISPhoto/index.php?cat=14
What version of include/functions.inc.php and displayimage.php are you using?
You can find the version number in a line that looks like this in the top of each file;
// CVS version: $Id: displayimage.php,v 1.10 2004/08/23 06:39:53 gaugau Exp $
// CVS version: $Id: functions.inc.php,v 1.20 2004/09/15 08:36:33 gaugau Exp $
If yours do not match the versions above, get them from the cvs, http://cvs.sourceforge.net/viewcvs.py/coppermine/stable/, and see if that cures the problems.
IU updated the displayimage.php and functions.inc.php files to the newest versions. Still no luck. My wmv files still wont associate with the thumb files. I even created a test album(called test) and FTPed different wmv files and thumbs but got hte same result. ???
bump
I visited your site, and looked in the test album. You have a video called a2.wmv - do you have a custom thumb called thumb_a2.jpg in the same directory as the a2.wmv file?
Yes, there is a custom thumb named thumb_a2.jpg.
confirmed: http://dauphinislandsurf.com/DISPhoto/albums/Video/test/thumb_a2.jpg (see http://dauphinislandsurf.com/DISPhoto/albums/Video/test/ for an index).
Not sure what's wrong though.
Joachim
Just as a thought, try renaming the file extensions of the wmv files to lower case.
I'd test this myself, but my test site is down at the moment :-\\
I tested the idea and that was the problem. I never even thought about the capitalized extentions. Thanks to everyone that has helped me with this problem.(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fforum.msi.com.tw%2Fimages%2Fmsi%2Fsmilies%2Fbiggthumbsup.gif&hash=3f305ae8801bee6b0a10468a2c00ffe8f3a7b957)(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fforum.msi.com.tw%2Fimages%2Fmsi%2Fsmilies%2Fbiggthumbsup.gif&hash=3f305ae8801bee6b0a10468a2c00ffe8f3a7b957)(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fforum.msi.com.tw%2Fimages%2Fmsi%2Fsmilies%2Fbiggthumbsup.gif&hash=3f305ae8801bee6b0a10468a2c00ffe8f3a7b957)
just as a rule of thumb: capitalization can cause errors in many ways - to be safe, always use lower case, for folders, files and extensions (what I'm suggesting: it's not a good idea to have upper case letters in an url like http://dauphinislandsurf.com/DISPhoto/ ).
Joachim
Actually some cameras, at least my Minolta XT, outputs the filenames with capitalized extensions. Would it be possible to get a small patch that allows capitalized extensions for video thumbnails just as it works for pictures with capitalized extensions?
I've tried to figure out the code myself but I just couldn't find the problem :(
Ok, so I made a small fix that solves the problem if you have capitalized file extensions AND they are exactly three characters long.
In functions_inc.php I did the following: (the commented line is the original line, the others are the new lines)
$pic_length = strlen($pic_row['filename']);
$pic_extension = substr($pic_row['filename'],$pic_length - 3,$pic_length-1);
//$file_base_name = str_replace('.'.$mime_content['extension'],'',basename($pic_row['filename']));
$file_base_name = str_replace('.'.$pic_extension,'',basename($pic_row['filename']));
I think the original problem was that the file extension is assumed to match that given in the mime type, case sensitive.
I'm not sure if it's a good idea to incorporate my fix in a regular release since it assumes three character file extensions so I'm just posting it here for now. Is this ok with the Coppermine license?
One more thing: I couldn't see the thumbnail for the videos on the thumbnails page. It appears that image dimensions can't be retrieved for videos and they then get set to 0 instead of omitted so the thumb can be displayed. Well, actually the should be calculated from the thumb but I couldn't be bothered so I just fixed the problem with image dimension being set to 0 instead of omitted instead. Here's the hack in functions.inc.php at the end of function compute_img_size:
if (width == 0 && height == 0) {
return '';
}
return $image_size;
Hello,
I did improve bunkers code a litte with a regular expression which will strip all characters in front of the last "." and the "." itself, leaving only the file extension, no matter how many characters it has.
$pic_extension = ereg_replace('.*\.','',$pic_row['filename']);
$file_base_name = str_replace('.'.$pic_extension,'',basename($pic_row['filename']));
Works fine for me!