Nginx serving Large static files on windows

directio 2G;

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

Now itpp2012 mentioned to me in another area of the forum “(mapping a
drive
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:
http://forum.nginx.org/read.php?2,254257,254257#msg-254257

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

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254258#msg-254258

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
take
44 seconds and i also do not use the mp4; module.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254259#msg-254259

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

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

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254260#msg-254260

Sounds like a client issue which isn’t dealing with partial downloads,
had
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:
http://forum.nginx.org/read.php?2,254257,254262#msg-254262

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

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254265#msg-254265

Sorry to keep posting this all seperatly but what makes this even
stranger
once 44 or so seconds pass and the media starts playing i can skip
anywhere
i like in the file and its fast as soon as i refresh and redownload i
have
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
either
wait or buffer or something first what i dont see how it can be
buffering
when i do not use the mp4; module.

Also in my setup it is not I/O usage because i use the following disk
cache
controller :
http://www.lsi.com/products/raid-controllers/pages/megaraid-sas-9271-8i.aspx

Caching frequently accessed data to a SSD.

And all hard drives are the following.
http://www.hgst.com/hard-drives/enterprise-hard-drives/enterprise-sas-drives/ultrastar-he6

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

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254261#msg-254261

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
client
has to tell the server how much it wants and the server has to be able
to
send partial content when configured to do so as by rtmp design (well
not
actually by design but by rtmp upstream who feeds nginx/rtmp) its a
chain
and everyone needs to play nice or you will get it all at once.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254271#msg-254271

Strange i think you are right i access the same mp4 size and vide length
on
other sites and they all do the same thing take like upto a miniute
before
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
are
10-48 hours long but then i think youtube uses rtmp streams what is
proborly
why.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254267#msg-254267

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:

before

streaming you encounter this problem.
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Like i said previously i do not use the MP4; module.
http://nginx.org/en/docs/http/ngx_http_mp4_module.html

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
just
very large / very long mp4 files have this problem. webm ogg flv all
fine
and fast regardless of size.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254274#msg-254274

I just found something cool i am not sure if anyone knows but our
browsers
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
to
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
file
than mp4 and higher quality.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254275#msg-254275

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

It is such a unique issue. I never noticed it until now because when i
watch
the same length videos on youtube and places they stream it via rtmp
with
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
unlikely.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,254257,254272#msg-254272