Missing Codecs in Firefox to Play Video in Gallery2


Instead of doing all the work below, you should first try installing this plug-in: Windows Media Player Firefox Plugin

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:

Search for “Windows Media Player Plug-in Dynamic Link Library” and add the bolded lines:

Windows Media Player Plug-in Dynamic Link Library|$
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.

39 Replies to “Missing Codecs in Firefox to Play Video in Gallery2”

  1. 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 🙁 Please help

  2. The folder you’re actually looking for is hidden. I suggest you try this:

    • Click Start
    • Click Run
    • Enter: %APPDATA%\Mozilla\Firefox\
    • Click OK

    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!

  3. 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|$

    I mean, I have the wmp plugin installed…I just checked a couple seconds ago X_x

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

  5. Like Kiwi said my file reads

    Microsoft® Windows Media Player Firefox Plugin|$

    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?

  6. 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!

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


  8. I got it .

    I forgot to change 9 to 10 after “Microsoft® Windows Media Player Firefox Plugin|$”

    Now it is saved and works


  9. 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|$
    Npdsplay dll|$
    Windows Media Player Plug-in Dynamic Link Library|$
    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

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

  11. whenever i open the file in wordpad, it is all clumped together and not layed out neatly like a list as it is for other people here, so it is near impossible for me to find the correct lines to edit, even using the “cntrl + f” search.

  12. ok, so i have tried everything on here but have been unable to get the video to stream in firefox. Krunk you think you can have a look at my file for me then?

  13. @sweetee If you’ve done everything I’ve stated above, not really sure what else I could do, since the file is pretty simple. Are you sure you don’t have multiple profiles and you’re modifying the incorrect one?

  14. Thanks for the workaround Krunk

    Where can I find the pluginreg.dat file please? I looked here C:\Program Files\Mozilla Firefox. Searched through all the folders and could not find it.


  15. @James: As noted in the blog post, it’s located in %APPDATA%\Mozilla\Firefox\pluginreg.dat

    When you input %APPDATA%, it’ll resolve to the correct directory.

  16. Hello I am having a serious issue with this video/x-msvideo error message… I tried my best to locate the %APPDATA%\Mozilla\Firefox\ in which you advised.. I even tried the start, run, option as I vista and I still could not find that file.. One minute i was able to stream videos and the 10 minutes later i was not after I had completed the upgrade to divxpro.I have uninstalled, reinstalled, so many times and i still cannot get videos to stream.. I believe you have the correct answer @ Krunk however I just cannot find that file anywhere on my computer to add the 10th line in bold….

    Please can you help me..


  17. @Samantha In %APPDATA%\Mozilla\Firefox, you should see a “Profiles” directory. In the “Profiles” directory, you should find 1 or more profiles. If there’s only 1, go in there.

    In this directory, you should be able to find your pluginreg.dat file that I speak of.

  18. Hello Krunk. It seems you have the right idea. I have a similar problem that Samantha had. I was able to stream videos and watch them, and now I’m not able to. I’m using DivX like Samantha. I can’t seem to find the plugin that I need to edit for the last line. The only 2 plugins I have that look like I should edit for your fix would be my quicktime or divx plugin. I am using vista and Firefox 3.6.3

  19. Thanks Krunk!!!!!!!!!!

    I actually had it figured out after I made the posting last night… I just had a different profile name so i overlooked the file itself…… Thanks so much!!!!!!!

  20. @Gino Are you using a Windows machine? Windows Media Player Plug-in Dynamic Link Library only comes with Windows and if you don’t see that plug-in in your pluginreg.dat, I’m not sure if I can help you.

  21. I’m using a HP Pavilion p.c. with operating system Vista 64 bit. I have Media Player downloaded for movies/clips and music but I don’t see a plug-in for it in the fire fox folder.

  22. @Raphael

    Pride comes before a fall.

    That does NOT fix the issue for everyone.

    Try playing an AVI with (correct) MIME type video/x-msvideo.

    Are you still so sure it’s that easy?!

  23. I am using firefox Beta 4.0 and i am not able to save notepad file….Please let me know how to save this file or will it works with Beta version?

    1. What are you trying to save? The file I’m referring to should already exist on your computer and you should be able to open it from notepad by pasting in that location into your open file dialog.

      1. yes, I open that file and paste the above 10 codes in that file but when I press ctrl+s ,it doesn’t save back.

        1. Ah, you might need to run notepad in administrative mode if you get an error when trying to save. Also, have you tried the Windows Media Player Firefox Plugin I mentioned above? If that works, you can forget about all this hassle.

  24. Well, I was having this same issue…i only use firefox. But all i did to fix it was install div-x web player through my internet explorer and Waddaya know…it all of a sudden worked in Firfox too.

  25. Interesting solution but it doesn’t seem to produce the streamed movie. The media player opens in the web page but tries to download the entire movie before starting to play it.

    suggestions ?

    1. That usually depends on the way the video was encoded and if the media player believe it’s streamable or not. When it doesn’t believe it’s streamable, it’ll download the entire movie before playing.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.