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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Thumbnail issues in Video Gallery


7 Posts   1221 Views


22 July 2011 at 1:11am (Last edited: 22 July 2011 1:12am), Community Member, 60 Posts

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

20       }
21    }
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);
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       }


* 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
* include(/tmp/silverstripe-cache-srv-www-vhosts-*****-httpdocs/
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


25 July 2011 at 8:46pm Community Member, 31 Posts

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.


25 July 2011 at 9:11pm Community Member, 60 Posts

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.


27 July 2011 at 1:21am 4085 Posts

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:


27 July 2011 at 1:27am Community Member, 60 Posts

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.



27 July 2011 at 3:30am 4085 Posts

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:


2 August 2011 at 1:48am Community Member, 60 Posts

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