mirror of https://github.com/mpv-player/mpv
cosmetic reformatting: tabs --> spaces, prettyprinting, trailing whitespace
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16687 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4fe19377b1
commit
f9ba1d8575
|
@ -11,15 +11,18 @@ Features / goals:
|
||||||
Simple
|
Simple
|
||||||
use the same encoding for nearly all fields
|
use the same encoding for nearly all fields
|
||||||
simple decoding, so slow CPUs (and embedded systems) can handle it
|
simple decoding, so slow CPUs (and embedded systems) can handle it
|
||||||
|
|
||||||
Extendible
|
Extendible
|
||||||
no limit for the possible values of all fields (using universal vlc)
|
no limit for the possible values of all fields (using universal vlc)
|
||||||
allow adding of new headers in the future
|
allow adding of new headers in the future
|
||||||
allow adding more fields at the end of headers
|
allow adding more fields at the end of headers
|
||||||
|
|
||||||
Compact
|
Compact
|
||||||
~0.2% overhead, for normal bitrates
|
~0.2% overhead, for normal bitrates
|
||||||
index is <10kb per hour (1 keyframe every 3sec)
|
index is <10kb per hour (1 keyframe every 3sec)
|
||||||
a usual header for a file is about 100 bytes (audio + video headers together)
|
a usual header for a file is about 100 bytes (audio + video headers together)
|
||||||
a packet header is about ~1-8 bytes
|
a packet header is about ~1-8 bytes
|
||||||
|
|
||||||
Error resistant
|
Error resistant
|
||||||
seeking / playback without an index
|
seeking / playback without an index
|
||||||
headers & index can be repeated
|
headers & index can be repeated
|
||||||
|
@ -108,8 +111,8 @@ reserved_bytes:
|
||||||
reserved u(8)
|
reserved u(8)
|
||||||
[a demuxer MUST ignore any reserved bytes
|
[a demuxer MUST ignore any reserved bytes
|
||||||
a muxer MUST NOT write any reserved bytes, as this would make it
|
a muxer MUST NOT write any reserved bytes, as this would make it
|
||||||
impossible to add new fields at the end of packets in the future in
|
impossible to add new fields at the end of packets in the future
|
||||||
a compatible way]
|
in a compatible way]
|
||||||
|
|
||||||
Headers:
|
Headers:
|
||||||
|
|
||||||
|
@ -309,6 +312,7 @@ frame_startcode
|
||||||
|
|
||||||
index_startcode
|
index_startcode
|
||||||
0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48)
|
0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48)
|
||||||
|
|
||||||
info_startcode
|
info_startcode
|
||||||
0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48)
|
0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48)
|
||||||
|
|
||||||
|
@ -375,11 +379,11 @@ global_timestamp
|
||||||
when a global_timestamp is encountered the last_pts of all
|
when a global_timestamp is encountered the last_pts of all
|
||||||
streams is set to the following:
|
streams is set to the following:
|
||||||
|
|
||||||
ln= global_time_base_nom*time_base_denom
|
ln = global_time_base_nom*time_base_denom
|
||||||
sn= global_timestamp
|
sn = global_timestamp
|
||||||
d1= global_time_base_denom
|
d1 = global_time_base_denom
|
||||||
d2= time_base_nom
|
d2 = time_base_nom
|
||||||
last_pts= (ln/d1*sn + ln%d1*sn/d1)/d2
|
last_pts = (ln/d1*sn + ln%d1*sn/d1)/d2
|
||||||
Note: this calculation MUST be done with unsigned 64 bit integers, and
|
Note: this calculation MUST be done with unsigned 64 bit integers, and
|
||||||
is equivalent to (ln*sn)/(d1*d2) but this would require a 96bit integer
|
is equivalent to (ln*sn)/(d1*d2) but this would require a 96bit integer
|
||||||
|
|
||||||
|
@ -408,8 +412,8 @@ flags[frame_code]
|
||||||
first of the flags from MSB to LSB are called KD
|
first of the flags from MSB to LSB are called KD
|
||||||
if D is 1 then data_size_msb is coded, otherwise data_size_msb is 0
|
if D is 1 then data_size_msb is coded, otherwise data_size_msb is 0
|
||||||
K is the keyframe_type
|
K is the keyframe_type
|
||||||
0-> no keyframe,
|
0 -> no keyframe,
|
||||||
1-> keyframe,
|
1 -> keyframe,
|
||||||
flags=4 can be used to mark illegal frame_code bytes
|
flags=4 can be used to mark illegal frame_code bytes
|
||||||
frame_code=78 must have flags=4
|
frame_code=78 must have flags=4
|
||||||
Note: frames MUST NOT depend(1) upon frames prior to the last
|
Note: frames MUST NOT depend(1) upon frames prior to the last
|
||||||
|
@ -438,8 +442,8 @@ coded_pts
|
||||||
pts, otherwise it is a full pts + (1<<msb_pts_shift)
|
pts, otherwise it is a full pts + (1<<msb_pts_shift)
|
||||||
lsb pts is converted to a full pts by:
|
lsb pts is converted to a full pts by:
|
||||||
mask = (1<<msb_pts_shift)-1;
|
mask = (1<<msb_pts_shift)-1;
|
||||||
delta= last_pts - mask/2
|
delta = last_pts - mask/2
|
||||||
pts= ((pts_lsb-delta)&mask) + delta
|
pts = ((pts_lsb-delta)&mask) + delta
|
||||||
|
|
||||||
lsb_pts
|
lsb_pts
|
||||||
least significant bits of the pts in time_base precision
|
least significant bits of the pts in time_base precision
|
||||||
|
@ -450,7 +454,7 @@ lsb_pts
|
||||||
frame lsb_pts=2 -> pts=2
|
frame lsb_pts=2 -> pts=2
|
||||||
...
|
...
|
||||||
keyframe msb_pts=257 -> pts=257
|
keyframe msb_pts=257 -> pts=257
|
||||||
frame lsb_pts=255->pts=255
|
frame lsb_pts=255 -> pts=255
|
||||||
frame lsb_pts=0 -> pts=256
|
frame lsb_pts=0 -> pts=256
|
||||||
frame lsb_pts=4 -> pts=260
|
frame lsb_pts=4 -> pts=260
|
||||||
frame lsb_pts=2 -> pts=258
|
frame lsb_pts=2 -> pts=258
|
||||||
|
@ -520,31 +524,39 @@ type
|
||||||
|
|
||||||
info packet types
|
info packet types
|
||||||
the name of the info entry, valid names are
|
the name of the info entry, valid names are
|
||||||
"StreamId" the stream(s) to which the info packet applies
|
"StreamId"
|
||||||
|
the stream(s) to which the info packet applies
|
||||||
"Author"
|
"Author"
|
||||||
"Description"
|
"Description"
|
||||||
"Copyright"
|
"Copyright"
|
||||||
"Encoder" the name & version of the software used for encoding
|
"Encoder"
|
||||||
|
the name & version of the software used for encoding
|
||||||
"Title"
|
"Title"
|
||||||
"Cover" an image of the (CD, DVD, VHS, ..) cover (preferably PNG or JPEG)
|
"Cover"
|
||||||
"Source" "DVD", "VCD", "CD", "MD", "FM radio", "VHS", "TV",
|
image of the (CD, DVD, VHS, ..) cover (preferably PNG or JPEG)
|
||||||
"LD"
|
"Source"
|
||||||
|
"DVD", "VCD", "CD", "MD", "FM radio", "VHS", "TV", "LD"
|
||||||
Optional: appended PAL, NTSC, SECAM, ... in parentheses
|
Optional: appended PAL, NTSC, SECAM, ... in parentheses
|
||||||
"CaptureDevice" "BT878", "BT848", "webcam", ... (more exact names are fine too)
|
"CaptureDevice"
|
||||||
"CreationTime" "2003-01-20 20:13:15Z", ...
|
"BT878", "BT848", "webcam", ... (more exact names are fine too)
|
||||||
|
"CreationTime"
|
||||||
|
"2003-01-20 20:13:15Z", ...
|
||||||
(ISO 8601 format, see http://www.cl.cam.ac.uk/~mgk25/iso-time.html)
|
(ISO 8601 format, see http://www.cl.cam.ac.uk/~mgk25/iso-time.html)
|
||||||
Note: do not forget the timezone
|
Note: do not forget the timezone
|
||||||
"Keywords"
|
"Keywords"
|
||||||
"TotalTime" total length of the stream in msecs
|
"TotalTime"
|
||||||
"Language" ISO 639 and ISO 3166 for language/country code
|
total length of the stream in msecs
|
||||||
|
"Language"
|
||||||
|
ISO 639 and ISO 3166 for language/country code
|
||||||
something like "eng" (US english), can be 0 if unknown
|
something like "eng" (US english), can be 0 if unknown
|
||||||
and "multi" if several languages
|
and "multi" if several languages
|
||||||
see http://www.loc.gov/standards/iso639-2/englangn.html
|
see http://www.loc.gov/standards/iso639-2/englangn.html
|
||||||
and http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html the language code
|
and http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html
|
||||||
"Disposition" "original", "dub" (translated), "comment", "lyrics", "karaoke"
|
the language code
|
||||||
Note: if someone needs some others, please tell us about them, so we can
|
"Disposition"
|
||||||
add them to the official standard (if they are sane)
|
"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)
|
||||||
Note: nonstandard fields should be prefixed by "X-"
|
Note: nonstandard fields should be prefixed by "X-"
|
||||||
Note: MUST be less than 64 bytes long
|
Note: MUST be less than 64 bytes long
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue