Forum Index > FlashYourWeb OS Support > Gallery New Topic Post Reply
 Playing MP4 files in Gallery 2.3.1
 |  Printable Version
sundansx
 September 26 2010 15:50 PM (Read 8785 times)  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

I have a bunch of mp4 files in my gallery. they are h.264 in an mp4 container. I routed out all of the Quicktime crap from my browser so it would not interfere with a more worthy effort. In the latest release notes for the flashvideo_04 module I downloaded from this site it says "supports video/mp4". I installed the module and removed the video/quicktime (ext = mp4) mime type from my gallery config. When I pull up a video it shows nothing. If I take one of my mp4 videos, change the extension to flv, and upload it to gallery, your flash player pops up and plays it.
Is it possible to play the mp4 videos (.mp4 extension) in the new flash player module? Do I have to change or add a mime type?
thanks for the help.


 
Profile Email
Quote
suprsidr
 September 26 2010 16:31 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

when you installed the new module it should have assigned the FlashvideoRenderer to all flv and mp4.
Uninstall/re-install the module.

-s


There will always be...
 
Profile Email Website
Quote
sundansx
 September 26 2010 17:07 PM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

Are there some instructions on how to install this module? I just removed the existing flash module from the 'modules' folder (after I "deleted" it in gallery"Wink and unpacked this one.

My mime landscaped looks like this after the install (for video types):
video/mj2 mjp2, mj2
video/mpeg mpg, mpeg, mpe
video/vnd.mpegurl mxu
video/x-ms-asf asf
video/x-ms-asx asx
video/x-ms-wmv wmv
video/x-msvideo avi
video/x-sgi-movie movie
x-conference/x-cooltalk

thanks for your help


 
Profile Email
Quote
suprsidr
 September 26 2010 17:30 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

unpack upload to your gallery2/modules/flashvideo
install through gallery admin -> plugins

you need to add video/mp4 .mp4

-s


There will always be...
 
Profile Email Website
Quote
sundansx
 September 26 2010 17:48 PM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

cool, I got it working...somewhat.
old videos still try to use the quicktime plugin that is disabled. New videos do not generate a thumbnail. In addition, I can play a test video (mp4, h.264) renamed to .flv fine. When I played a freshly uploaded .mp4 video the aspect ratio was wrong (see below). Any idea what's up?


 
Profile Email
Quote
sundansx
 October 25 2010 21:46 PM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

any idea why this is? thanks. still working on this. I will try some of the other players mentioned in your class.


 
Profile Email
Quote
suprsidr
 October 26 2010 05:50 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

My mime landscaped looks like this after the install (for video types):
video/mj2 mjp2, mj2
video/mpeg mpg, mpeg, mpe
video/vnd.mpegurl mxu
video/x-ms-asf asf
video/x-ms-asx asx
video/x-ms-wmv wmv
video/x-msvideo avi
video/x-sgi-movie movie
x-conference/x-cooltalk

I don't see mp4 listed.
did you add it to your apache mime.types file?
mine is located in /usr/local/etc/apache2/mime.types
you'll need to make sure mp4 is listed like so:
video/mp4 mp4
if your webserver does not know what is is, then gallery won't either.
Also make sure the same mime and extension is listed in Gallery Admin -> MIME Types

you older videos may have been assigned the wrong mime type if gallery and apache did not know what it was.
-s


There will always be...
 
Profile Email Website
Quote
sundansx
 October 26 2010 09:20 AM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

Hmm, I will check into my apache settings. thanks.


 
Profile Email
Quote
sundansx
 November 14 2010 23:46 PM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

I got a chance to check this and I setup my mimetypes to video/mp4 in both places. Did not affect current videos already in the gallery. If I had mimetypes set to video/quicktime, ext: mp4, in gallery at the time I added them would they be stuck that way? In other words, does gallery store mime type for a item in the database at upload time, or does it determine that on the fly from mime types?
thanks,
-ck


 
Profile Email
Quote
suprsidr
 November 15 2010 04:57 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Gallery stores the mimeType in g2_DataItem table.

You can add video/quicktime to the flashvideo module as well, but videos that are not .h264 will not play.
I did this for my niece as I sent her a Kodak Zi8 video camera which outputs .h264 .mov directly.

You'll need to edit several places:
modules/flashvideo/module.inc function activate:

PHP Formatted Code

        /* Add renderer on all GalleryMovieItems with video/x-flv and video/mp4 mime type that need it */
        $query = '
          SELECT
            [GalleryDataItem::id]
          FROM
            [GalleryDataItem]
          WHERE
            [GalleryDataItem::mimeType] = \'video/x-flv\'
            OR
              [GalleryDataItem::mimeType] = \'video/mp4\'
            OR
              [GalleryDataItem::mimeType] = \'video/quicktime\'
          '
;
 


modules/flashvideo/FlashVideoOption.inc function handleRequestAfterAdd:
PHP Formatted Code

        foreach ($items as $item) {
            if (GalleryUtilities::isA($item, 'GalleryMovieItem')
                    && $item->getMimeType() == 'video/x-flv' || $item->getMimeType() == 'video/mp4' || $item->getMimeType() == 'video/quicktime') {
                $flvItems[] = $item;
            }
        }
 


modules/flashvideo/classes/FlashVideoRenderer.class function canBeViewedInline:
PHP Formatted Code

    return GalleryUtilities::isA($item, 'GalleryMovieItem')
      && ($item->getMimeType() == 'video/x-flv' || $item->getMimeType() == 'video/mp4' || $item->getMimeType() == 'video/quicktime');
    }
 

