Combination Gallery 2/AVI/Firefox does not display video

SanjuroE

Joined: 2005-01-26
Posts: 8
Posted: Tue, 2005-09-06 21:43

When adding an AVI file to my gallery it is recognized and ffmpeg creates a thumbnail for it. Viewing the item with Internet Explorer will result in the video being displayed.

However this does not work with Firefox. For some reason it seems that the Windows Media Player plugin in firefox does not recognize the video/x-msvideo MIME-type. Check [url]about:plugins[/url] and scroll to Windows Media Player to confirm this.

Technically this is not a Gallery problem, but a bug by Microsoft in there Firefox support. However since Microsoft is not very likely to fix this it would be nice if someone could provide a work-around and integrate this into Gallery.

----

Gallery URL (optional): N/A
Gallery version: 2.0 RC 2
Webserver (with version): Apache 2.0.54
Datatabase (with version): Mysql 4.1.14
PHP version (eg 4.2.1): 4.4.0
phpinfo URL (optional):
Graphics Toolkit(s): GD, ffmpeg
Operating system: Windows XP
Web browser/version: Firefox 1.0.6
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-06 22:34

can someone confirm this on his own server/browser combination?
last time i checked movie support, it worked ok in firefox. i tested it with wmv though the last time, but months ago i tested it also with .avi. could someone verify this with .avi? thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-09-07 01:25

here's one workaround: use quicktime plugin instead of media player.

 
SanjuroE

Joined: 2005-01-26
Posts: 8
Posted: Wed, 2005-09-07 07:12

I can get QuickTime to recognize the MIME format, however the AVI is encoded using Xvid and QuickTime does not support that. It gives the following error:

Quote:
QuickTime is missing software required to perform this operation. Unfortunately, it is not available on the QuickTime server.

Upgrading to the newest Quicktime (6.5.2) does not help.

 
mackis5

Joined: 2005-04-25
Posts: 22
Posted: Wed, 2005-09-07 10:03

