WEBVTT

00:07.200 --> 00:12.540
In this video we'll take a look at video streaming and more specifically the MP for module.

00:12.540 --> 00:14.910
First of all there's modulars not both by default.

00:14.940 --> 00:21.370
So it will have to be added to the install flags during the ball process by setting the flag with hgt

00:21.590 --> 00:27.720
MP for module Now this module doesn't exactly an able video streaming as that would only really require

00:27.750 --> 00:28.940
serving the file.

00:28.980 --> 00:33.990
But if we take a look at the documentation we can see what the module offers his control over streaming

00:34.060 --> 00:36.970
rate and also the streaming buffer sizes.

00:36.990 --> 00:42.510
It also enables pseudo streaming to demonstrate this if added an MP for video file to that original

00:42.510 --> 00:49.230
downloads directory and I'll head over to my editor with the engine X configuration file open and first

00:49.230 --> 00:54.360
of all I'll just define a new location for MP for files from their downloads directory.

00:54.690 --> 01:02.230
Say location regex modifier then matching anything ending with an MP for file extension.

01:03.040 --> 01:09.970
Next I'll set the root directory for this context to slash site slash downloads and define the MP for

01:09.970 --> 01:14.590
module inside the location block then to control the size of processing buffers.

01:14.590 --> 01:20.440
We can say MP for underscore buffer underscore size 4 megabytes.

01:20.470 --> 01:25.540
MP 4 underscore Max underscore buffer size 10 megabytes.

01:25.540 --> 01:30.520
This will simply tell engine X how much memory to allocate to processing the headers of the stream.

01:30.520 --> 01:34.900
Then should a larger buffer be required what the maximum allowed buffer should be.

01:34.900 --> 01:38.690
Anything over this will result in a five hundred internal server error.

01:39.510 --> 01:44.870
Now if we save this reload the configuration file and head over to the browser.

01:45.180 --> 01:50.850
I'll never go to that video file but going to slash big buck by any dot MP for.

01:53.610 --> 01:58.170
And sure enough after a second or two the video starts playing as expected.

01:58.170 --> 02:03.390
Of course most modern browsers will deal with an MP for file just fine but in addition to controlling

02:03.390 --> 02:09.750
buffer sizes as engine X MP for module also allows pseudo streaming meaning that we can actually specify

02:09.750 --> 02:13.770
a starting time and even an ending time for this video.

02:13.830 --> 02:21.220
If I go to the you earlier and specify start equals say 15 seconds and hit enter.

02:21.390 --> 02:24.540
This video will now start playing at 15 seconds in.

02:25.450 --> 02:31.140
So overall a very helpful module and really a must have for any Web site with streaming video content.
