This is an old revision of the document!


MP4/H264/F4V Video Streaming

Since 4.1RC2, LSWS support streaming of MP4/H264/F4V video files with random seek.

To enable the feature, make sure file with suffix “.mp4” or “.f4v” has a MIME type of “video/mp4”.

the MIME settings file is /path/to/lsws/conf/mime.properties, or you can view/edit it in web admin console:

Server-->General-->MIME Settings
Suffix: f4v,mp4
Mime Type: video/mp4

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, input “your_site_address/video.mp4” (your IP address/localhost should work 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 you would like to insert the video in.
  • 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 be on the associated web page of your site. For more Information on embedding MP4 videos using HTML, visit http://www.w3schools.com/html/html5_video.asp

  • Admin
  • Last modified: 2015/08/12 18:01
  • by Michael Alegre