📄 report.html
字号:
an RTP payload. <br>
2. An MPEG GOP_header, when present, will always be at the
beginning of the RTP payload, <br>
or will follow a Video_Sequence_Header. <br>
3. An MPEG Picture_Header, when present, will always be at the
beginning of a RTP payload, <br>
or will follow a GOP_header.<br>
Also each ES header must be completely contained withing the
packet. Also, the beginning <br>
of a slice must either be the first data in a packet (after any
MPEG ES headers) or must follow <br>
after some integral number of slices in a packet.<br>
</font></p>
<p><font face="Trebuchet MS">For the MPEG ES encapsulation The
RTP fixed header fields are used as follows as <br>
described in [2]: </font></p>
<table border="0">
<tr>
<td><font face="Trebuchet MS">Payload Type:</font></td>
<td><font face="Trebuchet MS">MPV designates the use
MPEG-I and MPEG-II video encoding elementary[5]. <br>
This value is assigned 32 for video elementary stream.</font></td>
</tr>
<tr>
<td><font face="Trebuchet MS">M:</font></td>
<td><font face="Trebuchet MS">For video, set to 1 on
packet containing MPEG frame end code, 0 <br>
otherwise.</font></td>
</tr>
<tr>
<td><font face="Trebuchet MS">PT: </font></td>
<td><font face="Trebuchet MS">Stream ID of video
elementary stream is assigned.</font></td>
</tr>
<tr>
<td><font face="Trebuchet MS">Timestamp:</font></td>
<td><font face="Trebuchet MS">32-bit 90K Hz timestamp
representing presentation time of MPEG picture.<br>
Same for all packets that make up a picture. May not be
monotonically <br>
increasing in video stream if B pictures present in
stream. For packets <br>
that contain only a video sequence and/or GOP header, the
timestamp is <br>
that of the subsequent picture. Timestamp is increased by
29700 for one<br>
picture for a MPEG elementary stream that contains 30
frame per second <br>
frame rate. 90000*0.33 = 29700. Since the actual frame
rate is 29.7 frame <br>
per second, timestamp adjustment algorithm should be
intergrated to give <br>
more acurate time reference to decoder device.</font></td>
</tr>
</table>
<p><font face="Trebuchet MS">- MPEG Video-specific header</font></p>
<p><font face="Trebuchet MS">For MPEG video, the following header
is attached to each RTP packet after the RTP fixed<br>
header.</font></p>
<p> </p>
<pre>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MBZ |T| TR | |N|S|B|E| P | | BFC | | FFC |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
AN FBV FFV
</pre>
<pre><font size="4" face="Trebuchet MS">Each field in this header is exactracted from the fields of the most recent header like
sequence or picture header. Also, this header indicates the presence of new sequence
header and the beginning or the end of each slice.
S bit indicates the presence of new sequence header. TR and P field indicates picture
information like temporal reference and picture type(frame type). FBV, BFC, FFV and FFC
fields give the motion compensation vector for the B or F type picture. B and E filed
indicate the beginnig and ending of each slice. This field can be used by receiver for
determining the boundary of error.</font></pre>
<pre><font face="Trebuchet MS">-</font><font size="3"
face="Trebuchet MS"> </font><font size="4" face="Trebuchet MS">MPEG-2 Video-specific header extension</font></pre>
<pre><font size="4" face="Trebuchet MS">For MPEG video elementary stream, this header follows the MPEG video-specific header
extension described above. This header may not be vital in decoding of a picture, so the
inclusion of this extension is optional. If it presents, they should be copied from the
corresponding extensions following the most recent MPEG-2 picture coding extension and
they remain constant for each RTP packet of a given picture.</font></pre>
<pre>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|X|E|f_[0,0]|f_[0,1]|f_[1,0]|f_[1,1]| DC| PS|T|P|C|Q|V|A|R|H|G|D|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</pre>
<p><font face="Trebuchet MS">These values are copied directly
from the extension header field, and the meanings of them <br>
are explained in MPEG2 standard.<br>
</font></p>
<p><a name="module"><font size="4" face="Trebuchet MS">Software
Design and Modules Built</font></a></p>
<p><font face="Trebuchet MS">To implement the functions described
above, it was necessary to create three <br>
software modules. The first reads MPEG video from a file. The
second prepares MPEG <br>
video frames for transmission on the Internet by packaging them
into RTP packets, <br>
fragmenting them if necessary. Third part uses the second part
and broadcasts the RTP <br>
packets onto Internet. </font></p>
<p><font size="3" face="Trebuchet MS"><strong>- FileStream</strong></font></p>
<p><font face="Trebuchet MS">This module reads raw MPEG video
files. These files, which usually use the designation<br>
.mv2, contain a single MPEG video elementary stream. The files
are legal MPEG2 video <br>
elementary stream that contain all header. Files of this type are
readily available on the <br>
Internet (for example at the </font><a
href="http://www.iuma.com/"><font face="Trebuchet MS">Internet
Underground Music Archive</font></a><font face="Trebuchet MS">).</font></p>
<p><font face="Trebuchet MS">The fileStream object, when
configured with a filename, opens the file and loads the chunk <br>
of data. It provides bit manipulation routines for the upper
layer - elementaryStream object</font><font size="3"
face="Trebuchet MS"><strong>.<br>
</strong></font></p>
<p><font size="3" face="Trebuchet MS"><strong>- elementaryStream </strong></font></p>
<p><font face="Trebuchet MS">elementaryStream object abstracts
the structure of elementary stream. It uses the the <br>
bit-manipulation services provided FileStream to parse elementary
stream structure. Basic<br>
elementary stream structure like the following:</font></p>
<pre>
----------------------------------------------------------------
| sequence | gop | picture | extension header | slices...
-----------------------------------------------------------------
sequence: sequence header
gop : group of picture header
picture : picture header
</pre>
<p><font face="Trebuchet MS">This is also the RTP fragmenter. The
job of this object is to form RTP packets from incoming <br>
MPEG video frames. This object receives a MPEG video stream. Its
output is suitable for use <br>
with an RTP generator. It sets the RTP payload type as defined in
[2] and is also responsible for <br>
the use of the RTP fixed and extendsion header field. </font></p>
<p><font size="4" face="Trebuchet MS">- </font><font size="3"
face="Trebuchet MS"><strong>rtpMPEGlib</strong></font><font
size="4" face="Trebuchet MS"> </font></p>
<p><font face="Trebuchet MS">This module encapsulates all the
underlying details of bitstream manipulation and elementary <br>
fragmentation and the setting of RTP header feilds. It provides
the simple application <br>
programming interface(API) to the user of this library. That may
include RTSP server or other <br>
RTP compliant video broadcastin server. The user of this software
module invoke play() method<br>
with file name, starting time from the current time and valid
socket as parameters. Socket in <br>
Win32 is SOCKET type and it's the user's responsibility that
passes established socket.</font></p>
<p><a name="pro_doc"><font size="4" face="Trebuchet MS">Program
Documentation</font> </a></p>
<p><font face="Trebuchet MS">This project is being developed in
C++ using Microsoft Visual C++ 5.0 on Windows NT<br>
Server Enterprise Edition 4.0 running the Windows NT 4 Option
Pack with Service<br>
Pack 3 applied. It is expected to run as an operating system
service on Windows NT, <br>
and relies on the WinSock API for communications with the TCP/IP
stack. <br>
Software module can be compiled using 'nmake' utility of
Microsoft Visual C++ 5.0 and<br>
can be downloaded from </font><a href="http://www.cs.columbia.edu/~hgs/teaching/ais/1998/projects/mpegRTP/elementaryStream.zip"><font
face="Trebuchet MS">elementaryStream.zip</font></a><font
face="Trebuchet MS">. You need Microsoft Visual C++ 5.0 to <br>
to compile this module and modify elementaryStream.mak file to
include proper header <br>
which is located on Visual C++ include directory.</font>
</p>
<p>------------------------------------------------------------------------</p>
<p><a name="discussion"><font size="4" face="Trebuchet MS">Future
Work</font> </a></p>
<p><font face="Trebuchet MS">The development of this project has
brought to mind many possibilities for future work. </font></p>
<p><font size="3" face="Trebuchet MS"><strong>Real-time encoders</strong></font></p>
<p><font face="Trebuchet MS">This implementation of MPEG video
elementary stream is by no means complete. For <br>
example, there is currently no source of MPEG video data other
than prerecorded files. <br>
It would be extremely useful to have a software which could
encode MPEG video in real <br>
time or read from a piece of hardware which does so. </font></p>
<p><font size="3" face="Trebuchet MS"><strong>MPEG Video Stream
Recorder</strong></font></p>
<p><font face="Trebuchet MS">Another useful RTP module would be
an MPEG video stream recorder. Since these new MPEG<br>
video module is to be used to receive MPEG video across network,
it would also be quite useful <br>
to be able to record these transmissions. While it is currently
possible to capture the incoming RTP <br>
frames, recording in this format would be wasteful because of RTP
overhead and would contain <br>
unnecessary fragmentation. Also, standard MPEG video playback
software would be unable to handle<br>
the resulting recordings. Similarly, it would be possible to
capture the video after its conversion <br>
back to pure video picture samples.<br>
</font></p>
<p><a name="references"><font color="#000000" size="4"
face="Trebuchet MS">References</font> </a></p>
<p><a
href="http://info.internet.isi.edu:80/7c/in-notes/rfc/files/rfc1889.txt"><font
size="3" face="Trebuchet MS">[1]</font></a><font size="3"
face="Trebuchet MS"> H. Schulzrinne, S. Casner, R. Frederick, V.
Jacobson, "RTP: A Transport Protocol for <br>
Real-Time Applications," RFC 1889, January, 1996.<br>
</font><a
href="http://info.internet.isi.edu:80/7c/in-notes/rfc/files/rfc2250.txt"
target="_blank"><font size="3" face="Trebuchet MS">[2]</font></a><font
size="3" face="Trebuchet MS"> D. Hoffman, G. Fernando, V. Goyal
and M. Civanlar, "RTP payload format for <br>
MPEG1/MPEG2 video," RFC 2250, Internet Engineering Task
Force, January , 1998.<br>
</font><a
href="http://www.amazon.com/exec/obidos/ASIN/0412084112/002-7187379-5697009"
target="_blank"><font size="3" face="Trebuchet MS">[3] </font></a><font
size="3" face="Trebuchet MS">Barry G. Haskell, Atui Puri, and
Arun N. Netravli, "Digital Video: An Introduction <br>
To MPEG-2", 1997<br>
</font><a
href="http://info.internet.isi.edu/7c/in-notes/rfc/files/rfc2326.txt"
target="_blank"><font face="Trebuchet MS">[4]</font></a><font
face="Trebuchet MS"> H. Schulzrinne, A. Rao, R. Lanphier,
"Real Time Streaming Protocol (RTSP)", </font><font
size="3" face="Trebuchet MS">RFC 2326, <br>
Internet Engineering Task Force,</font><font face="Trebuchet MS">April
1998<br>
</font><a
href="http://info.internet.isi.edu/7c/in-notes/rfc/files/rfc1890.txt"><font
face="Trebuchet MS">[5]</font></a><font face="Trebuchet MS"> H.
Schulzrinne, "RTP Profile for Audio and Video Conferences
with Minimal Control", <br>
RFC 1890, January 1996.<br>
[6] RTP Resource </font><a
href="http://www.cs.columbia.edu/~hgs/rtp/" target="_blank"><font
face="Trebuchet MS">http://www.cs.columbia.edu/~hgs/rtp/</font></a><font
face="Trebuchet MS"><br>
[7] RTSP Resource </font><a
href="http://www.cs.columbia.edu/~hgs/rtp/" target="_blank"><font
face="Trebuchet MS">http://www.cs.columbia.edu/~hgs/rtsp/</font></a><font
face="Trebuchet MS"><br>
</font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -