MP4/H264/F4V Video Streaming

As of 4.1RC2, LSWS supports the streaming of MP4/H264/F4V video files with random seek.

1) LiteSpeed Settings

To enable this feature, make sure that files with suffixes “.mp4” or “.f4v” have a MIME type of “video/mp4”.

The MIME settings file is located under /path_to_lsws/conf/mime.properties, or you can view/edit the file from the WebAdmin Console:

Navigate to Server > General > MIME Settings.

If you cannot find an entry for the mp4 or f4v suffixes, you can add them by clicking the “Add” button at the top right of the page and entering the following information:

Suffix: f4v,mp4
Mime Type: video/mp4

2) Test It On Your Own Website

There are two very simple methods of testing this out:

Method 1: Viewing Your MP4 Directly

  • Place your video file (video.mp4 in this example) under lsws > your_site_directory > html.
  • In your browser's address bar, enter “your_site_address/video.mp4” (IP address/localhost should work here as well).

If everything is working correctly, your video should be displayed and able to play.

Method 2: Embedding Your MP4 In A Page

  • Place your video file (video.mp4 in this example) under lsws > your_site_directory > html.
  • Open the HTML file of the page where you would like to insert the video.
  • Find the line in the HTML where you would like to place the video and insert the following code:
<video width="320" height="240" controls>
  <source src="video.mp4" type="video/mp4"> 
</video>

The video should now appear on the associated web page of your site. For more Information on embedding MP4 videos using HTML as well as some more options available with this method, visit w3schools.com.

 
litespeed_wiki/config/mp4-streaming.txt · Last modified: 2015/08/12 18:21 by Michael Alegre