Web-Based Video Publishing

This post is also available in: Russian

As the popularity of multimedia content is growing explosively, the companies are more inclined to put such content at their Web resources. This article will brief you on the main approaches to multimedia publishing and provide details on how to configure your own video content delivery infrastructure. Most probably, you have already found yourself in a situation when you needed to publish conference materials or a managerial speech addressed to your employees or customers, on your site.

There are several possible solutions to the problem. What your best choice will be depends on a variety of content parameters, the business model you use and the frequency of video library update:

  • Public hosting – YouTube, RuTube, Vimeo
  • Professional hosting – online video platforms (Brightcove, Ooyala, etc.)
  • Your own video infrastructure

Possibilities and limitations
Public hosting is the easiest and cheapest option. It imposes some restrictions on video branding and duration, but enables viral distribution of video content.

VidCompare is a nice tool to compare the existing video hosting options. A recent post in their blog was dedicated to the most evident trends in this market. A wide choice available in this comparison tool and a high rate of mergers and acquisitions in the market, signify of a substantial level of service commoditization. Many market players are trying to diversify their offer, so perhaps it makes sense first to explore the basic functionality of the potential providers (analytical tools, monetization levels, platforms supported, customization features, etc.).

Online video platforms typically incur additional expenses, but give a lot of tiny niceties (e.g., analytics which is often underestimated) and also remove most restrictions of the public hosting.

If you choose to implement your own video infrastructure, emergence of new popular platforms like iPhone, iPad, Android, Flash, Internet TV may involve considerable expenses to maintain and develop the platform. It might be better to focus on your core business, using online video platforms or at least outsource infrastructure maintenance.

At the initial stage, while the resource is under construction, or you need to minimize your investment, you may consider self-hosting of video materials. Perhaps, in your case it is expedient to establish your own infrastructure, and then ensure its scalability and fault tolerance with a CDN service provider.

Setting up your own infrastructure

If you choose to deliver video content independently, the following guidelines may be useful for you.

Here is the video content publishing model (primarily for the case of HTTP Dynamic Streaming delivery but applicable for other cases also):

When publishing videos on your portal, you have to solve three tasks:
1. Prepare content
Preparing of video content consists of two stages: transcoding and segmentation.
To transcode video to a format accepted by Web resources, a variety of tools is used: from the ffmpeg freeware to the industrial Rhozet Carbon farms. To publish videos on Web sites, the best fit is to use Adobe F4V with H.264 and AAC audio codecs. If you plan to enable dynamic quality selection in a video player, you need to generate multiple video files with different bit rates.
Segmentation of video content is necessary when using HTTP Dynamic Streaming. This technology allows video player to access any video segment without fully loading the previous segments. This is performed using a free utility Adobe f4fpackager, downloadable from the Adobe website. Here is an example of file segmentation command:

f4fpackager --input-file=sample.f4v --output-path=/outputdir

2. Configuring Web Server
HTTP Web Server has two main tasks: (1) output video file fragments to the Flash video player and (2) cache the most popular fragments (optional). Often, different servers are used to run these tasks. In our case, it is convenient to use the Apache server with a plug-in for fragment output and NGINX for caching the most popular fragments by URL. A detailed guide to setting up the infrastructure is given in a separate article. If you do not need caching, you can simplify the procedure by skipping setup of the caching NGINX server.
If you use Flash Media Server, the task is considerably simplified as you just have to put a file in a proper directory.
3. Video Player
To play back the video content, you have to embed Flash Video Player into your HTML page.
On the Internet, there are many guides on Flash Player development. With the advent of OSMF, this task has become even easier, but still it requires some programming skills. If you have absolutely no inclination to code, then a good option would be to use Strobe Media Playback – it supports HTTP Dynamic Streaming out of the box, or you can use our open source video player. Other option could be using JWPlayer or FlowPlayer but htey lack of support for HTTP Dynamic Streaming and will require extra configuration on HTTP server side or using FMS. In most cases, it all boils down to inserting a few lines of code in the HTML page and specifying the URL of video content configured in the previous step.
Thanks to Lisa Larson-Kelley @lisamarienyc and Andrian Cucu @cucu_adrian for the valuable feedback.

<object type="application/x-shockwave-flash" id="ontivi" name="ontivi" align="middle" data="" width="800" height="450">
<param name="quality" value="high">
<param name="bgcolor" value="#fffdc5">
<param name="allowscriptaccess" value="sameDomain">
<param name="allowfullscreen" value="true">
<param name="wmode" value="opaque">
<param name="flashvars" value="playerType=httpds&contentUrl=http://server_addr/content_url">

If your video is highly popular, you can easily streamline video delivery by involving a CDN operator or installing additional caching NGINX servers.

Let your resources host popular video content!

Leave a Reply