Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Thumbnail issues in Video Gallery


Go to End


7 Posts   2029 Views

Avatar
stevanovich

Community Member, 63 Posts

22 July 2011 at 1:11am

Edited: 22/07/2011 1:12am

I am trying to create a video gallery using the information given by unclecheese re the youtube vids 1 and 2 about the filedataobjectmanager which is fine. I have everything working and ffmpeg running. Issue is I don't get any thumbnails these are not being made correctly, they are ending up as blank files in the thumbnail_folder. When debuggin it comes up with the following error which I think is generated because it cannot correctly find the height or the width of image as it ain't really there filenames fine file size is 0. Any ideas???

[Notice] getimagesize(): Read error!
GET /bottom-menu-items/videopage/?stage=Live

Line 29 in /srv/www/vhosts/*****/httpdocs/sapphire/filesystem/GD.php
Source

20 }
21 }
22
23 function __construct($filename = null) {
24 // If we're working with image resampling, things could take a while. Bump up the time-limit
25 increase_time_limit_to(300);
26
27 if($filename) {
28 // We use getimagesize instead of extension checking, because sometimes extensions are wrong.
29 list($width, $height, $type, $attr) = getimagesize($filename);
30 switch($type) {
31 case 1: if(function_exists('imagecreatefromgif')) $this->setGD(imagecreatefromgif($filename)); break;
32 case 2: if(function_exists('imagecreatefromjpeg')) $this->setGD(imagecreatefromjpeg($filename)); break;
33 case 3: if(function_exists('imagecreatefrompng')) $this->setGD(imagecreatefrompng($filename)); break;
34 }
35 }

Trace

* getimagesize(/srv/www/vhosts/*****/httpdocs/assets/video_thumbnails/000007589085sdflashvideo2.jpg)
Line 29 of GD.php
* GD->__construct(/srv/www/vhosts/******/httpdocs/assets/video_thumbnails/000007589085sdflashvideo2.jpg)
Line 293 of Image.php
* Image->generateFormattedImage(croppedimage,50,50)
Line 257 of Image.php
* Image->getFormattedImage(croppedimage,50,50)
* call_user_func_array(Array,Array)
Line 711 of Object.php
* Object->__call(CroppedImage,Array)
* Image->CroppedImage(50,50)
* call_user_func_array(Array,Array)
Line 369 of ViewableData.php
* ViewableData->obj(CroppedImage,Array,,1)
Line 446 of ViewableData.php
* ViewableData->XML_val(CroppedImage,Array,1)
Line 36 of .cache.themes.tutorial.templates.Layout.VideoPage.ss
* include(/tmp/silverstripe-cache-srv-www-vhosts-*****-httpdocs/.cache.themes.tutorial.templates.Layout.VideoPage.ss)
Line 420 of SSViewer.php
* SSViewer->process(VideoPage_Controller,Zend_Cache_Frontend_Output)
Line 411 of SSViewer.php
* SSViewer->process(VideoPage_Controller)
Line 202 of Controller.php
* Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 184 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
* ModelAsController->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
* Director::direct(/bottom-menu-items/videopage/)
Line 127 of main.php

Avatar
t00thy

Community Member, 31 Posts

25 July 2011 at 8:46pm

Hi, i have videogallery thumbnails as same as imagegallery. I have pic for every video in the gallery. So it didn't render from video, but I set the Default Icon.

Avatar
stevanovich

Community Member, 63 Posts

25 July 2011 at 9:11pm

Thanks toothy. Not too sure what you mean. You changed the image gallery to render videos and the thumb generator on the image gallery still works with video? Is that right? Does it need ffmpeg then? I have temporarily created upload thumb image separately with video but want to do it on the fly so it is easier for my client. Anyone got unclecheese vid examples working using vids 1 and 2 with ffmpeg. Any inspiration will help.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

27 July 2011 at 1:21am

It sounds like you might not have FFMPEG installed? Can you do FLV::echo_ffmpeg_test()?

I think that's the right function.. you might have to browse the FLV class for the right one if that doesn't work.. but there's something in there that will test it for you.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
stevanovich

Community Member, 63 Posts

27 July 2011 at 1:27am

Yes I did the test and it came out fine saying the ffmpeg is installed. I did not install ffmpeg-php as this doesn't seem to have been updated since 2006 and other threads say it is not needed. I have tested uploading a .mov file and it is indeed converted to .flv. So I am baffled just thumbs.

Steve

Avatar
UncleCheese

Forum Moderator, 4102 Posts

27 July 2011 at 3:30am

It looks like a permissions error. Can you verify that FFMPEG is creating the thumbnail? Maybe it's saving the file with permissions that Apache can't read.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
stevanovich

Community Member, 63 Posts

2 August 2011 at 1:48am

Okay the test movie was a comp downloaded from istock I was using this as a test to sort out the video gallery. There seems to be some kind of protection on the file therefore would not allow a thumb to be created. I tried another video one that is actually going on the gallery and hey presto the thumb worked. So be aware folks there maybe some protection on vid files. I didn't realize this......cheers