and function render:
PHP Formatted Code

  if ($format != 'HTML' || ($entity->getMimeType() != 'video/x-flv' && $entity->getMimeType() != 'video/mp4' && $entity->getMimeType() != 'video/quicktime')) {
      return null;
  }
 


or edit the DataItem table to fix the mime for your mp4s

-s


There will always be...
 
Profile Email Website
Quote
sundansx
 February 02 2011 23:32 PM  
Forum Newbie
Newbie

Status: offline

Registered: 09/26/10
Posts: 7

suprsidr,
Things settled down around here and I did some more hacking on this and am happy to report that it is working great. I think the squashed videos problem was caused by my gallery pointing to an old version of ffmpeg (even tho I had downloaded yours) and picking up the dimensions wrong. I did the change to the flash module plugin to hijack the quicktime mime type and added the mime type to my apache server config (it was not set for mp4 as you suggested) - this will work for me because all I have up there for quicktime types are h264 videos. The last thing I had to do was uninstall both gallery plugins and install flashplayer then ffmpeg again and it started working.
Thank you very much for helping me get this working...I showed the wife and she was impressed.


 
Profile Email
Quote
tiptop
 December 09 2011 08:01 AM  
Forum Newbie
Newbie

Status: offline

Registered: 12/09/11
Posts: 2

Hello,

I would like to install flashvideo_05 on my gallery2 to use mp4 support but I am having some problems.
Version 1.0.5 (flashvideo_05) does not show in the automatic install of plug-ins (get more plugins only give me 1.0.3).
I downloaded flashvideo_05 and tried to install it manually but gallery then tells me it is not compatible.

Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h mod_autoindex_color PHP/5.2.6
Database = mysqli 5.0.67-community-nt, lock.system=database

Am I missing something obvious?

Thank you for your help.

-tt


 
Profile Email
Quote
tiptop
 December 13 2011 08:44 AM  
Forum Newbie
Newbie

Status: offline

Registered: 12/09/11
Posts: 2

Update: please disregard my previous post.
unzipping the updated flashvideo (v1.0.5) on top of existing and updating plugins in gallery works fine.


 
Profile Email
Quote
Content generated in: 2.32 seconds
New Topic Post Reply



 All times are PST. The time is now 03:49 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content