|
The HTTP Origin Module is an extension to Apache HTTP Server
that serves content packaged offline for HTTP Dynamic Streaming.
The HTTP Origin Module is available from adobe.com/products/httpdynamicstreamingand
is installed with Flash Media Server 4.0 and later.
About the HTTP Origin ModuleDownload the HTTP Origin ModuleThe HTTP Origin Module is an extension to Apache HTTP Server
version 2.2. The HTTP Origin Module processes F4F, F4M, F4X, .bootstrap
and .drmmeta files. For more information about these file types,
see Input file formats and output file formats.
The HTTP Origin Module reference implementation available on adobe.com supports on-demand streaming
only. You can install this HTTP Origin Module on any installation
of Apache HTTP Server 2.2. This document contains information about
on-demand streaming only.
Flash Media Server 4.0 includes Apache HTTP Server and Apache
modules for live HTTP Dynamic Streaming and on-demand HTTP Dynamic
Streaming for content packaged offline.
Flash Media Server 4.5 includes Apache HTTP Server and Apache
modules for live and just-in-time on-demand HTTP Dynamic Streaming
and HTTP Live Streaming to Apple devices. For more information,
see Get started streaming media.
Data flow through the HTTP Origin ModuleTo play a file in the OSMF Player, you provide only the
URL to an F4M file. The OSMF Player automatically handles the transactions
in steps 4-8.
The client sends an HTTP request for media to Apache,
for example:
http://www.example.com/media/http_dynamic_Streaming.f4m
Apache passes the request to the HTTP Origin Module.
The HTTP Origin Module returns the F4M file to the client.
The client receives the F4M file and uses the bootstrap information
to translate time code into a segment#/fragment# pair.
The client sends a second HTTP request to Apache and asks
for a specific fragment from the F4F file, for example:
http://www.example.com/media/http_dynamic_StreamingSeg1-Frag1
Apache receives the request and passes the request to the
HTTP Origin Module.
The HTTP Origin Module uses the index file (F4X) to translate
the request into a byte offset in the F4F file. It sends the contents
of this file that correspond to Segment1 and Fragment. This partial
content is an F4F fragment, for example:
http://www.example.com/media/http_dynamic_StreamingSeg1.f4f
The client receives the fragment and starts playback based
on the bootstrap information provided with the fragment and the
information from the F4M file.
Configure Apache and Flash Media Server to run on the same computerThe Flash Media Server installer includes Apache HTTP Server.
By default, Flash Media Server receives all traffic on port 80 and
proxies it to Apache on port 8134. Proxying the traffic can cause
performance issues with HTTP Dynamic Streaming because of the high
number of HTTP requests at both edge and origin network locations.
To fix this issue, configure Flash Media Server not to use port
80 and configure Apache to use port 80.
Configure Flash Media Server not to use port 80:
Open the rootinstall/conf/fms.ini file in a text
editor.
Remove port 80 from the ADAPTOR.HOSTPORT parameter, as follows:
ADAPTOR.HOSTPORT = :1935
Remove the value from the HTTPPROXY.HOST parameter as follows:
HTTPPROXY.HOST =
Save and close the fms.ini file.
Restart the server. See Starting and stopping the server.
Configure Apache to use port 80:
Open the rootinstall/Apache2.2/conf/httpd.conf
file in a text editor.
Locate the line Listen 8134 and change it
to the following:
Listen 80
Save and close the httpd.conf file.
Restart the server. See Starting and stopping the server.
Note: Alternately, you can configure Apache to use a port other
than port 80. To use a port other than 80, request URLs must contain
the port number. By default, Apache on Flash Media Server is configured
to use port 8134. This URL requests an on-demand HTTP Dynamic Streaming
manifest file: http://www.example.com:8134/vod/mymedia.f4m.
Installing and configuring the HTTP Origin ModulePrerequisitesInstall Apache HTTP Server version 2.2 or later.
On Windows, download and install Microsoft Visual C++ 2005
Redistributable Package and Microsoft Visual C++ 2008 Redistributable
Package.
On Linux, download and install the following libraries:
OpenSSL, Expat, and Netscape Portable Runtime (NSPR).
Install the HTTP Origin Module Copy the following files to the Apache \modules
folder: -
(Windows) mod_f4fhttp.so, hds.dll (adbe_F4V.dll in earlier versions), libexpat.dll
-
(Linux) mod_f4fhttp.so, libhds.so (libF4V.so in earlier versions), libexpat.so
Configure on-demand streamingOpen the Apache \conf\httpd.conf file in a text
editor.
Locate the LoadModule section and add the following line:
LoadModule f4fhttp_module modules/mod_f4fhttp.so
Configure the HTTP Origin Module to process HTTP requests
that are targeted to a sandbox location. The module is not allowed
to access files outside the sandbox.
Add the following:
<Location /vod>
HttpStreamingEnabled true
HttpStreamingContentPath "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\vod"
</Location>
Substitute your own values for the
values in italics.
Directive
|
Description
|
<Location>
|
The section of the request URL that maps
to the physical location you specify in the HttpStreamingContentPath directive.
Do not include an http prefix (such as “http://servername”) in the <Location> path.
|
HttpStreamingEnabled
|
Indicates whether HTTP streaming is enabled
(true) or not (false).
|
HttpStreamingContentPath
|
The physical location of the content. Use
an absolute path that includes the DocumentRoot.
In this
example, the HTTP Origin Module can process files in the C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\vod folder or
in any of its subfolders.
|
Save and close the file.
Restart Apache HTTP Server.
Note: An httpd.conf file can contain multiple Location directives.
You can configure a Location directive for on-demand
media and another for live media.
Request on-demand files from a media playerIn the httpd.conf file HttpStreamingContentPath directive,
configure a location for physical files on the server. To request
a file, a video player uses the Location path +
the additional path to the file.
Suppose the following is the Location configuration:
<Location /vod>
HttpStreamingEnabled true
HttpStreamingContentPath "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\vod"
</Location>
This configuration processes any request that contains the path
/vod. The HTTP Origin Module maps the request to the HttpStreamingContentPath,
for example:
Request URL
|
Physical file served to client
|
http://example.com/vod/sample.f4m
|
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\vod\sample.f4m
|
http://example.com/vod/free_content/demo.f4m
|
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\vod\free_content\demo.f4m
|
http://example.com/index.html
|
Not processed.
|
LoggingAccess logAll HTTP access requests are logged in the Apache access_log
file in the \logs directory. The HTTP Origin Module doesn’t add
any logging directives. All access requests are logged through the
standard Apache HTTP Server log module.
Error logAll errors are logged in the Apache error_log file in the
\logs directory. For information about the response codes that the
HTTP Origin Module returns, see Logging for HTTP Dynamic Streaming in
the Flash Media Server Configuration and Administration Guide.
|
|
|