# HG changeset patch # User michael # Date 1105530870 0 # Node ID 6cdd5669e930d4e5ae7c70653c2910033ec2850a # Parent 0db5d481d31b82f5acb55f2990712c00152d268f Here is an updated draft with the bits discussed previously merged: - short startcode removed - QT/Microsoft codec_specific_data removed, reverted to a neutral format - meta packet removed, merged in the info packet. - stream class simplified, added metadata stream patch by (Luca Barbato ) diff -r 0db5d481d31b -r 6cdd5669e930 DOCS/tech/mpcf.txt --- a/DOCS/tech/mpcf.txt Wed Jan 12 10:03:23 2005 +0000 +++ b/DOCS/tech/mpcf.txt Wed Jan 12 11:54:30 2005 +0000 @@ -1,4 +1,4 @@ - NUT Open Container Format DRAFT 20040911 + NUT Open Container Format DRAFT 20050111 ---------------------------------------- @@ -89,10 +89,9 @@ version v stream_count v max_distance v - max_short_distance v + max_index_distance v global_time_base_nom v global_time_base_denom v - short_startcode v for(i=0; i<256; ){ tmp_flag v tmp_fields v @@ -133,11 +132,7 @@ decode_delay v fixed_fps u(1) reserved u(6) - for(;;){ - codec_specific_data_type v - if(codec_specific_data_type==0) break; - codec_specific_data vb - } + codec_specific_data vb video_stream_header: stream_header @@ -176,6 +171,7 @@ Index: index_startcode f(64) packet header + stream_id v index_length v for(i=0; i 0 stream_id MUST be < stream_count stream_class 0 video - 32 audio - 64 subtiles + 1 audio + 2 subtiles + 3 metadata Note the remaining values are reserved and MUST NOT be used a demuxer MUST ignore streams with reserved classes @@ -325,13 +289,6 @@ example: "H264" MUST contain 2 or 4 bytes, note, this might be increased in the future if needed - -language_code - ISO 639 and ISO 3166 for language/country code - something like "usen" (US english), can be 0 - if unknown - see http://www.loc.gov/standards/iso639-2/englangn.html - and http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html time_base_nom / time_base_denom = time_base the number of timer ticks per second, this MUST be equal to the fps @@ -382,16 +339,6 @@ fixed_fps 1 indicates that the fps is fixed -codec_specific_data_type - 0 none/end - 1 native - 2 bitmapinfoheader - 3 waveformatex - 4 imagedesc - 5 sounddesc - "native", means a simple api & container independent storage form, - for example some mpeg4-es headers - codec_specific_data private global data for a codec (could be huffman tables or ...) @@ -487,11 +434,15 @@ adler32 checksum index_timestamp - value of the timetamp in a sync point relative to the last sync-point + value of the timetamp of a keyframe relative to the last keyframe + stored in this index index_position - position in bytes of the first byte of a sync-point, relative to the - last sync_point + position in bytes of the first byte of a keyframe, relative to the + last keyframe stored in this index + there MUST be no keyframe with the same stream_id as this index between + 2 consecutive index entries if they are more then max_index_distance + appart id the id of the type/name pair, so its more compact @@ -504,6 +455,7 @@ info packet types the name of the info entry, valid names are + "StreamId" the stream(s) to which the info packet applies "Author" "Description" @@ -520,10 +472,11 @@ Note: dont forget the timezone "Keywords" "TotalTime" total length of the stream in msecs - -meta packet types - "ReplayGain" - "Language" the language code + "Language" ISO 639 and ISO 3166 for language/country code + something like "eng" (US english), can be 0 if unknown + and "multi" if several languages + see http://www.loc.gov/standards/iso639-2/englangn.html + and http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.htmlthe language code "Disposition" "original", "dub" (translated), "comment", "lyrics", "karaoke" Note: if someone needs some others, please tell us about them, so we can add them to the official standard (if they are sane) @@ -543,25 +496,17 @@ {NULL , "UTF8"}, {NULL , "v"}, {NULL , "s"}, + {"StreamId" , "v"}, {"Author" , "UTF8"}, {"Titel" , "UTF8"}, + {"Language" , "UTF8"}, {"Description" , "UTF8"}, {"Copyright" , "UTF8"}, {"Encoder" , "UTF8"}, {"Keyword" , "UTF8"}, {"Cover" , "JPEG"}, {"Cover" , "PNG"}, -}; - -meta_table[][2]={ - {NULL , NULL }, // end - {NULL , NULL }, - {NULL , "UTF8"}, - {NULL , "v"}, - {NULL , "s"}, - {"Language" , to be decided}, - {"Disposition" , to be decided}, - {"ReplayGain" , to be decided}, + {"Disposition" , "UTF8"}, }; Structure: @@ -596,7 +541,7 @@ Info packets the info_packet can be repeated, it can also contain different names & values -each time but only if allso the time is different +each time but only if also the time is different Info packets can be used to describe the file or some part of it (chapters) info packets, SHOULD be placed at the begin of the file at least