User Tools

Site Tools


Video Embedding: HTML5 Video

Video playback is supported on all modern devices, and video pages are responsive, suitable for desktop and mobile browsers alike.

HTML5 video embedding allows you to host video locally in your own space; it's also the most complicated to setup. The Vimeo and YouTube options are much easier to implement, but require that your video be hosted on either the Vimeo or YouTube website, respectively. HTML5 video …

  • … requires some one-time server-side setup to set appropriate MIME types for the video files, and …
  • … because each of the major browsers has different file support for video, it is necessary to create identical video files in a variety of formats.

Server-side Setup for HTML5 Video

To get running with HTML5 video, we must add MIME type directives to a .htaccess file so that browsers are able to properly recognize the video files. This is a one-time setup that you will not need to repeat when adding new video to your site.

Access the root of your website using an FTP client; if hosting with Bluehost, that's your /public_html/ folder. Make sure your FTP client is configured to show invisible files, because .htaccess is usually invisible.

If you have a preexisting .htaccess file, edit it. If there is no .htaccess file, create a new file and name it “.htaccess”, then edit it.

Add these lines to your .htaccess file to set the video MIME types:

<IfModule mod_mime.c>
	AddType video/mp4 mp4 m4v f4v f4p
	AddType video/ogg ogv
	AddType video/webm webm
	AddType video/x-flv flv

Save the .htaccess file.

Preparing the Video Files

Full HTML5 video support requires identical video files in three formats:

  • An h.264 MP4 file for Webkit browsers (Chrome, Safari, etc.)
  • An OGV file for Firefox and Opera
  • A WebM file for Internet Explorer

For older browsers lacking HTML5 video support, or browsers for which a video file is not supplied (i.e. if the OGV or WebM files are missing), then the h.264 video file will be played back using a Flash-based browser.

So while the ideal setup is the combination of MP4, OGV and WebM files, it is possible to supply only the MP4 file and to use the Flash fallback for other browsers. This is not recommended, however; if you are unwilling or unable to supply OGV and WebM video files, then please choose either the Vimeo or YouTube video methods above.

The easiest way to create the necessary video files is using a utility such as EasyHTML5Video (Mac/Win, commercial) or Miro Video Converter (Linux/Mac/Win, free).

Your video files and the poster image should be named identically, for example:


Your life will be easier if you ensure a human-readable title for your files.

Upload your files into a folder named “videosrc” in the main domain of your Backlight installation, i.e.:


Configure the Template for HTML5 Video

Edit an existing album template, or create a new one using the Theater Add-on. In the designer, under Album Setup:

  • Set Presentation Type: Video
  • Set Video Source: “HTML5 Video”

You may set native video dimensions, but it's honestly not very important; you may keep the defaults if you'd like, and that will probably be fine. If there's any problem, you can always come back!

Set your preferences for the video presentation, then save your template.

With a template ready to use, go to Lightroom.

Under Publish Services, create a new album:

  • Under Base SettingsTemplate, select your template.
  • Under Page ContentVideo ID, supply the video ID; the name of the video should then be entered into Lightroom without a file extension, i.e. “my_awesome_video”.

But SHOULD I be using HTML5 Video?

Just because you can, does not necessarily mean that you should. For example, if you're on a shared hosting plan such as those offered by Bluehost, then HTML5 Video is probably not for you. Serving video directly from your site will chew through your bandwidth quickly.

If you're serious about video privacy, delivery and platform scalability, then a Vimeo Pro account is worth serious consideration. Otherwise, check Vimeo's other membership options to find the level that's right for you.

theater_add-on_presentation_video_embedding_html5.txt · Last modified: 2016/09/05 07:34 by matthew