Missing Codecs in Firefox to Play Video in Gallery2
Every once in awhile, I’ll hit a video on my gallery that requires me to download a codec, but telling it to download fails to find a codec that’ll work. If I copy and paste the URL into IE, the video plays fine. I started searching the Gallery forums.
I found this thread: Combination Gallery 2/AVI/Firefox does not display video, and it appears a lot of people are hitting this issue:
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 about:plugins 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.
Before, I would just tell every video to use mime type: video/x-ms-wmv, however, Gallery2 supports a wider range of mime types, so I decided to let it do its own thing.
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:
%APPDATA%\Mozilla\Firefox\pluginreg.dat
Search for “Windows Media Player Plug-in Dynamic Link Library” and add the bolded lines:
Windows Media Player Plug-in Dynamic Link Library|$
10
0|application/asx|Media Files|*|$
1|video/x-ms-asf-plugin|Media Files|*|$
2|application/x-mplayer2|Media Files|*|$
3|video/x-ms-asf|Media Files|asf,asx,*|$
4|video/x-ms-wm|Media Files|wm,*|$
5|audio/x-ms-wma|Media Files|wma,*|$
6|audio/x-ms-wax|Media Files|wax,*|$
7|video/x-ms-wmv|Media Files|wmv,*|$
8|video/x-ms-wvx|Media Files|wvx,*|$
9|video/x-msvideo|Media Files|avi,*|$
Increasing 9 to 10 tells it that there’s 10 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.
July 8th, 2007 at 10:23 pm
Actually you’ll want to open this in wordpad, notepad makes it a mess
July 25th, 2007 at 4:53 am
Worked great, thanks!
September 22nd, 2007 at 9:26 pm
This is a problem that I’ve had with firefox for a while.
I tried following your instructions, but I don’t have %APPDATA%\Mozilla\Firefox\pluginreg.dat on my computer? I don’t have a folder just called “mozilla”. It’s just called “mozilla firefox”. I tried searching for pluginreg.dat, but it’s not there either? I have firefox version 2.0.0.7
Please help
September 22nd, 2007 at 9:40 pm
The folder you’re actually looking for is hidden. I suggest you try this:
The “Mozilla Firefox” folder is usually located in C:\Program Files\, while the “Mozilla” folder is usually located in C:\Documents and Settings\username\Application Data\
I hope this helps!
September 22nd, 2007 at 9:52 pm
Thanks a lot for replying, but now i’ve got another problem (_ _)
I don’t have the dynamic link section in the pluginreg.dat file. I only have:
MicrosoftR Windows Media Player Firefox Plugin|$
10
I mean, I have the wmp plugin installed…I just checked a couple seconds ago X_x
September 22nd, 2007 at 9:57 pm
Interesting… If you want, you can email me your pluginreg.dat, and I can take a look at it.
Or you can try incrementing that 10 in your file to 11 and adding that line to see if it works. My file doesn’t have the “MicrosoftR Windows Media Player Firefox Plugin” registered.
September 22nd, 2007 at 11:20 pm
It actually worked! Thanks a lot Krunk!!
September 27th, 2007 at 11:54 am
Try this Firefox extension out. Worked like a charm for me, and keeps things embedded in the page.
Media Wrap
https://addons.mozilla.org/en-US/firefox/addon/1879
or If you want the media to open outside the browser window in Media Player, you can use this one.
MediaPlayerConnectivity
https://addons.mozilla.org/en-US/firefox/addon/446
enjoy,
Ed
November 4th, 2007 at 4:19 am
Like Kiwi said my file reads
Microsoft® Windows Media Player Firefox Plugin|$
10
0|application/x-ms-wmp|np-mswmp|*|$
1|application/asx||*|$
2|video/x-ms-asf-plugin||*|$
3|application/x-mplayer2||*|$
4|video/x-ms-asf||asf,asx,*|$
5|video/x-ms-wm||wm,*|$
6|audio/x-ms-wma||wma,*|$
7|audio/x-ms-wax||wax,*|$
8|video/x-ms-wmv||wmv,*|$
9|video/x-ms-wvx||wvx,*|$
What do i need to change it to. I tried cutting out the above and pasting in what you have posted. but that caused problems. any ideas?
November 4th, 2007 at 4:35 am
try updating the 1st line’s 10 to 11
and appending this line to the end:
10|video/x-msvideo|Media Files|avi,*|$
November 25th, 2007 at 3:03 am
[...] Missing Codecs in Firefox to Play Video in Gallery2 (Last week: #7) [...]
November 25th, 2007 at 4:43 pm
[...] Missing Codecs in Firefox to Play Video in Gallery2 [...]
December 6th, 2007 at 11:18 pm
Amazing Krunk! That fix worked for me. Encountered this problem using G2 Gallery and was surprised that my google searches weren’t returning any relevant info…until I found your post which references the only other info I found (the post on the Gallery site).
Thank you!
December 7th, 2007 at 12:16 am
Glad I was able to help.
January 7th, 2008 at 4:24 am
[...] Missing Codecs in Firefox to Play Video in Gallery2 [...]
January 19th, 2008 at 12:55 am
Wow, nice tip! I can now embed AVI files in firefox, worked like a charm. Thanks Krunk!
========================
http://claustrophobic.blogspot.com
February 26th, 2008 at 2:53 pm
[...] Missing Codecs in Firefox to Play Video in Gallery2 [...]
March 9th, 2008 at 3:24 am
[...] Missing Codecs in Firefox to Play Video in Gallery2 [...]
March 29th, 2008 at 11:46 am
I tried to add line 10 to my pluginreg.dat, but after saving and restart Firefox I cannot see avi movie and when I check pluginreg.dat after restart FF my added line does not exist anymore .
What to do to save it permanently?
thanks
March 29th, 2008 at 12:03 pm
I got it .
I forgot to change 9 to 10 after “Microsoft® Windows Media Player Firefox Plugin|$”
Now it is saved and works
thanks
March 31st, 2008 at 4:58 pm
I had this same problem with the .avi files appearing in my html pages as broken links. The avi display fine in IE.
I made the changes you recommended to my %APPDATA%\Mozilla\Firefox\pluginreg.dat file but my avi’s still don’t load or play.
I verified the changes are still present.
0|application/x-drm|Network Interface Plugin|nip|$
C:\Program Files\Windows Media Player\npdsplay.dll|$
|$
1133299626000|1|5|$
Npdsplay dll|$
Windows Media Player Plug-in Dynamic Link Library|$
10
0|application/asx|Media Files|*|$
1|video/x-ms-asf-plugin|Media Files|*|$
2|application/x-mplayer2|Media Files|*|$
3|video/x-ms-asf|Media Files|asf,asx,*|$
4|video/x-ms-wm|Media Files|wm,*|$
5|audio/x-ms-wma|Media Files|wma,*|$
6|audio/x-ms-wax|Media Files|wax,*|$
7|video/x-ms-wmv|Media Files|wmv,*|$
8|video/x-ms-wvx|Media Files|wvx,*|$
9|video/x-msvideo|Media Files|avi,*|$
C:\Program Files\Java\jre1.6.0_03\bin\npjpi160_03.dll|$
|$
Please take a look at page http://www.hollyzell.com/anime.htm
The cells with the blue backgrounds are the animated ones.
The other cells link to another page containing jpgs and avi’s.
These avi’s were created many years ago use truspace3 and are loaded in the html page via <img dynsrc= …
I would greatly appreciate your assistance as I’m using my site to provide examples for my current job hunt.
Sincerely, Holly Zell
March 31st, 2008 at 5:12 pm
I’m not exactly sure if you problem is related to the one I blogged about since you don’t exactly define video/x-msvideo in your source.
I wasn’t able to get your videos to play in either IE or Firefox and looking at your code, you appear to be using something called dynsrc inside an img tag, which I’m not familiar with myself. Personally, I didn’t think it was possible or correct to define a video inside an img tag.
May 11th, 2008 at 10:18 pm
[...] Missing Codecs in Firefox to Play Video in Gallery2 [...]