Open BtbN opened 6 months ago
the "General Guidelines" section of the Multitrack section says
While this document doesn't prescribe specific encoding rules or manifest metadata, it aims to guide you through the complexities of leveraging multitrack features.
this suggests that things like language mappings for audio tracks and angle/bitrate/whatever mappings for video tracks might go in a separate "manifest" or other metadata.
onMetaData
doesn't seem to account for multitrack yet. an enhanced onMetaData
message that accounts for multiple tracks might also be a good place to describe what all the tracks in the stream are for.
also to draw attention to this important paragraph in the Multitrack section:
It's important to note that multitrack support is designed to augment, not replace, the option of using multiple streams for streaming. While both multiple streams and multitrack can potentially address the same use cases, the choice between them will depend on the specific capabilities of your RTMP implementation and requirements. In certain cases, multitrack may not be the most efficient option.
it has always been possible to send multiple tracks simultaneously using multiple streams in the same RTMP connection. also note that stream names can be more interesting than just letters and numbers. a stream name could itself look like a path name
BigBuckBunny/audio/en-us
or have "query parameters"
BigBuckBunny?type=audio&lang=en-us
the meaning of stream names, including things that look like path parts or query parameters, is entirely the prerogative of the server/service, and might even have different meanings depending on whether you're publishing or playing (just like track IDs). for example, my tcserver
uses stream name query parameters to adjust the real-time transmission treatments of stream messages for play
, and the preemption precedence for publish
.
note that we now support onMetadata
for multiple tracks https://github.com/veovera/enhanced-rtmp/issues/37
While the spec does talk a bit about the ordering being used to identify the language of an audio stream, I do think that some way to tag an audio stream with a language would be beneficial. Adding three bytes for an ISO country code or something somewhere would be super nice and might prevent potential vendor-specific order-magic.