[MPlayer-dev-eng] NUT, what's left

Michael Niedermayer michaelni at gmx.at
Sat Sep 17 10:06:20 CEST 2005


Hi

On Sat, Sep 17, 2005 at 09:09:15AM +0300, Oded Shimon wrote:
> Well, as most of you probably know I've been working on my own 
> implementation for NUT for the last few weeks.
> 
> Well, it umm, works, but it's obviously not as good as it can be.
> First of all, I'd like to address what's left regarding the spec, when you 
> guys finally friggin finalize the spec, I can make a release.
> 
> 1. backwards pointers in syncpoints

see attached patch


> 2. DTS method (MN rule or MTS?)

not sure, this needs some more thought, but i dont have time now for that now


> 3. info packets... how should they be used at all

see attached patch


> 4. subtitles, i want a more strict definition for them.. (they require info 
>    packet?)
> 5. what should max_index_distance be, Rich says 32k is too small and should 
>    be 512k.

i dont see why, so i disagree


> 6. possibly remove the "GPL" code in there as that seems to scare some very 
>    weird people (or just make it public domain).

do we care about these people ;) well i wont object changing the 10 line
example in there to public domain if everyone thinks its a good idea


> 7. Zero byte frames in the end.

i dont care


> 8. Anything else?

probably :)

[...]
-- 
Michael
-------------- next part --------------
Index: mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.75
diff -u -r1.75 mpcf.txt
--- mpcf.txt	17 Sep 2005 05:46:20 -0000	1.75
+++ mpcf.txt	17 Sep 2005 07:54:08 -0000
@@ -216,9 +216,7 @@
 	reserved_bytes
 	checksum				u(32)
 
-info_packet: (optional)
-	info_startcode				f(64)
-	packet header
+info_frame: (optional)
 	for(;;){
 		id				v
 		if(id==0) break
@@ -238,7 +236,8 @@
         
 sync_point:
 	frame_startcode				f(64)
-		global_timestamp		v
+	global_timestamp			v
+	back_ptr				v
 
 			Complete definition:
 
@@ -255,13 +254,11 @@
 				other_stream_header
 		}
 		while(next_code != main_startcode){
+			if(next_code == frame_startcode)
+				sync_point
 			if(next_code == info_startcode)
-				info_packet
-			else{
-				if(next_code == frame_startcode)
-					sync_point
-				frame
-			}
+				info_startcode	f(64)
+			frame
 		}
 	}
 	if (next_code == index_startcode){
@@ -278,6 +275,10 @@
 	size of the packet data (exactly the distance from the first byte
 	after the forward_ptr to the first byte of the next packet)
 
+back_ptr
+	pointer to the latest frame, for which there is at least one
+	keyframe prior to the global_timestamp in every stream
+
 file_id_string
 	"nut/multimedia container\0"
 
@@ -331,6 +332,8 @@
 	1	audio
 	2	subtiles
 	3	metadata
+	4	userdata
+	in metadata streams each frame contains exactly one info frame
 	Note: the remaining values are reserved and MUST NOT be used
 	     a demuxer MUST ignore streams with reserved classes
 
@@ -450,7 +453,7 @@
 	stream, into which the current pts is inserted and the element with
 	the smallest value is removed, this is then the current dts
 	this buffer is initalized with decode_delay -1 elements
-	all frames with dts == timestamp must be monotone, that means a frame
+	all frames except repeated frames must be monotone, that means a frame
 	which occurs later in the stream must have a larger or equal dts
 	than an earlier frame
 
@@ -580,22 +583,20 @@
 the index or at the file end if there is no index
 headers MUST be repeated at least twice (so they exist three times in a file)
 
-info packets which describe the whole file or individual streams/tracks MUST be
-placed before any video/audio/... frames
+info frames which describe the whole file or individual streams/tracks MUST be
+placed at least immedeatly after each repeadted set of the stream headers and
+before the following video/audio/userdata/... frames. Such info frames must be
+like the main and stream headers always identical
 
 		Index
 Note: with realtime streaming, there is no end, so no index there either
 An index SHOULD be written for every stream. Indices MUST be placed at end
 of file. Indices MAY be repeated for a stream.
 
-		Info packets
-the info_packet can be repeated, and can also contain different names & values
-each time, but only if 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 start of the file at least for realtime
-streaming info packets will normally be transmitted when they apply for
-example, the current song title & artist of the currently shown music video
+		Info frames
+a info frame can be repeated, but must then be exactly identical
+Note, such repeated frames can be detected by their pts difference of 0
+Info frames can be used to describe the file or some part of it (chapters)
 
 		Unknown packets
 MUST be ignored by the demuxer


More information about the MPlayer-dev-eng mailing list