Difference between revisions of "NTS File Format"

From hummy.tv Wiki
Jump to: navigation, search
(Created page with "<pre> MPEG2 - 32 byte entries Offset Purpose Value -------------------------------------------------------------------------------------...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
0x03  1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
 
0x03  1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
 
0x04  1 byte SD/HD flag 0x20 = SD.  
 
0x04  1 byte SD/HD flag 0x20 = SD.  
0x05  1 byte Picture sequence frame count 0 to 12 (13 frames) for first count only, then 3 to 14 (12 frames) after that.  
+
0x05  1 byte Picture sequence frame count Starts at 0 for 1st count, then 3 thereafter. Resets on first P-frame after an I-frame.  
 
0x06  2 byte    Offset from Seq. header to first frame. Address of first frame in Sequence minus address of Sequence header.   
 
0x06  2 byte    Offset from Seq. header to first frame. Address of first frame in Sequence minus address of Sequence header.   
 
0x08  8 bytes Picture header address. Address of this frame.
 
0x08  8 bytes Picture header address. Address of this frame.
Line 23: Line 23:
 
0x03  1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
 
0x03  1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
 
0x04  1 byte HD Flag 0x30 = HD.
 
0x04  1 byte HD Flag 0x30 = HD.
0x05  1 byte Picture sequence frame count. Starts at zero for first count only, then starts at 1 after that. Consequently the last 0x08 entry of each count sequence contains the address of first SEI of the next sequence.  
+
0x05  1 byte Picture sequence frame count. Starts at 0 for first count, then 1 thereafter. Resets after I-frame.
 
0x06  2 bytes Offset from PicParamSet to first SEI. Address of first SEI in sequence minus address of last PicParamSet.
 
0x06  2 bytes Offset from PicParamSet to first SEI. Address of first SEI in sequence minus address of last PicParamSet.
 
0x08  8 bytes SEI address. Address of SEI preceding the frame.
 
0x08  8 bytes SEI address. Address of SEI preceding the frame.

Latest revision as of 16:58, 21 June 2018

MPEG2 - 32 byte entries

Offset		Purpose                                      Value
--------------------------------------------------------------------------------------------------------------
0x00  3 bytes	Offset from Seq. header to current frame.	Address of this frame minus address of Sequence header.
0x03  1 byte	Frame Type					0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
0x04  1 byte	SD/HD flag					0x20 = SD. 
0x05  1 byte	Picture sequence frame count			Starts at 0 for 1st count, then 3 thereafter. Resets on first P-frame after an I-frame. 
0x06  2 byte    Offset from Seq. header to first frame.		Address of first frame in Sequence minus address of Sequence header.  
0x08  8 bytes	Picture header address.				Address of this frame.
0x10  4 bytes	Presentation TimeStamp (PTS)			The first 32 bits of PES PTS.
0x14  4 bytes	Frame size.					Address of next frame minus address of this frame. 
0x18  4 bytes	Played Time					Played time in milliseconds.
0x1C  4 bytes	Unused						N/A


H264 - 64 byte entries

Offset		Purpose                                      Value
--------------------------------------------------------------------------------------------------------------
0x00  3 bytes	Offset from PicParamSet to current SEI.		Address of SEI preceding current frame minus address of last PicParamSet.
0x03  1 byte	Frame Type					0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame.
0x04  1 byte	HD Flag						0x30 = HD.
0x05  1 byte	Picture sequence frame count.			Starts at 0 for first count, then 1 thereafter. Resets after I-frame.
0x06  2 bytes	Offset from PicParamSet to first SEI.		Address of first SEI in sequence minus address of last PicParamSet.
0x08  8 bytes	SEI address.					Address of SEI preceding the frame.
0x10  4 bytes	Presentation TimeStamp (PTS)			The first 32 bits of PES PTS.
0x14  4 bytes	Frame size.					Address of the AUD immediately after frame minus address of SEI preceding the frame. 
0x18  4 bytes	Played Time.					Played time in milliseconds for timebar display.
0x1C  4 bytes	Unused						N/A
0x20  4 bytes	HeaderEndSize					Address of SEI minus address of last SeqParamSet
0x24  4 bytes	ExtDistance					Address of last PicParamSet minus address of last SeqParamSet 
0x28 24 bytes	Unused						N/A


All values are in reverse byte order (little endian)

File analysis by raydon