0

I want to play local video by web browser with js. Normally, it would be solved with html5 video tag. but the video was too big, ram couldn't contain it. So I decided to streaming local video file on browser not through server. I search it and I found that mediasource API able to do that, but I failed play my video. I search again more then I found video segments(initialization segments and media segments) form needed. but I couldn't find the way how to make it.

how can make video segments by js? Is there any kind of api support to make it?

please not just about mp4box. mp4box is just for mp4 type. I want play every type of video that supported in video tag.

prism
  • 1
  • Is there a reason to not just play it through an embedded third party player that specializes in that stuff like YouTude? – Nosajimiki Oct 06 '17 at 18:48
  • because I don't want to go though the server. I want to finish on client side. For example, I bought a new laptop and there is no video player like quicktime and have very slow network so that can't upload video but can access website then it make difference. – prism Oct 09 '17 at 09:59
  • An iframe embed will not run off of your server, it will run off of Youtube's server. Basicly, your server will send the browser an html page, then the browser will request the resource from YouTube. - So I guess this solution depends on whether it is your server or your local internet that is slow. – Nosajimiki Oct 13 '17 at 18:36
  • Why need I use third party player? I know that with using Mediasource API, we can stream local video directly. The problem is I don't know how to chunk video for Mediasouce API on browser js . There is a solution for node.js that is `fs.readcreateStream()`. But I can't find chunker except mp4box.js – prism Oct 26 '17 at 01:50
  • Oh, I was not saying you needed to, just that it is a lot more performant to in 99% of cases. Self-hosted video has to be streamed from your own server which can rarely compete with services like youtube because they use all sorts of fancy stuff like CDNs that become expensive investments when creating your own hosting environment (depending on your budget). If you have videos that are not practical to upload to youtube or contain privileged information, this: https://stackoverflow.com/questions/10328401/html5-how-to-stream-large-mp4-files may be what you need to get it working self hosted. – Nosajimiki Nov 15 '17 at 16:11

0 Answers0