Chrome not working perfectly with video embedded via video.js - google-chrome

I am using videojs to embed video on the following website: www.airfixthemovie.com. Html video has preload="none" which makes it a bit better. Any suggestion on how to make the video to work perfectly in Google Chrome? The trailer stops sometimes in Chrome and it looks like Chrome is loading or buffering. Thanks for your help.

From the network inspector it seems there's something wrong with the backend serving mp4 files. The requests are canceled and there are about 4 requests to the mp4 a second and the Content-Range header seems to throw completely random digits there.
I know this doesn't really answers your question but at least investigate the mp4 thing server side.

Related

.mp4 file not playing in chrome

I want to show a video on my website. I have created a .mp4 file and using the HTML5 video tag to add it to the html.
The problem is that it is not being displayed in chrome. I would also like to know how I can replay it again and again.
I too had the same issue. I changed the codec to H264-MPEG-4 AVC and the videos started working in HTML5/Chrome.
Option selected in converter: H264-MPEG-4 AVC, Codec visible in VLC player: H264-MPEG-4 AVC (part 10) (avc1)
Hope it helps...
After running into the same issue - here're some of my thoughts:
due to Chrome removing support for h264, on some machines, mp4 videos
encoded with it will either not work (throwing an Parser error when
viewing under Firebug/Network tab - consistent with issue submitted
here), or crash the browser, depending upon the encoding settings
it isn't consistent - it entirely depends upon the codecs installed
on the computer - while I didn't encounter this issue on my machine,
we did have one in the office where the issue occurred (and thus we
used this one for testing)
it might to do with Quicktime / divX settings (the machine in
question had an older version of Quicktime than my native one - we
didn't want to loose our testing pc though, so we didn't update it).
As it affects only Chrome (other browsers work fine with VideoForEverybody solution) the solution I've used is:
for every mp4 file, create a Theora encoded mp4 file (example.mp4 -> example_c.mp4)
apply following js:
if (window.chrome)
$("[type=video\\\/mp4]").each(function()
{
$(this).attr('src', $(this).attr('src').replace(".mp4", "_c.mp4"));
});
Unfortunately it's a bad Chrome hack, but hey, at least it works.
Source: user: eithedog
This also can help: chrome could play html5 mp4 video but html5test said chrome did not support mp4 video codec
Also check your version of crome here: html5test
(#Alston posted this as a comment, and it worked for me, and 9 others who also upvoted, so posting this as an answer to get more eyeballs on it:)
Simply re-encoding the video file with this FFMPEG command solves it:
ffmpeg -i input.mp4 -vcodec h264 output.mp4
This started out as an attempt to cast video from my pc to a tv (with subtitles) eventually using Chromecast. And I ended up in this "does not play mp4" situation. However I seemed to have proved that Chrome will play (exactly the same) mp4 as long as it isn't wrapped in html(5)
So here is what I have constructed. I have made a webpage under localhost and in there is a default.htm which 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>
the video and subtitle files are stored in the same folder as default.htm
I have the very latest version of Chrome (just updated this morning)
When I type the appropriate localhost... into my Chrome browser a black square appears with a "GO" arrow and an elapsed time bar, a mute button and an icon which says "CC". If I hit the go arrow, nothing happens (it doesn't change to "pause", the elapsed time doesn't move, and the timer sticks at 0:00. There are no error messages - nothing!
(note that if I input localhost.. to IE11 the video plays!!!!
In Chrome if I enter the disc address of sample.mp4 (i.e. C:\webstore\sample.mp4 then Chrome will play the video fine?.
This last bit is probably a working solution for Chromecast except that I cannot see any subtitles. I really want a solution with working subtitles.
I just don't understand what is different in Chrome between the two methods of playing mp4
Encountering the same problem, I solved this by reconverting the file with default mp4 settings in iMovie.
I was actually running into some strange errors with mp4's a while ago. What fixed it for me was re-encoding the video using known supported codecs (H.264 & MP3).
I actually used the VLC player to do so and it worked fine afterward. I converted using the mentioned codecs H.264/MP3. That solved it for me.
Maybe the problem is not in the format but in the JavaScript implementation of the play/ pause methods. May I suggest visiting the following link where Google developer explains it in a good way?
Additionally, you could choose to use the newer webp format, which Chrome supports out of the box, but be careful with other browsers. Check the support for it before implementation. Here's a link that describes the mentioned format.
On that note: I've created a small script that easily converts all standard formats to webp. You can easily configure it to fit your needs. Here's the Github repo of the same projects.

Html5 mp4 video freezes IE

I have a html5 video on my site and all was working well until client gave me a new video to replace the old one. The new video crashes Internet Explorer (IE10 and IE11 - haven't tried others). When trying to play, a second of video is shown then whole site freezes and a pop-up tells me it's not responding.
No other browser is affected.
Have tried transcoding video in Handbrake to make sure it's using H.264 codec, but still no luck.
All other videos on site work fine in IE.
Has anyone got any suggestions that I can try?
Ps. Sorry, but can't share the video file as it's confidential to the client.
Oops - found out it was not IE but Avast (anti virus) add on that was freezing video.
Disabled Avast and video played as normal.
Still don't know why it only affected one video.

Embedded webm video freezes in Chrome

I am making a system that I run on localhost, it embeds a video player and all works fine except for webm videos on Chrome. They freeze regularly and I can only get them running again by pressing play/pause and moving to the initial phases of the video.
I have been googling for this issue and trying to solve it for some time now without success, does anybody know how to solve this?
Is your same WebM file working ok on Firefox? I assume you are using HTML5 video.
I have compiled a short check list on how to troubleshoot HTML5 video playback issue here. Try to play the videojs webm sample to see if it works.
Given the description of your issue I guess it is either a non proper WebM file or a server side tuning issue (like with mime types).
If it is a file format issue you could try re-transcoding from a known good source (ie not the problematic WebM file) with firefogg.
You can also try to set the preload attribute of your HTML5 video tag to auto.

is it possible to play m3u8 video in google chrome?

Is there any way via extension / hack / or otherwise to play an m3u8 video from google chrome? I'm having some trouble getting the official word on m3u8 support, though I'm pretty sure its unsupported.
I'm working on a video player with live playback (using flash for standard browser apps) so I'm using m3u8's to get everything working on mobile, but the debugging tools on mobile leave a lot to be desired. I was wondering if there was any workaround to getting these videos to work so I could use the browser debuggers. (I'm on windows 7).
There's a new appendBytes/sourceBuffer proposal in the spec, and I saw a chrome evangelist mention that there was a beta implementation in chrome canary. With that you would have to write a ton of javascript to read the m3u8 file, get the video segments, parse the data, and push them into the media element manually. I'm guessing that's more than you want to do for testing.
What you probably want is something like Weinre.

html5 video sometimes loads and sometimes don't in chrome

I'm having a lot of problems with video html5 and google chrome.
I have this site on two different servers and chrome is showing the transition video aleatory.
http://mitoteweb.com/vivaldo/
I made some files to test the video the simplest way to check this problem and it isn't working.
I tried with mp4 h.264, ogv y webm video format and I'm having the same issues with all of them.
Here's the test files.
http://mitoteweb.com/vivaldo/chrome/prueba1.htm
When I load the page it shows the video but once I click on the second link it doesn't show any video unless I manually reload the page. And even with that, sometimes it doesn't happen.
Sorry, I couldn't include more links because this is my first post.
Thanks in advance.