1 00:00:07,200 --> 00:00:12,540 In this video we'll take a look at video streaming and more specifically the MP for module. 2 00:00:12,540 --> 00:00:14,910 First of all there's modulars not both by default. 3 00:00:14,940 --> 00:00:21,370 So it will have to be added to the install flags during the ball process by setting the flag with hgt 4 00:00:21,590 --> 00:00:27,720 MP for module Now this module doesn't exactly an able video streaming as that would only really require 5 00:00:27,750 --> 00:00:28,940 serving the file. 6 00:00:28,980 --> 00:00:33,990 But if we take a look at the documentation we can see what the module offers his control over streaming 7 00:00:34,060 --> 00:00:36,970 rate and also the streaming buffer sizes. 8 00:00:36,990 --> 00:00:42,510 It also enables pseudo streaming to demonstrate this if added an MP for video file to that original 9 00:00:42,510 --> 00:00:49,230 downloads directory and I'll head over to my editor with the engine X configuration file open and first 10 00:00:49,230 --> 00:00:54,360 of all I'll just define a new location for MP for files from their downloads directory. 11 00:00:54,690 --> 00:01:02,230 Say location regex modifier then matching anything ending with an MP for file extension. 12 00:01:03,040 --> 00:01:09,970 Next I'll set the root directory for this context to slash site slash downloads and define the MP for 13 00:01:09,970 --> 00:01:14,590 module inside the location block then to control the size of processing buffers. 14 00:01:14,590 --> 00:01:20,440 We can say MP for underscore buffer underscore size 4 megabytes. 15 00:01:20,470 --> 00:01:25,540 MP 4 underscore Max underscore buffer size 10 megabytes. 16 00:01:25,540 --> 00:01:30,520 This will simply tell engine X how much memory to allocate to processing the headers of the stream. 17 00:01:30,520 --> 00:01:34,900 Then should a larger buffer be required what the maximum allowed buffer should be. 18 00:01:34,900 --> 00:01:38,690 Anything over this will result in a five hundred internal server error. 19 00:01:39,510 --> 00:01:44,870 Now if we save this reload the configuration file and head over to the browser. 20 00:01:45,180 --> 00:01:50,850 I'll never go to that video file but going to slash big buck by any dot MP for. 21 00:01:53,610 --> 00:01:58,170 And sure enough after a second or two the video starts playing as expected. 22 00:01:58,170 --> 00:02:03,390 Of course most modern browsers will deal with an MP for file just fine but in addition to controlling 23 00:02:03,390 --> 00:02:09,750 buffer sizes as engine X MP for module also allows pseudo streaming meaning that we can actually specify 24 00:02:09,750 --> 00:02:13,770 a starting time and even an ending time for this video. 25 00:02:13,830 --> 00:02:21,220 If I go to the you earlier and specify start equals say 15 seconds and hit enter. 26 00:02:21,390 --> 00:02:24,540 This video will now start playing at 15 seconds in. 27 00:02:25,450 --> 00:02:31,140 So overall a very helpful module and really a must have for any Web site with streaming video content.