Combination Gallery 2/AVI/Firefox does not display video
edwardotis
Joined: 2004-07-26
Posts: 38 |
![]() |
Try this Firefox extension out. Worked like a charm for me, and keeps things embedded in the page. Media Wrap or If you want the media to open outside the browser window in Media Player, you can use this one. MediaPlayerConnectivity enjoy, Ed |
|
jonziring
Joined: 2004-01-29
Posts: 1 |
![]() |
So, essentially I combined jvincent and sholden's suggestions because I wanted a download link and the embeded video. The lines were different than jvincent's GalleryMovieItem.class file so I figured I'd share my diff as well. Hope this help someone. -Jon GalleryMovieItem.class |
|
KEYofR
![]()
Joined: 2007-11-27
Posts: 1 |
![]() |
jvincent wrote:
Here is my workaround (5 lines change). This didn't work for me, perhaps because the line numbers were slightly different in my file (Gallery 2.1.1) and you didn't include any context, (grr) so I had no idea where to put the 274-277 section though I could figure out the other two. I was putting it right after the switch, before the case. Trying to load an album that had any videos in it would just give a blank browser window. But this slghtly different way worked. Put the re-write outside of and before the entire switch statement. $mimeType = $this->getMimeType(); if( $mimeType == 'video/x-msvideo' ) { $mimeType = 'video/x-ms-wmv'; } switch($mimeType) { ... $mimeType, ... Also, You are one thousand percent right about how to treat this, as something that needs a work-around within Gallery, at least unless a similar workaround might appear in firefox or possibly the divx web-player installer or of course if the real problem in the MS mplayer plugin ever gets fixed by MS. I can fix up my own browser any number of ways, or just use IE, but I'm still left with a web site that I have to always tell people what they can and can't do in order for the site to work "oh by the way it only works in internet explorer..." It doesn't matter that Gallery isn't what's broken, it's still no good to have a site that requires instructions. It's not even that it's so galling to say it works in IE but not in firefox. If it worked everywhere _but_ IE, it would be even worse. As far as this kind of fix breaking other contexts, I think we have all the info we need in order to make the fix very specific. First, the file command on one of the .avi's that my camera generates, does include "divx" (actually "XviD" in my case) $ file SNV31104.AVI so if necessary we can limit the fix to only divx, or a list of known broken codecs, not all .avi. However I think the problem isn't divx or divx+.avi, but any file that gets that mime-type. firefox doesn't know what to do with the mime-type, so detecting divx and only fixing divx probably isn't desireable. But it's there. Actually, where is that mime-type coming from anyways? What decided that the mime type should be "video/x-msvideo" in the first place? Maybe the fix should go there? Second, Don't we know what browser the client is using? Or at least what it's claiming to be? So we can also limit the re-write to only happen for firefox. In fact, can't we limit it to happen only for Windows firefox? |
|
rmmcclay
Joined: 2002-11-21
Posts: 4 |
![]() |
I had this same problem of AVI videos not playing in Firefox with Gallery G2. It would display a box prompting to download a plugin. It would check, but then report Unknown Plugin. Nice Firefox! =) I found this solution which worked for me...but of course it's not much of a solution for visitors: ********************************* It turns out, to fix this problem, you need to associate video/x-msvideo in Firefox. Instructions provided by: Avi in firefox. To do this, open the following file in notepad: Search for “Windows Media Player Plug-in Dynamic Link Library” and add the bolded lines: Windows Media Player Plug-in Dynamic Link Library|$ Increasing 9 to 10 tells it that there’s 9 mime types you should associate this plug-in with. Adding the video/x-msvideo line tells it to associate mime types of that with Windows Media Player. Afterwards, all my avi files began to play fine. After saving this file, restart Firefox and video with the mime type of x-msvideo should play fine. |
|
Antonimo
Joined: 2007-08-07
Posts: 3 |
![]() |
Could somebody post the full, working "GalleryMovieItem.class" - My file seems to be different. I am using Gallery 2.2.2 and lines 258 - 266 look like this: case 'video/mpeg': case 'video/mp4': case 'video/x-msvideo': case 'video/x-ms-wmv': $classId = 'CLSID:05589FA1-C356-11CE-BF01-00AA0055595A'; case 'video/x-ms-asf': case 'video/x-ms-asx': if (!isset($classId)) { $classId = 'CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'; I would prefer to go the route that does not require any extra effort from the website's visitors. |
|
buccinator
Joined: 2007-12-29
Posts: 1 |
![]() |
replace (inside render func) case($this->getMimeType()) with $mimeType = getMimeTyps(); case($mimeType) then replace case 'video/x-msvideo': with case 'video/x-msvideo': $mimeType = 'video/x-ms-wmv'; see how you go, im using bleeding edge everything but the snippet you posted looks similar enough Antonimo wrote:
Could somebody post the full, working "GalleryMovieItem.class" - My file seems to be different. |
|
tallthom
Joined: 2008-02-04
Posts: 6 |
![]() |
Still seeing this problem in Firefox with avi files from a digital camera (MJPEG format, I think). (Mom just wants to see the kiddies!) Did we end up with a final resolution to this problem? Is the G2 supported position that I edit my Firefox settings for the proper mime type? Or should I implement the "hack" to the GalleryMovieItem.class file listed above (in various forms, shapes, and sizes)? Or has this thread moved and I've been the only one not to find it's new location? Please advise. PS - I always get frustrated (as do others) when the open source community can't decide whose problem is whose. As mentioned by other frustrated folks, if it doesn't work for the end user... they are more likely to go back to the non-open source solutions. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
Did we end up with a final resolution to this problem? Not that I am aware of. Too many variables from source files to browsers/OSs/players. Quote:
PS - I always get frustrated (as do others) when the open source community can't decide whose problem is whose. As mentioned by other frustrated folks, if it doesn't work for the end user... they are more likely to go back to the non-open source solutions. I think the best solution is to convert videos to .fla files. We have a great player that works on more platforms/browsers. Dave |
|
rogermh
Joined: 2005-01-09
Posts: 102 |
![]() |
Quote:
I think the best solution is to convert videos to .fla files. We have a great player that works on more platforms/browsers. Or convert them to Quicktime (.mov) files. The .avi (MJPEG) files from my Canon camera are monstrously large. Quicktime reduces the file size considerably while maintaining video quality. And, of course, the converted .mov files work on both IE and FF. |
|
TheAnt
Joined: 2006-05-24
Posts: 24 |
![]() |
sholden wrote:
On my local install I modified modules/core/classes/GalleryMovieItems.class to put the "Download Movie" link outside the object block. In other words I changed '<noembed>%s</noembed></object>' to '</object><p>%s</p>' (around line 286). I have got some problem with the download link... |
|
deechte
Joined: 2008-02-24
Posts: 8 |
![]() |
Quote:
GalleryMovieItem.class Thanks a lot! This works for me with Gallery 2.2.4. Now movies play fine embedded with both IE and Firefox. I too wanted a solution on my server. Didn't want my visitors to have to change things... |
|
douglasvb
Joined: 2008-09-15
Posts: 12 |
![]() |
Did a fix end up making it into Gallery 2.3RC1? |
|
Takster
Joined: 2008-09-25
Posts: 1 |
![]() |
mindless wrote:
here's one workaround: use quicktime plugin instead of media player. Pretty lame suggestion, you think I wanna post instructions on editing firefox files or avoiding .avi because the GALLERY cant handle it? you have the workarounds here for the script that are never implemented. Lucky this is free beer because if I had a developer palming me off with stupid suggestions my mother would think of rather then FIX the code IN THE GALLERY I'd be looking for new dev's. Just fix the damn thing, it's been long enough already. You cant blame MS or firefox when other gallery scripts have no problems playing an avi. |
|
TheAnt
Joined: 2006-05-24
Posts: 24 |
![]() |
Quote:
Here is my workaround (5 lines change).... It took me a while to get it working, didnt really understand the code change since the lines had changes from the version you had list ($width, $height) = array($this->getWidth(), $this->getHeight());
switch($this->getMimeType()) {
case 'video/quicktime':
to
list ($width, $height) = array($this->getWidth(), $this->getHeight());
switch($mimeType = $this->getMimeType()) {
case 'video/quicktime':
and on line 259 case 'video/mpeg':
case 'video/mp4':
case 'video/x-msvideo':
case 'video/x-ms-wmv':
to case 'video/mpeg':
case 'video/mp4':
case 'video/x-msvideo':
if( $mimeType == 'video/x-msvideo' ); {
$mimeType = 'video/x-ms-wmv';
}
case 'video/x-ms-wmv':
and last on line 287 $src, $src,
$width, $height + 50,
$this->getMimeType(),
$fallback);
to $src, $src,
$width, $height + 50,
$mimeType,
$fallback);
|
|
deechte
Joined: 2008-02-24
Posts: 8 |
![]() |
deechte wrote:
Well, I recently updated to G2.3, and the problem wasn't fixed with the new release. However, the workaround above still works. The GalleryMovieItem.class file from G2.2.4 can even be used in G2.3. The contents are the same, except for some comments. The code is identical. Good thing is that the fix also puts the direct download link back! |
|