RP-NDI-ID3_2021_09
proposal for carriage of ID3v2 information in NDI metadata
This page contains a technical proposal which is not currently a published or formal standard. If you have comments or feedback on the content of this proposal PLEASE contact us with your contribution.
This proposal defines a standardised wrapper to carry decoded ID3 real time metadata over NDI by way of a recommended practice technical note.
Basic Premise:
This recommended practice provides a mechanism for an MPEGTS decoder to extract ID3 data from a stream and pass this onto an NDI system to action the message. The same format can be embedded into an NDI Stream when passing to a compatible MPEGTS encoder.
In this proposal, the ID3 Data is carried in an ID3 stream within an MPEG Transport Stream. It translates into the real time (non frame based) NDI Metadata stream, with ID3 message data enclosed as <ID3>
The ID3 data specification is available at: https://id3.org/id3v2.3.0
This covers the commonly used global metadata tags you might find in mp3 files. In the case of global metadata it may be repeated periodically so that a media player will find the data, even when a user starts a stream mid way. ID3 also has a PRIV tag which has been used to store much more complex and sub structured metadata in MPEG transport streams carrying things like ad-insertion markers, as an alternative to using the more complicated SCTE35 structures in MPEG transport streams. These types of ID3 are typically 'timed metadata' where the ID3 message is relevant to the point in time when it is inserted. Some streaming encoders can pass through this information or even translate it when streaming MPEG transport streams over HLS. In some cases the data might be translated into lines in the m3u8 manifest, or in others it would remain in place in the transport stream segments to be extracted and processed by the media player.
Messages are wrapped in the outer XML tag <ID3>. Each block can contain a single ID3 section which can contain multiple frames of metadata. The frameData can optionally be passed as Base64 encoded data, to accomodate binary data. frameData must be less than 256kBytes.
NDIlib_metadata_frame_t meta_data
meta_data.p_data =
<ID3>......</ID3>
Example
<ID3>
<version>3.0</version>
<frame>
<frameID>TPE1</frameID>
<frameData encoding="Base64">QmVuZWEgUmVhY2g=</frameData> or <frameData>Benea Reach</frameData>
</frame>
<frame>
<frameID>TYER</frameID>
<frameData>2012</frameData>
</frame>
<frame>
<frameID>PRIV</frameID>
<frameData encoding="Base64">Y29tLmNpc2NvLnN0cmVhbWluZy5TcGxpY2VQb2ludC4w77+9PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPE1hcmtlcj4KCTxNYXJrZXJJRD4weDIwZjIxYzk8L01hcmtlcklEPgoJPFByZXJvbGxITlM+MDwvUHJlcm9sbEhOUz4KCTxTcGxpY2U+CgkJPEV2ZW50SUQ+MzQ1NDYxMjE8L0V2ZW50SUQ+CgkJPEV2ZW50Q2FuY2VsSW5kaWNhdG9yPjA8L0V2ZW50Q2FuY2VsSW5kaWNhdG9yPgoJCTxPdXRPZk5ldHdvcms+MTwvT3V0T2ZOZXR3b3JrPgoJCTxQcm9ncmFtU3BsaWNlPjE8L1Byb2dyYW1TcGxpY2U+CgkJPER1cmF0aW9uPjE8L0R1cmF0aW9uPgoJCTxTcGxpY2VJbW1lZGlhdGU+MTwvU3BsaWNlSW1tZWRpYXRlPgoJCTxUaW1lU3BlY2lmaWVkPjE8L1RpbWVTcGVjaWZpZWQ+CgkJPEF1dG9SZXR1cm4+MTwvQXV0b1JldHVybj4KCTwvU3BsaWNlPgoJPFByb2dyYW0+CgkJPFByb2dyYW1JRD4xPC9Qcm9ncmFtSUQ+CgkJPEF2YWlsTnVtPjA8L0F2YWlsTnVtPgoJCTxBdmFpbEV4cGVjdGVkPjA8L0F2YWlsRXhwZWN0ZWQ+Cgk8L1Byb2dyYW0+Cgk8VGltZT4KCQk8U3BsaWNlVGltZUhOUz40NTI1NDIxNDQ3MjAwMDA8L1NwbGljZVRpbWVITlM+CgkJPFNwbGljZURhdGVUaW1lPjIwMjEtMDgtMjZUMjE6MTI6NDRaPC9TcGxpY2VEYXRlVGltZT4KCQk8RHVyYXRpb25ITlM+MTY1MTAwMDAwMDwvRHVyYXRpb25ITlM+Cgk8L1RpbWU+CjwvTWFya2VyPg==</frameData>
</frame>
</ID3>
The Base64 encoded PRIV frame example above contains splice data:
com.cisco.streaming.SplicePoint.0\0
<?xml version="1.0" encoding="UTF-8"?>
<Marker>
<MarkerID>0x20f21c9</MarkerID>
<PrerollHNS>0</PrerollHNS>`
<Splice>
<EventID>34546121</EventID>
<EventCancelIndicator>0</EventCancelIndicator>
<OutOfNetwork>1</OutOfNetwork>
<ProgramSplice>1</ProgramSplice>
<Duration>1</Duration>
<SpliceImmediate>1</SpliceImmediate>
<TimeSpecified>1</TimeSpecified>
<AutoReturn>1</AutoReturn>
</Splice>
<Program>
<ProgramID>1</ProgramID>
<AvailNum>0</AvailNum>
<AvailExpected>0</AvailExpected>
</Program>
<Time>
<SpliceTimeHNS>452542144720000</SpliceTimeHNS>
<SpliceDateTime>2021-08-26T21:12:44Z</SpliceDateTime>
<DurationHNS>1651000000</DurationHNS>
</Time>
</Marker>
If you have any questions, or you would like to engage Sienna for NDI Consultancy or Custom Development, please contact info @ sienna.tv