Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Thumbnail issues in Video Gallery

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1191 Views
  • stevanovich
    Avatar
    Community Member
    60 Posts

    Thumbnail issues in Video Gallery Link to this post

    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

  • t00thy
    Avatar
    Community Member
    31 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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.

  • stevanovich
    Avatar
    Community Member
    60 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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

  • stevanovich
    Avatar
    Community Member
    60 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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

  • stevanovich
    Avatar
    Community Member
    60 Posts

    Re: Thumbnail issues in Video Gallery Link to this post

    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

    1191 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.