This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

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

  • 18 பதிலளிப்புகள்
  • 1 இந்த பிரச்சனை உள்ளது
  • 28 views
  • Last reply by Aabaavaanan

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:

document.getElementById("Video2").src="http://...*.mp4"

<video id="Video2" controls/>
We're using a URL like "http://.....*.mp4", which will play the mp4 video files in mozilla firefox. In our code we are using &lt;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: <pre><nowiki> document.getElementById("Video2").src="http://...*.mp4" <video id="Video2" controls/></nowiki></pre>

cor-el மூலமாக திருத்தப்பட்டது

All Replies (18)

What does the computer say that is affected for H.264 on https://www.youtube.com/html5 ?

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

If you open about:config, what is the configuration for: media.windows-media-foundation.enabled

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

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?

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"); vidsrc.id = "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?

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="http://www.apple.com/qtactivex/qtplugin.cab" 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

John99 மூலமாக திருத்தப்பட்டது

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="http://www.apple.com/qtactivex/qtplugin.cab" height="420" width="240">
<param name="src" value="ProgressiveDownload.mp4" />
</object>
</video>

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?

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

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

document.getElementById("Video2").src="http://...*.mp4"

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

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";

Hi

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.

Thanks.

On Windows 7? I play MP4 video all the time, including YouTube and this test site: http://www.quirksmode.org/html5/tests/video.html

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: https://www.microsoft.com/en-us/download/details.aspx?id=16546

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: https://support.mozilla.org/en-US/questions/1048378

We are using windows 7 which include Media Foundation.

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

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

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

http://www.quirksmode.org/html5/tests/video.html

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.

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.

Hi,

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.

Thanks

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?

We are working on an intranet application.so 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