Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I followed this example from Html5Rocks.com, that is using the MediaSource API and a .webm video. I tried the example with another .webm video and it was working, but when I tried with .mp4 video it didn't work. Is it possible somehow?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
406 views
Welcome To Ask or Share your Answers For Others

1 Answer

Update: MP4 (or more formally ISO BMFF) support is in Chrome Dev/Canary. You'll need to generate your MP4 files in a way that conforms to the Media Source spec. Fortunately, Media Source was written with MPEG-DASH in mind, so any DASH-compliant files will work with Media Source. GPAC/MP4Box is a great tool for this:

MP4Box -dash 5000 -frag 5000 -rap some_file.mp4

...will create 'some_file_dash.mp4', which should be compatible with Media Source. There are some bugs in earlier released versions of MP4Box, so I recommend building from SVN for now.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...