I used Miro Video Converter (http://www.mirovideoconverter.com/) to convert a .mov to different html5 video formats (webm, ogv and mp4). I manually made a poster image from the 1st frame of the video.
Everything works fine in Firefox and Safari, but when using Chrome, the video seems to be a little bigger than it should be. It's easy to notice when looking at the difference between the poster image and the beginning of the video.
I am wondering if someone has ever encountered the same problem and if the problem here is either my video file or the embedding.
Here is a jsfiddle with the actual files : http://jsfiddle.net/aLvpP/
Ok so, if anyone ever comes here, I finally found the answer to this.
The reason why Chrome was showing a bigger/blurry video is that the mp4 version of it was not in a standard 16:9 format, but not too far from it, so it was kind of stretching it a bit.
Actually, part of the blame is on Miro Video Converter, because when I tried using FFmpeg to convert my original mov to the mp4 format, FFmpeg would not let me do it, explicitly telling me that "the width of the video can not be divided by 16".
All in all, changing the format of the original video to a standard 16:9 format solved the problem.
Related
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.
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.
I am rendering video as MP4 (H.264) using Expression Encoder. I am choosing the H.264 Screen Encoding VBR profile. It produces an .mp4 file that I can play on my computer (I'm on Windows 8 RTM) using Media Player and when I put it on my site I can see the video play in Google Chrome, but it won't play in IE10. Any reason why not or how to go about troubleshooting this?
It could be a lovely IE10 bug as described here...
http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/d62f0aa3-76d1-4d3a-b0a6-bb3731402f83
I think the short of it - if you have specified the codec parameter as you should do eg:
IE10 throws a wobbly. If you strip the codec declaration out it should work. Not sure what the repercussions of this might be though
Is it possible to create mp4 file/container with out the size.
I am using media foundation to convert some file into h264/acc and wrap it around mp4.
What happen is that as file finishes up the encoder adds the size of the file.
I need to start streaming as soon as the encoder starts encoding the data.
And client is going to do a progressive download.
Is this feasible. Of course I am using html5 So rtp/rtsp is out the question.
Or is Ogg/Theora a better way to do this ? Do we need to know the file size or can we just stream it ?
I know each browser has different decoders.
Would it be possible to lie about the size in the mp4's headers?
The issue here is that you will not be able to get a playable mp4 without the atom being completely written. [Exact size and location of all the chunks]. So the answer to your first question is no. You cannot do it with mp4. A transport stream is the best way to do it. I have not tried Ogg/theora so don't know about that but a ts can be streamed right away.
If you need a solution that works across all browsers it is a bit of a pain.
I don't think I understand what you are doing but I stream mp4 and it works fine in modern browsers. Only IE9 struggles with it and won't play as you would expect. Ogg files work fine, too.
I've found that mp4 encoded with any converter works fine in any modern browser, too, but I needed to use handbrake to get them to work in IE9. Still haven't figured out why and no one at Microsoft knows either cause I've asked this question just about everywhere without response.
I'm trying to embed video playback on a website, using HTML5 video tags.
For some example mp4 files I found, the video plays well on both IE9 & Chrome,
but when I use mp4 files converted from avi/mkv files I have - The video plays only on Chrome, while IE9 refuses to play it.
I've tried several video conversion tools:
HandBrake, Miro Video Converter, Freemake Video Converter.
All produced mp4 containing H. 264 video & AAC audio - And all works well on Chrone.
I also tried playing around with IE9 multimedia/security options - but nothing has changed.
Well, I read about IE9 having a bad support for video playback and html5 in general, but still - it's clearly stated that mp4 is supported for all h264 profiles.
As you can understand - I have a priority for this website to work well on IE9 - So I'd appreciate any tips here.
I have the same issue and found out that it's the combination of Miro Video Converter, videojs and IE9:
When I convert with EasyHTML5video and standard settings (you cannot change any setting) everything ik OK and plays is IE9 with videojs.
When I convert with Miro Video Converter and standard settings (you cannot change any setting) IE9 doesn't play and has a VIDEO OBJECT error.
I've compared the 2 outputs and I think it's only the audio that is different. Miro is 2 channel 48Khz and EasyHTML5 1 channel with 16Khz.
I hope to find the right conversion tool, Miro is better quality than EasyHTML5video, but maybe there is the problem.
My suggestion would be using a plugin which utilizes feature detection such as VideoJS
It will provide the necessary fallback to flash if the video will not display correctly on the browser
Follow the instructions on http://videojs.com/ should be straightforward