Setup nginx to video streaming

I use nginx to stream video from server.

But i get error: net::ERR_CONTENT_LENGTH_MISMATCH in this case:

  1. load page (video tag in background download small part of video - 2-3 Mb)
  2. wait one-two minutes
  3. play video browser download some more content (about 3 Mb) and then raise an error if i do not wait video play without errors

how can i fix this error?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

instal Nginx

Andrew SB, thanks for your help! <br>I solve my issue with this directive: <br>send_timeout 100m; <br>this keeps connection for 100 minutes when a client retrieves a video file.

Could you post a sample of header? <br> <br>This bug report in Chrome explains why the problem happens there but not with Firefox. Firefox simply ignores it when the Content-Length header reports something different than the actual length. <br> <br> <br> <br>How about setting “proxy_buffering off;” ? <br> <br>This question over on ServerFault might help point you in the right direction: <br> <br>