[NUT-devel] r21189 - trunk/DOCS/tech/nut.txt
Ralph Giles
giles at xiph.org
Sat Nov 25 00:49:25 CET 2006
On Fri, Nov 24, 2006 at 11:35:24PM +0100, Michael Niedermayer wrote:
> hmm, i see 3 possibilities for xiph codecs
> 1. store the metadata packet as is
> 2. dont store the metadata packet
> 3. store a dummy (empty) metadata packet
I would vote for 1 or 3.
I disagreed with doing 2 in the RTP draft, but didn't insist because the
payload implementation already has to be codec-specific. For general
container use like this, I think it's important to require the metadata
packet where the codec requires it. This is less surprising for
implementors.
You do still have to know how the vorbis headers are packed, but for
playback there is still a difference between these two procedures:
# option 1 or 3
for header in global_headers:
submit_packet_to_codec(header);
# option 2
header_number = 0;
for header in global_headers:
submit_packet_to_codec(header)
header_number += 1
if (header_number == 1):
header = construct_dummy_metadata_packet()
submit_packet_to_codec(header)
I'd rather have to write the first one.
This imposes an overhead of (8 bytes + one packet overhead) on any
header blob, assuming a minimal vorbis-style comment packet. I would
leave the encoder id string in the packet, so
Therefore I'd propose, "The global headers MUST consist of the normal
sequence of header packets required for codec initialization, in the
order expected by the codec. An implementation MAY strip metadata and
other redundant information not necessary for correct playback from the
global headers to save space in the bitstream."
-r
More information about the NUT-devel
mailing list