Skip to content

Feature Request: Support custom fields in RTMP onMetaData #2145

Description

@Jerry-Ljie

Hi, thanks for maintaining RootEncoder.

We are using the RTMP module and noticed that the library already sends the standard @setDataFrame/onMetaData message when publishing starts.

For some RTMP ingest/analytics workflows, it would be useful to add custom fields to the onMetaData object, such as an encoder string.

Currently, RtmpClient exposes setCustomAmfObject(), but that appears to add fields to the RTMP connect command object, not to the stream-level onMetaData message.

Would it be possible to expose an API to add custom onMetaData fields, for example:

rtmpClient.setCustomMetadata(customMetadata)

or a similar method on RtmpStreamClient?

Expected behavior:

  • Keep the existing standard metadata fields unchanged
  • Append the custom fields to the @setDataFrame/onMetaData AMF object
  • Send them whenever the library sends onMetaData, including the initial publish and full reconnects
  • Logic should be consistent across both AMF0​ and AMF3

Thank you again for all the work you put into the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions