f4fhds

The 'f4fhds' directive enables handling of HTTP Dynamic Streaming requests in NGINX for Adobe f4f format.

Syntaxf4fhds;
Defaultnone
Contextlocation
Argumentsnone

Description

The 'f4fhds' directive is designed for use in NGINX's location context to facilitate the extraction of video fragments from Adobe's f4f format files. This directive works by utilizing an index file (usually named with a .f4x extension) that corresponds to a primary video file (with a .f4f extension). When a request is made for a specific video segment, the 'f4fhds' directive retrieves the necessary fragment information from the index file and serves the appropriate portion of the video content to the client. It acts as a lightweight alternative to the Adobe f4f module used in Apache, providing similar functionality in a more streamlined manner.

Internally, the module employs memory-mapped file I/O via the mmap() system call to efficiently handle the requested video segments. This method is particularly effective for accessing local files since it reduces the overhead associated with file reading. The directive does have some limitations; notably, it is assumed that each f4f file contains only a single segment, and the files must be stored on a local, non-networked filesystem to ensure optimal performance. This makes it particularly suited for environments with high demand for smooth video playback and low latency requirements.

Config Example

location /video/ {
    f4fhds;
}

Ensure that all f4f files contain only a single segment, as this module assumes that.

The files should be stored on a local non-networked filesystem due to the use of mmap().

Using the directive in inappropriate contexts may lead to unexpected behavior.

← Back to all directives