播放抓取的H263 RTP视频

播放抓取的H263 RTP视频

1. 使用Ethereal/Wireshark 抓取RTP数据包,选择H263的过滤条件保存
2. Statistics/RTP Streams/Streams Analysis
3. Save payload选择保存raw数据
4. 使用ffplay播放 ffplay -f h263 file


播放RTP音频
http://www.ethereal.com/lists/ethereal-users/200401/msg00264.html

save the RTP stream in rtpdump format
(Analyze/Statistics/RTP Streams/Show all.../Save as..) and
use e.g. rtpplay to send the RTP stream towards some program that supports
G.726-32 codec and can listen for RTP packets on
a certain port. QuickTime Player can listen on a specific port (or specific
ports) by using an sdp-file (but this only works for the codecs that are
suported in QuickTime).

I don't know if QuickTime Player supports G.726-32k (and exactly what you
would need to write in the sdp-file if G726 is supported)
This document says Quicktime supports ADPCM at least, but I don't know that
that could mean that G.721/G.726-32 is supported.
http://www.isholf.is/klipklap/quicktime/

Below is a short summary how you can use QuickTime Player together with
rtpplayer to replay audio and video.
I have used this method for H.263-2000 video, H.261 video, PCMU audio, PCMA
audio, AMR audio and some other codes.

You can experiment with the Avican sample files if you want (H.261 video and
PCMU audio RTP packets in libpcap compatible files):
http://netgroup-serv.polito.it/avican/examples/index.htm


1) Install QuickTime player

2) Download rtptools http://www.cs.columbia.edu/IRT/software/rtptools/

3) Prepare an *.sdp file for the codecs/payloadtypes/ports you want to use
(the other information in the SDP-file seems not to be important).
I have put in a sample below of the SDP-file I used when testing with the
Avican sample files.

4) Prepare rtpdump files with Ethereal (Analyze/Statistics/RTP Streams/Show
all.../Save as..) for the two streams.
You'll have to use Decode As.. to decode port 5000 and 6000 as RTP in
this specific case.

5) Start up Quicktime Player and use File/Open Movie in New Player... and
select the sdp-file you prepared
(or it might be enough to double click on the SDP-file if sdp files are
asociated with QuickTime Player)

6) use rtpplay to send the RTP packets (audio and/or video) towards your own
ip-address on the port numbers used in the SDP-file:
<rtpplay -T -f audioPCMU_0.rtp 127.0.0.1/5000
you will need two shells in order to send both audio and video
<rtpplay -T -f videoH261_31.rtp 127.0.0.1/5002

7) You'll have to close the QuickTime player window between each time you
start again with sending media towards Quick Time Player
(I guess this is because it expects the packets to come in sequence order).

PS! It should also be possible to use JMF JMStudio as an alternative to
QuickTime Player in this case since JMStudio also supports both H.261 and
PCMU.
You will not use a sdp file then (and thus it is not possible to use this
method for dynamic payload types).
You use the menu alternative File/Open RTP Session... and specify the port
to listen on (the easiest is to use the same port for both audio and video)
and
send the RTP packets to that port with rtpplay.

-------------- testfile.sdp ---------------------------------
v=0

o=mhandley 2890844526 2890842807 IN IP4 10.10.10.10

s=SDPTest

i=SDP file for G711 audio on port 5000 and H261 video on port 5002

c=IN IP4 10.10.10.10

t=0

m=audio 5000 RTP/AVP 0 8

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

m=video 5002 RTP/AVP 31

a=rtpmap:31 H261/90000

------------------------------------------------
From: "Jffdsaklj dsjk"
>
> I've followed the "Martin's tutorial":
>
http://www.ethereal.com/lists/ethereal-users/200401/msg00264.html in
> order to save the audio/video RTP streams and then replay with the
> rtpplay utility.
> I can replay the video stream in JMStudio but not the audio stream
> (perhaps by some codec problem) but I can replay neither video nor
> audio streams with Quicktime player.

JMF/JMStudio doesn't support SIREN codec, at least what I know.

JMStudio supports H.263 video (RFC 2190).
http://java.sun.com/products/java-media/jmf/2.1.1/formats.html

>
> I have a H.263 video stream (payload code: 34) and a SIREN audio
> stream (payload code: 111). I've checked both payload codes in
> Ethereal, and the audio stream is considered unknown by ethereal.
>


> a=rtpmap:34 H263/90000
> a=rtpmap:31 H261/90000


> When I start the rtpplay utility with the stored RTP streams, the
> Quicktime start playing (because the second counter is increasing) but
> it doesn't replay sound or music. I've tested with different
> configurations of the SDP file but with no positive result.
>
> What's the problem with Quicktime?.
>

I think QuickTime Player supports H.263-2000 (RFC2429) and/or H.263-1998 (RFC2429)
but it seems not to support the old H.263 (RFC2190).
H.263 (RFC2190) is the codec corresponding to payload type 34.

I don't think QuickTime Player supports SIREN codec.

I'm not sure how you could replay SIREN codec right now.
I will try to find some more information about that.


注意:QuickTime 只支持H263-1998 与H263-2000

1. 使用Ethereal/Wireshark 抓取RTP数据包,选择H263的过滤条件保存
2. Statistics/RTP Streams/Show all Streams
3. Save As 保存为rtpdump格式
4. 使用rtpplay 发送RTP, rtpplay -T -f file ip/port
5. 创建sdp文件
6. 使用QuickTime 播放

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页