Mercurial > mplayer.hg
comparison DOCS/tech/mpcf.txt @ 12162:ab533510d598
remove old example stream
add startcode values
remove nonsense redownloading goal
author | michael |
---|---|
date | Fri, 09 Apr 2004 18:40:48 +0000 |
parents | 8e4700721c38 |
children | 17667db616d3 |
comparison
equal
deleted
inserted
replaced
12161:8e4700721c38 | 12162:ab533510d598 |
---|---|
21 a usual header for a file is about 100bytes (audio + video headers together) | 21 a usual header for a file is about 100bytes (audio + video headers together) |
22 a packet header is about ~1-8 bytes | 22 a packet header is about ~1-8 bytes |
23 Error resistant | 23 Error resistant |
24 seeking / playback without an index | 24 seeking / playback without an index |
25 headers & index can be repeated | 25 headers & index can be repeated |
26 checksums to allow quick redownloading of damaged parts | |
27 damaged files can be played back with minimal data lost and fast | 26 damaged files can be played back with minimal data lost and fast |
28 resyncing times | 27 resyncing times |
29 | 28 |
30 | 29 |
31 | 30 |
226 size3 | 225 size3 |
227 frame3 | 226 frame3 |
228 | 227 |
229 | 228 |
230 *_startcode | 229 *_startcode |
231 the first bit is allways set | 230 all startcodes start with 'N' |
231 | |
232 main_startcode | |
233 0x7A561F5F04ADULL + (((uint64_t)('N'<<8) + 'M')<<48) | |
234 stream_starcode | |
235 0x11405BF2F9DBULL + (((uint64_t)('N'<<8) + 'S')<<48) | |
236 frame_type2_startcode | |
237 0xE4ADEECA4569ULL + (((uint64_t)('N'<<8) + 'K')<<48) | |
238 index_startcode | |
239 0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48) | |
240 info_startcode | |
241 0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48) | |
232 | 242 |
233 version | 243 version |
234 1 for now | 244 1 for now |
235 | 245 |
236 stream_id | 246 stream_id |
506 | 516 |
507 info packets, SHOULD be placed at the begin of the file at least | 517 info packets, SHOULD be placed at the begin of the file at least |
508 for realtime streaming info packets will normally be transmitted when they apply | 518 for realtime streaming info packets will normally be transmitted when they apply |
509 for example, the current song title & artist of the currently shown music video | 519 for example, the current song title & artist of the currently shown music video |
510 | 520 |
511 Stuffing packets | |
512 can be used as a filler, for example to leave some empty space at the begin for | |
513 a copy of the index | |
514 | |
515 Unknown packets | 521 Unknown packets |
516 MUST be ignored by the decoder | 522 MUST be ignored by the decoder |
517 | 523 |
518 Sample code (GPL, & untested) | 524 Sample code (GPL, & untested) |
519 | 525 |
576 } | 582 } |
577 *(bc->buf_ptr++)= val&0x7F; | 583 *(bc->buf_ptr++)= val&0x7F; |
578 | 584 |
579 return 0; | 585 return 0; |
580 } | 586 } |
581 | |
582 | |
583 Example stream | |
584 | |
585 main header | |
586 video_stream_header (stream 0, video jpjp, timebase 30, lsb_timestamp_length=8) | |
587 video_stream_header (stream 1 subtitle usen, timebase 30, lsb_timestamp_length=8) | |
588 video_stream_header (stream 2 subtitle atde, timebase 30, lsb_timestamp_length=8) | |
589 audio_stream_header (stream 3, audio jpjp, timebase 1 , lsb_timestamp_length=8) | |
590 audio_stream_header (stream 4, audio usen, timebase 1 , lsb_timestamp_length=8) | |
591 index (stream 0) | |
592 keyframe (stream 0, msb_timestamp=0, lsb_timestamp=0) | |
593 keyframe (stream 1, msb_timestamp=0, lsb_timestamp=0) | |
594 keyframe (stream 2, msb_timestamp=0, lsb_timestamp=0) | |
595 keyframe (stream 3, msb_timestamp=0, lsb_timestamp=0) | |
596 keyframe (stream 4, msb_timestamp=0, lsb_timestamp=0) | |
597 frame (stream 0, lsb_timestamp=1) | |
598 frame (stream 0, lsb_timestamp=2) | |
599 ... | |
600 frame (stream 0, lsb_timestamp=30) | |
601 keyframe (stream 3, msb_timestamp=0, lsb_timestamp=1) | |
602 keyframe (stream 4, msb_timestamp=0, lsb_timestamp=1) | |
603 frame (stream 0, lsb_timestamp=31) | |
604 frame (stream 0, lsb_timestamp=32) | |
605 ... | |
606 frame (stream 0, lsb_timestamp=60) | |
607 frame (stream 1, lsb_timestamp=60) | |
608 frame (stream 2, lsb_timestamp=60) | |
609 keyframe (stream 3, msb_timestamp=0, lsb_timestamp=2) | |
610 keyframe (stream 4, msb_timestamp=0, lsb_timestamp=2) | |
611 frame (stream 0, lsb_timestamp=61) | |
612 frame (stream 0, lsb_timestamp=62) | |
613 ... | |
614 main header | |
615 video_stream_header (stream 0, video jpjp, timebase 30, lsb_timestamp_length=8) | |
616 video_stream_header (stream 1 subtitle usen, timebase 30, lsb_timestamp_length=8) | |
617 video_stream_header (stream 2 subtitle atde, timebase 30, lsb_timestamp_length=8) | |
618 audio_stream_header (stream 3, audio jpjp, timebase 1 , lsb_timestamp_length=8) | |
619 audio_stream_header (stream 4, audio usen, timebase 1 , lsb_timestamp_length=8) | |
620 frame (stream 0, lsb_timestamp=255) | |
621 frame (stream 0, msb_timestamp=1 lsb_timestamp=0) | |
622 frame (stream 0, lsb_timestamp=1) | |
623 frame (stream 0, lsb_timestamp=2) | |
624 frame (stream 1, msb_timestamp=1 lsb_timestamp=2) | |
625 frame (stream 2, msb_timestamp=1 lsb_timestamp=2) | |
626 frame (stream 0, lsb_timestamp=3) | |
627 frame (stream 0, lsb_timestamp=4) | |
628 ... | |
629 keyframe (stream 3, msb_timestamp=0, lsb_timestamp=9) | |
630 keyframe (stream 4, msb_timestamp=0, lsb_timestamp=9) | |
631 main header | |
632 video_stream_header (stream 0, video jpjp, timebase 30, lsb_timestamp_length=8) | |
633 video_stream_header (stream 1 subtitle usen, timebase 30, lsb_timestamp_length=8) | |
634 video_stream_header (stream 2 subtitle atde, timebase 30, lsb_timestamp_length=8) | |
635 audio_stream_header (stream 3, audio jpjp, timebase 1 , lsb_timestamp_length=8) | |
636 audio_stream_header (stream 4, audio usen, timebase 1 , lsb_timestamp_length=8) | |
637 index (stream 0) | |
638 | 587 |
639 Authors | 588 Authors |
640 | 589 |
641 Folks from MPlayer Developers Mailinglist (http://www.mplayehrq.hu/). | 590 Folks from MPlayer Developers Mailinglist (http://www.mplayehrq.hu/). |
642 Authors in ABC-order: (FIXME! Tell us if we left you out) | 591 Authors in ABC-order: (FIXME! Tell us if we left you out) |