mathiasbynens / small

Smallest possible syntactically valid files of different types
https://mathiasbynens.be/notes/minimal-html
1.93k stars 184 forks source link

Can't play mp4.mp4 with html5 #36

Closed chevett closed 10 years ago

chevett commented 10 years ago

I've setup a test page: http://filibuster.herokuapp.com/mobile-video/blank.html

I've copied mp4.mp4 to small.mp4. If you open the test page you will see that big.mp4 loads and can play no problem. However, there is an error event while loading small.mp4 and you cannot right click to play small.mp4. I'm pretty sure I am doing it right. Agree/disagree?

Any ideas? Thanks!

@kalifg

kalifg commented 10 years ago

My play is grayed out on Chrome for Linux, but maybe it recognizes that it is a single frame. It still gives me the "Save video as" option. I'm not sure what the correct behavior is here but I can play with it, maybe add another frame and see if anything changes.

mathiasbynens commented 10 years ago

Right, I cannot play small.mp4 on Chrome / OS X 10.9, but @kalifg might be right.

chevett commented 10 years ago

Thanks for the super fast responses! I tried to make the demo page a little more useful. The videos should now start playing right away and I listen for play and error events and write to the page when I receive such events. Additionally, you can "override" the big and small videos like so: http://filibuster.herokuapp.com/mobile-video/blank.html?small=http://techslides.com/demos/sample-videos/small.mp4 http://filibuster.herokuapp.com/mobile-video/blank.html?big=http://techslides.com/demos/sample-videos/small.mp4

If you happen to have a two frame mp4, or if creating a new one is easy for you that would be awesome(i don't know how to create these mp4s). You could test it with the small parameter if you like. From my perspective all green and no red on the test page is the correct behavior. Thanks!!

chevett commented 10 years ago

oh wait, it works just fine in safari... It's just a chrome issue. If you have a 2 or 3 frame i'd be more than happy to test in chrome :), but it looks like there is no issue with the mp4?

patrickkettner commented 10 years ago

For what it is worth it is not working on iOS 7 either

mathiasbynens commented 10 years ago

@chevett Nice find! Would you mind filing a Chrome bug for this? http://crbug.com/new

chevett commented 10 years ago

https://code.google.com/p/chromium/issues/detail?id=328445

waldyrious commented 9 years ago

That issue was closed as WontFix, with the justification that the contents of the file are MPEG-4 SP and not H.264. Does this affect the validity of the .mp4 file? Maybe we should have more than one version of minimal mp4 files, each with a different codec?

mhofman commented 8 years ago

It would be awesome if we could get an MP4 file containing an H.264 stream.