you need decoders, like k-lite (http://home.hccnet.nl/h.edskes/mirror.htm) or the original DIVX decoders

 
SanjuroE

Joined: 2005-01-26
Posts: 8
Posted: Wed, 2005-09-07 11:28

I do have the proper codecs: if I download the movie it plays fine. But that is not the point, the point is that it does not play within the browser.

 
SanjuroE

Joined: 2005-01-26
Posts: 8
Posted: Thu, 2005-09-08 09:17

Check this URL with Firefox to confirm the problem for yourself:

http://d-ideg-1.idt.mdh.se:81/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=1012

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Fri, 2005-09-09 19:00

I just noticed this problem (at least I think it's the same problem) with my site. When I view movies with Firefox on my home Mac (where my G2 resides and is served), the video appears fine in the browser. However, when I use Firefox on my work PC (XP Pro), I get the missing plugin error even though I have the Quicktime plugin installed. Here's an example:

http://rohjuh.com/gallery/main.php?g2_view=core.ShowItem&g2_itemId=21895

This same link works fine on IE (Windows Media Player is the plugin that is used).

I really hope someone can fix this problem. I'm a big Firefox fan and always try to get people to use it, but it doesn't look good when Firefox doesn't work on my own site. :(

 
kjm05

Joined: 2005-09-10
Posts: 1
Posted: Sat, 2005-09-10 00:49

I too get the same problem!

Gallery version = 2.0-rc-1 core 0.9.34
PHP version = 4.3.3 apache2handler
Webserver = Apache/2.0.48 (Linux/SuSE)
Database = mysql 4.0.15
Toolkits = ArchiveUpload, Exif, Gd, ImageMagick, NetPBM, Thumbnail
Operating system = Linux Server 2.4.21-297-default #1 Sat Jul 23 07:47:39 UTC 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Sun, 2005-09-11 15:37

So is the consensus that this is a bug with G2? If so, I'd like to file a bug for it. Is that OK with the devs?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-11 15:54

is that a FF or a G2 bug?

on win XP, i get the missing plugin issue in FF, in IE it works.
tested with:
http://rohjuh.com/gallery/main.php?g2_view=core.ShowItem&g2_itemId=21895
and
http://d-ideg-1.idt.mdh.se:81/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=1012

 
SanjuroE

Joined: 2005-01-26
Posts: 8
Posted: Sun, 2005-09-11 15:59

I think this is a Microsoft bug, since it is their Media Player plugin for Mozilla that should play the AVI.

However since I don't think MS will be very willing to help out Firefox, I was wondering if someone could think of a work-around and implement it in The Gallery.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-11 17:10

maybe, but i can't promise anything.
feel free to file the bug, but maybe we'll have to close it as invalid, because we probably can't do anything about it for FF.

 
sholden

Joined: 2005-09-11
Posts: 3
Posted: Sun, 2005-09-11 20:07

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).

That way the download link always shows up, so IE users can easily download the video, and firefox users can click the link to view it.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-11 20:40

which is not something we will do in an official release, since users without any embedded movie support would see 2 download links in this case.

 
sholden

Joined: 2005-09-11
Posts: 3
Posted: Sun, 2005-09-11 20:42

Well, no, because I removed the noembed link, so they would see just the one.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-11 20:44

ok, but then you get a download link even if there is an embedded browser, which is not what most users want. certainly some users want it like that, but not most.
back to the actual topic, which is a firefox / windows / plugin issue.

 
sholden

Joined: 2005-09-11
Posts: 3
Posted: Sun, 2005-09-11 20:51

Well, no, because I removed the noembed link, so they would see just the one.

But I'm not suggesting it as a good solution.

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Tue, 2005-09-13 02:05

I noticed the following in the source code:

type="video/x-msvideo"

I copied & pasted the source code into a new document, changed the 'x-msvideo' to 'x-ms-wvx', opened it up in Firefox, and the Windows Media plugin correctly launches. Similarly, if I change the 'x-msvideo' to 'quicktime', then the Quicktime plugin correctly launches.

Is it possible to make such a type association (e.g. type="video/quicktime") to avi files in G2? If so, can somebody offer some pointers as to how to do it? Also, does this info imply that this problem is actually a G2 bug and not a Firefox bug?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-13 06:21

please summarize this information in a G2 bug tracker on http://sf.net/projects/gallery/ , thanks.

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Tue, 2005-09-13 15:18
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-09-13 16:14

video/x-msvideo is the mime type for AVI, no? I don't think we should render with a different mime type to compensate for poorly configured browsers. My own avi files show up fine in firefox using quicktime plugin.. just go to control panel / quicktime / browser plugin / mime settings and check Video for Windows (AVI) file.

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Thu, 2005-09-15 00:02

I followed mindless' suggestion and now movies from my site work correctly on Firefox. However, I still can't view the movies on SanjuroE's site. The Quicktime plugin launches but complains about a necessary component being missing.

 
DigitalParasite

Joined: 2005-09-16
Posts: 13
Posted: Sun, 2005-09-18 13:07

Is there any way to configure G2 to either use embedded video OR just a link to the file like G1 uses? That would allow the site admin to better control how they want the video displayed. People who want to allow FireFox users the most compatability could chose the non-embedded configuration.

If this is not an option, could it be added as one?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-18 13:41

you could file it as feature request on http://sf.net/projects/gallery/ .

 
gumshoe

Joined: 2005-09-20
Posts: 2
Posted: Tue, 2005-09-20 05:53

As a temporary fix on can modify gallery2/modules/core/classes/GalleryMovieItem.class to force all none quicktime video types to x-ms-wmv. This can be done by changing one line. Change line 294 from:
$this->getMimeType(),
to
'video/x-ms-wmv',

One wonders how an open src PHP proj can not work in firefox... Great work otherwise, and the price is right.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 08:49

as valiant points out, this is rather the problem of a misconfigured browser/browser plugin than a G2 problem.
but we're open for real workarounds, if they are reasonable.

 
DigitalParasite

Joined: 2005-09-16
Posts: 13
Posted: Tue, 2005-09-20 14:11

Thanks gumshoe. Valiant is right, it is a plugin problem.

I have taken valiant's suggestion and created a feature request for being able to configure G2 to have embedded video or the non-embedded kind, whichever the admin prefers. If you are interested in this feature, I recommend you vote for it here: http://gallery.menalto.com/sfvote/vote/1295673

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 14:21

lol, my last message should be "as mindless points out". arg, this is weird.

 
gumshoe

Joined: 2005-09-20
Posts: 2
Posted: Tue, 2005-09-20 14:25

Thanks for the clarification, I have placed my vote.

 
trucho

Joined: 2005-12-08
Posts: 6
Posted: Tue, 2005-12-13 06:09

I also had a problem with displaying WMVs in FireFox. It would play fine in IE but it just seemd do download in FireFox and not play. I did two things:

1. I added a download link beneath the embed so users have that option (see sholden above). This turned out to be useless (look at #2).

2. I chaged the permissions on the video files to allow Everyone to be able to view them (but not to see or add comments). I also left the Album viewable only to Registered Users. This way I could still maintain a bit of security.

Apparently #2 has something to do with the problem (see https://sourceforge.net/tracker/index.php?func=detail&aid=1373610&group_id=7130&atid=107130).

After the change in Permissions the files worked in FireFox! If you are still interested about adding the Download link, make sure to remove the <noembed>%s</noembed> or else you will get a PHP parse error.

 
omega_drh
omega_drh's picture

Joined: 2005-10-17
Posts: 2
Posted: Tue, 2006-01-17 08:40

Thanks for the tip, sholden. I just editied the same file on my G2 install, in the same way as described, and it works like a charm. Even if the video did work from the embedded player, I would still want that link there, so this is perfect. Thanks.

 
ghostienz

Joined: 2006-06-13
Posts: 28
Posted: Tue, 2006-06-13 23:18

None of my Xvid encoded avis work in Firefox. It says it can't find a plugin.

Could someone tell me which codec they used, that works in firefox?
I've tried IE and it works fine.

 
ghostienz

Joined: 2006-06-13
Posts: 28
Posted: Wed, 2006-06-14 09:17

Nevermind that, stupid question. However, Firefox will not play avi's what-so-ever.

 
chicagonyc

Joined: 2006-09-05
Posts: 9
Posted: Sat, 2006-12-02 17:00

I have the same problem. In fact, I came to it in a roundabout way. AVIs can be viewed from G2 albums embedded within Firefox through the VLC player plugin for Firefox (VideoLAN). But the problem with it is that there are no controls.

So I uninstalled VLC, browsed to my folder with AVI's (encoded BOTH with Xvid and Motion JPEG straight from my digital camera), and it complains about needing a plugin. I click on install plugin and then it fails with "unknown codec".

Here's an odd twist. I can watch AVI videos just fine using SPGM and its video plugin. But I came over to Gallery 2 to get more functionality than SPGM!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-12-02 17:26

Just looked at http://spgm-vid.jhollin1138.com/ and they do things pretty much the same as we do them.
The example vids on their page work in G2 as well.

Got an example that works in SPGM-vid but not in G2?

a url to the spgm page that hosts such an example video would be very useful.

 
chicagonyc

Joined: 2006-09-05
Posts: 9
Posted: Tue, 2006-12-12 17:22

Non working embedded AVI in G2:

http://tinyurl.com/yje3yz

Working embedded AVI in SPGM Vid:

http://tinyurl.com/yzwgky

Both are Motion JPEGs straight from my digital camera.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-12-15 12:32

Thanks, you see how quick my memory is. I already forgot about the beginning of this thread.
Yes, it's the same issue.
application/x-mplayer2 vs video/x-msvideo .

The question is:
If we change it to application/x-mplayer2, will it still work if Windows Media Player is not installed? (e.g. in Linux, Mac OSX, ...)
And will it still work in all the browsers that it's currently working?

 
chicagonyc

Joined: 2006-09-05
Posts: 9
Posted: Mon, 2006-12-18 21:16

Any ideas?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-12-20 03:12

We won't change that for G2.2.

As it was pointed out in this thread some time ago, this is not necessarily a G2 bug and changing it without a lot of testing if we don't make it worse for some OS/browser/player combination can't be done either.

I suggest you install VLC or another decent player, this solves the problem.

For G2.3, we can look into changing the mimetype, but someone will have to do the testing.

 
chicagonyc

Joined: 2006-09-05
Posts: 9
Posted: Wed, 2006-12-20 15:40

First of all, thanks for helping put G2 together, it's a great product.

But, I have to say, that the Windows/Firefox/WMP is not an obscure combination. And VLC doesn't have playback controls!

Finally, why should another freeware product (SPGM-Vid) not have a problem with this combination?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-12-20 18:28

- I did not say Windows/Firefox/WMP is an obscure combination.
- I said that we can't just change it right now. It's too close to the Gallery 2.2 release and we wouldn't have the time and resources to do all the QA to ensure that such a change is no regression in any environment.
- Also, considering that you use a non-default browser on Windows, it's not too far fetched that you also use VLC, an excellent free and open source product.
- @working in other freeware but not in g2:
Freeware or not that is not relevant. Also, G2 is not just free as in beer, but free as in speech.

 
chicagonyc

Joined: 2006-09-05
Posts: 9
Posted: Wed, 2006-12-20 18:49

Ok, I understand. Don't misunderstand me -- I'm trying to make a great product even better!

How do I go about entering this as a feature request for 2.3?

 
djaustin

Joined: 2006-12-20
Posts: 1
Posted: Wed, 2006-12-20 18:55

I have same problem; playing embedded avi in FF does not work; it says that there is a missing plugin. After reading the thread, I tried Mindless' suggestion: "use quicktime plugin.. just go to control panel / quicktime / browser plugin / mime settings and check Video for Windows (AVI) file.". I did that, and when I tried to view the embedded avi file, it crashes FF. I have Quicktime ver 7.1.3 and FF ver 2.0.0.1

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-12-21 00:49
 
jvincent

Joined: 2007-03-23
Posts: 4
Posted: Fri, 2007-03-23 15:18

Here is my workaround (5 lines change).

Edit /usr/share/gallery2/modules/core/classes/GalleryMovieItem.class (path on Ubuntu).

diff:
248c248
< switch($this->getMimeType()) {
---
> switch($mimeType = $this->getMimeType()) {
274a275,277
> if( $mimeType == 'video/x-msvideo' ); {
> $mimeType = 'video/x-ms-wmv';
> }
294c297
< $this->getMimeType(),
---
> $mimeType,

Or as an ed script:
294c
$mimeType,
.
274a
if( $mimeType == 'video/x-msvideo' ); {
$mimeType = 'video/x-ms-wmv';
}
.
248c
switch($mimeType = $this->getMimeType()) {
.

What this does is that it changes on the fly the mime type from 'video/x-msvideo' to 'video/x-ms-wmv' when rendering AVI.

I don't want to have to tell my friends and familly that they need to install VLC if they use Firefox or provide a troubleshooting section for my mom to read, that's a waste of time and is an Open Source killer proposition.

Personnaly I don't care if this is a M$ or Firefox bug, the result is that from an end-user perspective if it does not work in Firefox, they'll use IE and that does not promote very well Open Source. There is no reason Gallery should be the only web-based Gallery that does not work on Firefox or requires VLC. So in the end, even if there is a bug in Firefox or M$, Gallery looses. So just fix it before this thread gets any longer, 1 1/2 years should be long enough.

That said, if there is a bug in Firefox, we should first implement a workaround then file a bug report in Firefox. Don't even bother wasting your time telling M$.

We need to build Open Source from an end-user perspective (i.e. that is useable, just works, no manual to read). It's a market problem, not an Open Standard problem. Unless of course if we want Open Source to loose its momentum...

I have been designing software for over 20 years and if I provide something that does not work to my end-users I can't use the "M$ is crap" excuse, this does not work in the real world.

Jean.
Internet = Education

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-03-23 15:30

this thread hasn't gotten much attention (from me anyway) because it has lacked a few things...
- clear description of the problem and steps to see it happen.. the couple times i tried i never saw any problem in firefox.
- a suggestion of what to do about it.. we now have that with your post above.
- justification for a proposed solution.. do you have a reference explaining these mime types and that it is ok to do this mapping? how do we know this won't cause problems in as many cases as it fixes?
thanks for your help on this.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-03-23 18:48

Since we're now early in the release cycle of G2.3, it's time to do the change.

I don't think we can expect formal references that explain what mime-type / object tag object class etc are right. But we can use the ones that work for most people.

e.g.
- http://gallery.menalto.com/node/35788#comment-212831

If it works in G1, coppermine and http://spgm-vid.jhollin1138.com/ with the same config, we should go with that too.

--------------
Doumentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
georgesz

Joined: 2006-11-02
Posts: 5
Posted: Fri, 2007-04-06 05:08

A workaround that I found in http://www.extensionsmirror.nl/lofiversion/index.php/t1251.html: add a line for video/x-msvideo, avi to the Windows Media Player Plug-in Dynamic Link Library in %APPDATA\mozilla\Firefox\pluginreg.dat. Could it explain why some people see the problem while other don't?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2007-04-06 14:20

in my case, sort of.. i don't have a Windows Media Player plugin section at all in my file.. but I have video/x-msvideo listed for quicktime plugin. maybe since i had quicktime i've never even been prompted to have the media player plugin installed?

did anyone confirm how G1 and coppermine handle this mime type?

 
into_311

Joined: 2007-09-05
Posts: 3
Posted: Thu, 2007-09-06 18:29
mindless wrote:
this thread hasn't gotten much attention (from me anyway) because it has lacked a few things...
- clear description of the problem and steps to see it happen.. the couple times i tried i never saw any problem in firefox.
- a suggestion of what to do about it.. we now have that with your post above.
- justification for a proposed solution.. do you have a reference explaining these mime types and that it is ok to do this mapping? how do we know this won't cause problems in as many cases as it fixes?
thanks for your help on this.

Mindless, the problem happens on EVERY machine I have firefox installed on. Whether quicktime is installed or not.
- I have tried your suggestion of changing mime types for quicktime to handle the avi formats. However, it still won't play back videos encoded in xVid. I have the klite codec pack installed. I can play xvid avi's fine in media player classic and windows media player.
- I think what we need is better xvid avi support in quicktime (which, good luck getting apple to impliment that quickly enough).
- Or fix it so that that mime type is somehow pointed in gallery to use WMP for the plugin.