meta

The 'meta' directive in the NGINX RTMP module enables adding metadata to the multimedia streams.

Syntaxmeta string;
Defaultnone
Context
Arguments1

Description

The 'meta' directive is designed to facilitate the inclusion of metadata in RTMP multimedia streams served by the NGINX RTMP module. When this directive is used, it can specify various attributes and descriptive information about the stream or content being published, enhancing the stream with additional context that can be utilized by clients consuming the data. This can be particularly useful for indexing media content or for clients that need to understand the content better, such as media players that display metadata to end-users.

To implement this directive, you would typically provide a single argument, which is a string representing the type of metadata or the specific information you wish to attach to the stream. This metadata can include information such as title, artist, album, description, and more, depending on the requirements of the streaming application and the capabilities of the clients receiving the stream. The directive can be placed within specific application blocks to apply to particular streams, allowing fine-grained control over what metadata is shared.

It's essential to note that the effective use of metadata within RTMP streams requires that clients also appropriately handle and display this metadata. Some clients may not support all metadata types, so testing across various platforms is advisable to ensure compatibility and functionality of the added metadata.

Config Example

application live {
    meta "title=My Stream";
    meta "artist=John Doe";
}

Ensure the metadata string is properly formatted as clients may have strict parsing rules.

Not all RTMP clients may support metadata display, so test across different clients to verify compatibility.

← Back to all directives