create h263, h264 video from rtp pcap

Manfred Ehgartner manfred.ehgartner at gmx.net
Wed Aug 14 13:48:46 PDT 2013


Hello,

I am currently working in a project, where I have pcaps containing h263,
h264 and mpeg I/II audio streams. For some of them I have additionally
signaling info with a session description (SDP), for some of them just the
rtp streams.  I need to create something playable out oft it (mpeg, AVI
container file).

So I think I have two situations

1)      SDP not available (the hard case)

After trying several things, I succeeded for H264 using the tool videosnarf
combined with ffmpeg. The output raw file of videosnarf could be converted
to a MPEG or avi file using ffmpeg. Unfortunately, videosnarf doesn't
support h263 and mpeg audio, so I thought gstreamer could help me in this
case even if I know, that without SDP and with dynamic payload it might be
quite hard or impossible to get something playable.

So using wireshark I separated the pcap just containing the udp packets for
a single rtp stream and I tried to feed gstreamer using:

gst-launch-0.10 filesrc location=input.pcap ! pcapparse ! rtph264depay

! ffdec_h264 ! filesink location=output.mpeg, but for almost every pcap I
got an error. Even just using the simple pipe  gst-launch-0.10 filesrc
location=input.pcap ! pcapparse was not working for most pcaps (and I know,
that they are ok). The error is always something like ERROR: pipeline
doesn't want to preroll.

So I think the problem is already in the pcapparse plugin. I tried to use
the attributes for ip and port, but the same behaviour. Maybe I am missing
something?

But I could skip the pcap part, as I have a script which is just taking the
udp payload (rtp header + rtp payload) and dumping these rtp packets in a
file. Could I maybe use some gstreamer pipeline using this rtp packet file
as input?

 

2)      SDP available: When I use my script,  I have a file containing rtp
packets of a video streaming session (e.g. h263) and additionally the sdp
file, my goal is to create a playable video file out of it (the container
doesn't matter) using gstreamer.

I am not experienced using sdp, but as far as I understood, inside the sdp
file the parameter c = IN IP4 Host defines the network parameters for the
player which is opening the sdp. So the player is using this parameters to
wait for incoming rtp packets fitting to the description inside the SDP, am
I right?

So I would need to replay the rtp stream locally and use gstreamer to
capture  the packets on the NIC for writing the container file? Or is it
possible somehow directly feed gstreamer with the sdp + the file containing
the already captured rtp packets and take this two input parameters for
generating the output container directly?

 

Thanks in advance for your help

 

Manfred

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130814/7e80ce57/attachment.html>


More information about the gstreamer-devel mailing list