So I have this side project where I'd really want to host my own few videos and allow only to authenticated users to watch them and I can't find a way to do adaptive streaming in NodeJS, I've tried many methods I read in few medium articles like serving it in chunks with chunk-length header or something like that, and then the video tag in HTML5 will automatically be able to work with it but it never really worked in a good way and in a real adaptive streaming way (like for example websites like YouTube or Netflix do it, where if you access the link you put in the video tag directly then you don't get the actual MP4 file) and in a way that if you skip to like 50% of the video then it immediately start to stream from the new position and doesn't have to load all the content up until the 50% position in order to play it, in addition to that, the video wouldn't work in an adaptive way (like I just described) on ExpoPlayer in android (which has out of the box support for adaptive streaming content)Thanks in advance :)BTW I really hope people won't comment here about how bad it is to use NodeJS for streaming content and blah blah balh.. NodeJS is a really powerful tool and you can get a very high performance even for streamed content as long as you know how to manage the threads/workers and how not to block the event loop, so please don't comment any of that stuff :) (besides I'm only talking about few videos that the user will see only once or twice)
Submitted May 11, 2020 at 05:22AM by s_trader
No comments:
Post a Comment