Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cuireadh an snáithe seo sa chartlann. Cuir ceist nua má tá cabhair uait.

In Firefox 38 and above, HTML video element doesn't play mp4 videos

  • 18 freagra
  • 1 leis an bhfadhb seo
  • Freagra is déanaí ó Aabaavaanan

more options

We're using a URL like "http://.....*.mp4", which will play the mp4 video files in mozilla firefox. In our code we are using <Video> element, and the video is getting played up to Firefox 37.0. After upgrading to Firefox 38.0 the video is not getting played.

The error message "Media Resource could not be decoded" is displayed on debugging to the following line:


<video id="Video2" controls/>

Athraithe ag cor-el ar

All Replies (18)

more options

What does the computer say that is affected for H.264 on ?

What is the encoding of the videos that are being called?

If you open about:config, what is the configuration for:

more options

My browser is supporting H.264 (see the attached Screenshot) and the is set to its default as true.

more options

You may have to recode the video.

Does the same happen if you open the video link directly via the location/address bar?

What video and Audio codecs are used if you check that in an external player that has such a capability?

more options

What if you set the video source this way (including a content type):

var newsrc = "your-uri"; if (document.getElementById("Video2source")) { document.getElementById("Video2source") = newsrc; } else { var vidsrc = document.createElement("source"); = "Video2source"; vidsrc.type = "video/mp4"; vidsrc.src = newsrc; document.getElementById("Video2").appendChild(vidsrc); }

Note: that's air code, typed and untested.

If that doesn't help, can you check the console (Browser Console, Web Console, or Network Monitor) and confirm that the server is sending video/mp4 as the content type for the video?

more options

The code we're using is given below: <video id="Video2" controls="controls" width="640" height="360"> <source type="video/mp4" /> <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="" height="420" width="240"> <param name="src" value="ProgressiveDownload.mp4" /> </object> </video>

The Response.Headers is gives the "Content-Type: video/mp4" value. In Console the error message "Media resource could not be decoded" is displayed.

Edit to display code, as requested by jscher2000 {use < nowiki > tags}~J99

Athraithe ag John99 ar

more options

Aabaavaanan said

The code we're using is given below:

<video id="Video2" controls="controls" width="640" height="360">
<source type="video/mp4" />
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="" height="420" width="240">
<param name="src" value="ProgressiveDownload.mp4" />

The object fallback is coded for IE (classid), so Firefox isn't going to use that. But as for the decoding issue, can you give a link to a page that demonstrates this problem?

more options

Sorry, i couldn't share the video link due to confidentiality...

while debugging in firefox 38 and above, after executing the line


the error "Media Resource could not be decoded" is displayed on Console

more options

Any difference if you change that code to set the src attribute of the <source> tag where you have the content type set:

if (document.querySelector) document.querySelector("#Video2 > source").src="http://...*.mp4";

more options


Still couldnt play the video.Please try to play any video file of mp4 format in firefox. It isntg working.

Can u pls check ASAP.


more options

On Windows 7? I play MP4 video all the time, including YouTube and this test site:

Do you have one of the editions of Windows 7 that doesn't include Media Foundation? In that case you would need to add it. See:

more options

If this can be of any help, I posted this issue a few months ago, and easily solved it using FredMcD's solution.

You can find the post in question there:

more options

We are using windows 7 which include Media Foundation.

more options

Well, excuse me, but nowhere did you specify that you run Windows 7.

Either way, I am sorry that my contribution is not helping.

more options

Hi Aabaavaanan, do you get the same error on the test page?

I'm trying to think of what changed in Firefox 38 that might be affecting MPEG decoding and nothing is coming to mind.

Could you do this three-minute experiment:

Create a new Firefox profile

A new profile will have your system-installed plugins (e.g., Flash) and extensions (e.g., security suite toolbars), but no themes, other extensions, or other customizations. It also should have completely fresh settings databases and a fresh cache folder.

Exit Firefox and start up in the Profile Manager using Start > search box (or Run):

firefox.exe -P

Don't delete anything here!

Any time you want to switch profiles, exit Firefox and return to this dialog.

Click the Create Profile button, assign a name like TEST081215, and skip the option to relocate the profile folder. After creating the profile, select it and start Firefox in that profile.

Any difference?

When returning to the Profile Manager, you might be tempted to use the Delete Profile button. But... it's a bit too easy to accidentally delete your "real" profile, so I recommend resisting the temptation. If you do want to clean up later, I suggest making a backup of all your profiles first in case something were to go wrong.

more options

Hi EL20, I think that last reply was directed to my comment, so please don't take it as criticism of your comment. This forum doesn't have "threaded" replies so it's sometimes hard to follow.

more options


We have found that the Video file of lesser size (less than 1.5 GB) is able to play in firefox but greater than that is not playing.

I Think this might be the exact issue.

Please check and let us know for any update asap.


more options

I'm not sure how to identify a large file like that on a web server. Because YouTube chops up videos (DASH), that site shouldn't have the issue. Are there particular examples you have come across for which you can provide a URL?

more options

We are working on an intranet we cannot share the url. Try to drag and drop any video file of larger size in firefox and try to play.

If not try the same for MP4 files