.mp4 file does not play in chrome

I want to show the video on my website. I created a .mp4 file and used the HTML5 tag to add it to html.

The problem is that it does not appear in chrome. I would also like to know how I can repeat it again and again.

+7
html5 google-chrome html5-video
source share
4 answers

After facing the same problem, here are some of my thoughts:

  • due to Chrome support for h264, on some machines, the mp4 video encoded with it either does not work (it throws a Parser error when viewing under the Firebug / Network tab corresponds to the release here) or a browser crash, depending on the encoding settings
  • it is incompatible - it completely depends on the installed codecs on the computer - until I came across this problem on my machine, we had one in the office where the problem occurred (and therefore we used this for testing)
  • this may be due to the settings of Quicktime / DivX (the machine in question had an older version of Quicktime than my own - we did not want to lose our testing PC, so we did not update it).

Since this only affects Chrome (other browsers work fine with the VideoForEverybody solution), I used the following solution:

for each mp4 file, create a Theora encoded mp4 file (example.mp4 β†’ example_c.mp4) apply the following js:

if (window.chrome) $("[type=video\\\/mp4]").each(function() { $(this).attr('src', $(this).attr('src').replace(".mp4", "_c.mp4")); }); 

Unfortunately this is a bad chrome hack, but hey, at least it works.

Source: User: eithedog

It might also help: chrome can play html5 mp4 video, but html5test said chrome doesn't support mp4 video codec

Also check your crome version here: html5test

+3
source share

It started as an attempt to output video from my computer to a TV (with subtitles), eventually using Chromecast. And I found myself in this situation "does not play mp4". However, I seemed to prove that Chrome will play (exactly the same) mp4 if it is not wrapped in html (5) So this is what I created. I created a web page under the local host, and there is default.htm that contains: -

 <!DOCTYPE html> <html> <head> </head> <body> <video controls > <source src="sample.mp4" type="video/mp4"> <track kind="subtitles" src="sample.vtt" label="gcsubs" srclang="eng"> </video> </body> </html> 

video and subtitle files are stored in the same folder as default.htm

I have the latest version of Chrome (just updated this morning)

When I type in the corresponding local host ... a black square appears in my Chrome browser with the β€œGO” arrow and a timeline, mute button and icon that means β€œCC”. If I press the left arrow, nothing happens (it does not change to β€œpause”, the elapsed time does not move, and the timer sets to 0:00. There are no error messages - nothing!

(note that if I find localhost .. in IE11, then the video plays !!!!

In Chrome, if I enter the drive address sample.mp4 (i.e. C: \ webstore \ sample.mp4, then Chrome will play the video in format .

This last bit is probably a working solution for Chromecast, except that I don’t see any subtitles. I really want a solution with working subtitles. I just don’t understand what is different in Chrome between the two ways of playing mp4

+1
source share

Meeting the same problem, I solved this by converting the default mp4 settings file to iMovie.

0
source share

[Hmm ... this thread is 2 years old, but the problem is still ongoing.]

Well, I don't know the final answer yet, but maybe a few comments will help others pursue these issues.

Comment # 1: MP4 container files have been for YEARS, therefore, which allowed them to be practically any codec inside. So, get the "mediainfo" cmd-line pgm and collapse inside your MP4 container, so you will know that this is the name of the codec that is inside.

MP4 files and MKV files are just CONTAINER files (see wikipedia), and you can put any of many different codecs of different code inside MP4. (while, I think Webm is likely to have a VP8 or VP9 or VP10 video codec inside.

Comment # 2: Chromecast users use tabs (from the Chrome tab) and this can be done by pasting the local file into the browser tab using the URL, for example:

 file://C:/Users/David/The_Big_Lebowski(1998)--5mins--snippet.mp4 

At the same time, you can also use video and source tags and a link copy of the same file ... called the video "HTML 5".

I (mistakenly) thought that they both would do the same in any given browser, but they did not. So far, at least in Chrome, I find cases where the URL "file: //" will be displayed, but HTML-5 does NOT.

Food for thought.

0
source share

All Articles