user3895503 user3895503 - 8 months ago 57
Node.js Question

Streaming MP4 with Express and connect-stream

I currently have developped a small nodejs server to serve MP4 videos.
To transmit it i use Express and the connect-stream library.

But when i go to the videos URL (1 URL per video) some video start right away and some doesn't start at all (Under Chrome).

They're all encoded with H264/AAC.

The only thing i see different on the client side is that for the videos that won't play, there is a HTTP 304 sent.

I tried to block etag and set cache-control header to no cache but still, nothing is working.

Any ideas ?

Thanks in advance !


304 is not an error so I backup Etag configuration. But still the problem remains.

Answer Source

Actually the problem was found within s3fs implementation, S3 is used to store the video and it is not good with streaming. I implemented a RAM cache with a bash process to put/delete videos chunk in RAM