|
Configure the HTTP modulesApache HTTP Server that installs with Flash Media Server
is configured by default for Adobe HTTP Dynamic Streaming (to Flash
Player and AIR) and Apple HTTP Live Streaming (to iOS and Mac OS).
The Flash Media Server Apache installation includes three custom
modules that handle HTTP streaming:
jithttp_module—just-in-time on-demand Adobe HTTP Dynamic
Streaming (HDS).
f4fhttp_module—live HDS; on-demand HDS packaged offline
hlshttp_module—live and on-demand Apple HTTP Live Streaming
The configuration of the modules determines the format of the
URL that the player requests from the server, the location of the
content, the content fragmentation settings, and other settings.
Configure the settings at the server-level in the Apache httpd.conf
file located at rootinstall/Apache2.2/conf/httpd.conf. You can
also configure some settings at the application level, event level,
and stream level. For complete details, see Configuring HTTP Dynamic Streaming and HTTP Live
Streaming in the Flash Media Server Developer’s Guide.
For information about configuring ports for HTTP Streaming, see Configure ports for HTTP streaming.
Logging for HTTP streamingAll 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.
All errors are logged in the Apache error_log file in the \logs
directory. The following table shows the response codes that the
HTTP Origin Module returns.
Response code
|
Error message
|
Description
|
200
|
None
|
No error occurs, and a response has been
returned successfully.
|
304
|
None
|
The HTTP Origin Module supports "If-Modified-Since"
in the request header and returns 304 if the file has not been modified."If-Modified-Since" is
not support in requests for manifest files of live events.
|
400
|
mod_f4fhttp [400]: Syntax error in %s
mod_hlshttp
[400]:Syntax error in %s
|
Error occurs while parsing the URI request.
The variable %s is the URI string. For example, the request URI
http://servername/media/sample- is missing a fragment number. For
example, in the request http://example.com/hls-vod/sample.f4vNumX.ts,
the ts fragment name format is not correct.
|
400
|
mod_hlshttp [400]: %1 is a invalid file
|
Error occurs while reading the information
in a file, where %1 is the URI string. For example, the manifest
file is wrong or the bootstrap is invalid or the .stream file is
not valid.
|
403
|
mod_f4fhttp [403]: No access to %s
mod_hlshttp[403]:
No access to %s
mod_f4fhttp [403]: Internal error %1 (%2) when
processing %3
mod_hlshttp[403]: Internal error %1 (%2) when processing
%3
|
An error occurs when accessing the file.
The variable %s is the file path. For example, the request URI is
http://servername/media/sample.fmf and the module doesn’t have permission
to read the file sample.f4m.
An error occurs when the library
fails to access a file. The variable %1 is the error code from the
library, %2 is error description, and %3 is the url string.
|
404
|
mod_f4fhttp [404]: %s does not exist
mod_hlshttp[404]:
%1 does not exist
mod_f4fhttp [404]: Internal error %1 (%2) when
processing %3
mod_hlshttp[404]: Internal error %1 (%2) when processing
%3
|
An error occurs when the request file is
not found. The variable %s is the file path. For example, the request
URI is http://servername/media/sample.fmf but the file sample.f4m
does not exist.
Error occurs when the library fails to find
a file. The variable %1 is the error code from the library, %2 is
the error description, and %3 is the url string.
|
500
|
mod_f4fhttp [500]: Unknown exception when processing
%1
mod_hlshttp [500]: Unknown error when processing %1
mod_f4fhttp
[500]: Internal error %1 (%2) when processing %3
mod_hlshttp
[500]: Internal error %1 (%2) when processing %3
mod_hlshttp[500]:
Packaging error %1 (%2) when processing %3
|
An unknown error occurs when processing
a request, where %1 is the URL string. For example, http://servername/media/sampleSeg1-Frag1, sampleSeg1.f4f
is not a corrupted file.
An unknown error occurs when processing
a request, where %1 is the URI string. The module fails, where
%1 is the error code, %2 is error description, and %3 is the URI
string.
Error occurs while packaging a ts segment, where %1
is the error code for diagnostic purposes, %2 is the error description
and %3 is the URI being processed. An example of an error description
is, "Audio format is not supported".
A packaging error indicates
that something went wrong while packaging the stream data into a
ts segment. An internal error indicates that something went wrong
while reading stream data from the recorded f4f fragments. An internal
error is more likely to occur due to a recording failure than to
a play back failure.
|
503
|
None
|
The HTTP Origin Module returns a 503 code
so the client and the proxy servers don’t cache the response.
In
a live event, the file can be growing and a fragment could be missing
in one origin server but not missing on another origin server. The
HTTP response header includes an "X-mod_f4fhttp" field to provide
more details. The following is a sample response header:
Date
Thu, 04 Mar 2010 06:20:20 GMT Server Apache/2.2.9 (Win32) Content-Length
432 Last-Modified Wed, 27 Jan 2010 11:43:25 GMT Keep-Alive timeout=5,
max=100 Connection Keep-Alive Content-Type video/f4f X-mod_f4fhttp
1, error 71
There are two parameters in the X-mod_f4fhttp
field delimited by a comma. The first parameter is a status code
and the second parameter is the error code from the library.
There
are two status codes: 1 - The requested fragment number is larger than
the last fragment in the file (the corresponding error is 71). 2
- The requested fragment number is a missing fragment (the corresponding error
is 34).
|
Use an external Apache HTTP Server for HTTP Dynamic Streaming and HTTP Live StreamingTo use an installation of Apache HTTP Server other than
the one that installs with Flash Media Server, do the following:
Install Flash Media Server so you can extract the Apache
modules.
Copy the following files from Flash Media Server to your
Apache modules folder:
rootinstall/Apache2.2/modules/adbe_dme.dll
rootinstall/Apache2.2/modules/adbe_license.dll
rootinstall/Apache2.2/modules/asneu.dll
rootinstall/Apache2.2/modules/hds.dll
rootinstall/Apache2.2/modules/libeay32.dll
rootinstall/Apache2.2/modules/libexpat.dll
rootinstall/Apache2.2/modules/mod_f4fhttp.so
rootinstall/Apache2.2/modules/mod_hlshttp.so
rootinstall/Apache2.2/modules/mod_jithttp.so
Edit your httpd.conf file to load the following modules:
For live Adobe HTTP Dynamic Streaming, add the following:
LoadModule f4fhttp_module modules/mod_f4fhttp.so
<IfModule f4fhttp_module>
<Location /hds-live>
HttpStreamingEnabled true
HttpStreamingLiveEventPath "../applications"
HttpStreamingContentPath "../applications"
HttpStreamingF4MMaxAge 2
HttpStreamingBootstrapMaxAge 2
HttpStreamingFragMaxAge -1
HttpStreamingDrmmetaMaxAge 3600
Options -Indexes FollowSymLinks
</Location>
</IfModule>
For live Apple HTTP Live Streaming, add the following:
LoadModule hlshttp_module modules/mod_hlshttp.so
<IfModule hlshttp_module>
<Location /hls-live>
HLSHttpStreamingEnabled true
HttpStreamingLiveEventPath "../applications"
HttpStreamingContentPath "../applications"
HLSMediaFileDuration 8000
HLSSlidingWindowLength 6
HLSFmsDirPath ".."
HLSM3U8MaxAge 2
HLSTSSegmentMaxAge -1
Options -Indexes FollowSymLinks
</Location>
For on-demand Adobe HTTP Dynamic Streaming, packaged in just-in-time, add
the following:
LoadModule jithttp_module modules/mod_jithttp.so
<IfModule jithttp_module>
<Location /hds-vod>
HttpStreamingJITPEnabled true
HttpStreamingContentPath "../webroot/vod"
JitFmsDirPath ".."
Options -Indexes FollowSymLinks
</Location>
</IfModule>
For on-demand Apple HTTP Live Streaming, add the following:
LoadModule hlshttp_module modules/mod_hlshttp.so
<IfModule hlshttp_module>
<Location /hls-vod>
HLSHttpStreamingEnabled true
HLSMediaFileDuration 8000
HttpStreamingContentPath "../webroot/vod"
HLSFmsDirPath ".."
Options -Indexes FollowSymLinks
</Location>
</IfModule>
In the directives that you entered in your httpd.conf file,
edit the following:
HttpStreamingLiveEventPath and HttpStreamingContentPath—set
to the Flash Media Server applications folder, for example:
C:\Program Files\Adobe\Flash Media Server 4.5\applications
JitFmsDirPath and HLSFmsDirPath—set
to the location of your Flash Media Server installation, for example:
C:\Program Files\Adobe\Flash Media Server 4.5
For information about ports, see Using a third-party web server.
|
|
|