In this video we'll take a look at video streaming and more specifically the MP for module.
First of all there's modulars not both by default.
So it will have to be added to the install flags during the ball process by setting the flag with hgt
MP for module Now this module doesn't exactly an able video streaming as that would only really require
serving the file.
But if we take a look at the documentation we can see what the module offers his control over streaming
rate and also the streaming buffer sizes.
It also enables pseudo streaming to demonstrate this if added an MP for video file to that original
downloads directory and I'll head over to my editor with the engine X configuration file open and first
of all I'll just define a new location for MP for files from their downloads directory.
Say location regex modifier then matching anything ending with an MP for file extension.
Next I'll set the root directory for this context to slash site slash downloads and define the MP for
module inside the location block then to control the size of processing buffers.
We can say MP for underscore buffer underscore size 4 megabytes.
MP 4 underscore Max underscore buffer size 10 megabytes.
This will simply tell engine X how much memory to allocate to processing the headers of the stream.
Then should a larger buffer be required what the maximum allowed buffer should be.
Anything over this will result in a five hundred internal server error.
Now if we save this reload the configuration file and head over to the browser.
I'll never go to that video file but going to slash big buck by any dot MP for.
And sure enough after a second or two the video starts playing as expected.
Of course most modern browsers will deal with an MP for file just fine but in addition to controlling
buffer sizes as engine X MP for module also allows pseudo streaming meaning that we can actually specify
a starting time and even an ending time for this video.
If I go to the you earlier and specify start equals say 15 seconds and hit enter.
This video will now start playing at 15 seconds in.
So overall a very helpful module and really a must have for any Web site with streaming video content.