Nginx serving Large static files on windows

directio 2G;

So i allow uploads of 2Gigs and i do streaming and with files being
that are 2gigs in size you can imagine things could of been loading a

Now itpp2012 mentioned to me in another area of the forum “(mapping a
is slow, use direct ip access)” And with my drives mapped still as soon
as i
change this value parameters value to be 2G large video files are served
super fast.

Can anyone tell me if it is bad that i set this value to be so large ?

Posted at Nginx Forum:

It appears to maybe be something else the media file is about 1.5gb and
will just take about 44 seconds before it starts playing.

Posted at Nginx Forum:

I serve allot of media files from the server they are all quick and fine
just this 1.5GB (7 hour long) mp4 file to be served / loaded seems to
44 seconds and i also do not use the mp4; module.

Posted at Nginx Forum:

What a strange bug i am totaly confused because the way i generate media
also have a webm file of the same video and the webm you go to the url
may only be 900mb but its the same length (7 hours) and it loads

The mp4 1.5gb 7hour long takes between 43 - 50 seconds before you can
to play the video.

Posted at Nginx Forum:

Sounds like a client issue which isn’t dealing with partial downloads,
the same thing with an old vlc and twd/s5, used the latest vlc and it
started playing after 2 seconds (2.8gb).

If a client tells nginx to get it all it will send it all.

Posted at Nginx Forum:

So its not the server its not nginx and its my firefox and chrome ?
i tried on chrome too and it takes just as long.

Posted at Nginx Forum:

Sorry to keep posting this all seperatly but what makes this even
once 44 or so seconds pass and the media starts playing i can skip
i like in the file and its fast as soon as i refresh and redownload i
to wait again.

I dont know why there are other files just as large but not mp4’s that
download fast and can stream fast but with large mp4’s nginx seems to
wait or buffer or something first what i dont see how it can be
when i do not use the mp4; module.

Also in my setup it is not I/O usage because i use the following disk
controller :

Caching frequently accessed data to a SSD.

And all hard drives are the following.

Everything loads and downloads fast just MP4’s larger than 1GB seem to
slow webm or other media formats seem to be fine.

Posted at Nginx Forum:

I have no idea how it works in detail but I can assume when a server
gets a
request the server will respond with an answer :slight_smile: in other words the
has to tell the server how much it wants and the server has to be able
send partial content when configured to do so as by rtmp design (well
actually by design but by rtmp upstream who feeds nginx/rtmp) its a
and everyone needs to play nice or you will get it all at once.

Posted at Nginx Forum:

Strange i think you are right i access the same mp4 size and vide length
other sites and they all do the same thing take like upto a miniute
they will play but a webm will play instantly.

Any idea how i can fix this ?

But what makes it strange is it does not happen with YouTube videos that
10-48 hours long but then i think youtube uses rtmp streams what is

Posted at Nginx Forum:

It heavily depends on the mp4 file used. moov atom needs to be at the
beginning of the file, for example. Get mp4box and read its doc, it will
help you prepare the file for streaming.

Lukas T. Wrote:


streaming you encounter this problem.
nginx Info Page
nginx mailing list
[email protected]
nginx Info Page

Like i said previously i do not use the MP4; module.

And besides that all videos are compiled for HTML5 streaming with the
following command line via ffmpeg. -movflags +faststart

So all metadata is at the start of the file all other mp4’s are fine
very large / very long mp4 files have this problem. webm ogg flv all
and fast regardless of size.

Posted at Nginx Forum:

I just found something cool i am not sure if anyone knows but our
will always use the first supplied media file to play from.

<?php if ($params->get('mp4')) : ?><source src="<?php echo <p>$params->get(‘mp4’); ?>" type=“video/mp4” /><?php endif; ?></p> <?php if ($params->get('webm')) : ?><source src="<?php echo

$params->get(‘webm’); ?>" type=“video/webm” /><?php endif; ?>

<?php if ($params->get('ogg')) : ?><source src="<?php echo <p>$params->get(‘ogg’); ?>" type=“video/ogg” /><?php endif; ?></p> <?php if ($params->get('flv')) : ?><source src="<?php echo

$params->get(‘flv’); ?>" type=“video/flv” /><?php endif; ?>

So as you see the first media file to be delieverd for the media player
grab is the MP4.
If i switch and make the webm the first in line.

Now in my browser when i tell the media player to play it plays the webm
file first. And it loads instantly aswell as the webm is also a smaller
than mp4 and higher quality.

Posted at Nginx Forum:

Well i dont get it all at once i just have to wait like 44 seconds
the first byte or bit of the download so i can play the media while the
of it downloads.

It is such a unique issue. I never noticed it until now because when i
the same length videos on youtube and places they stream it via rtmp
dash i recon. But when you delieve just a standard mp4 file for html5
streaming you encounter this problem.

I read that even cpu or ram could contribute to this but i find that

Posted at Nginx Forum: