jhiesey / videostream

Play html5 video when from a file-like object
MIT License
243 stars 74 forks source link

Play a video larger than 3GB #38

Closed snowinszu closed 5 years ago

snowinszu commented 6 years ago

I tried to play a MP4 video larger than 3GB, but it doesn't work.

wechatimg1086

tzarebczan commented 5 years ago

We are having the same issue on the LBRY project (https://github.com/lbryio/lbry-desktop/issues/1577)

Anyone interested in working on fixing this? We can help pay for dev time with LBC (LBRY Credits)

jhiesey commented 5 years ago

I'll do some preliminary investigation this week.

diegocr commented 5 years ago

Hi @jhiesey,

Let me help out with this since you was very kind by looking into adding Safari browser support (although is not yet complete ;))

The main issue here is a off-by-one-byte bug in the uint64be package, so first of all you need to update your package.json file to use the 2.0.2 version.

Then you will need to add a co64 box parser in mp4-box-encoding, you can grab one already made here.

and finally:

https://github.com/jhiesey/videostream/blob/48f375057341d06075a49dd44c5f8c9813c81f13/mp4-remuxer.js#L155

Replace that stbl.stco by (stbl.stco || stbl.co64), and that's all :)

jhiesey commented 5 years ago

Woah thanks for the debugging @diegocr! I'll get those fixes merged in this week.

diegocr commented 5 years ago

No problem, i can make PRs if you want, but these changes should be kinda straightforward :)

jhiesey commented 5 years ago

Fix published in v2.5.0

tzarebczan commented 5 years ago

@jhiesey / @diegocr please see https://lbry.io/faq/tips if you'd like to be compensated in LBC for your efforts :)

diegocr commented 5 years ago

@tzarebczan Thanks for the offer, I don't like taking any tips for this though, if there were some allocated to me don't hesitate to forward them towards this repo author/owner :)

tzarebczan commented 5 years ago

@diegocr / @jhiesey can you confirm this was fixed? I tried pulling in the changes and still seeing this: image

diegocr commented 5 years ago

Well, these changes definitely added support for "big files" by integrating such co64 parser, and i can confirm it does work like a charm for me, although i don't use render-media.

jhiesey commented 5 years ago

Yes I verified the changes fixed the large file issue. This looks like a different problem; I'm a bit busy at the moment but will take a look when I have time.