create h263, h264 video from rtp pcap

Chuck Crisler ccrisler at mutualink.net
Wed Aug 14 15:13:29 PDT 2013


According to the documentation for PCAPPARSE, you need to supply the source
and destination IP address and port, so it can pick out the correct
packets. You also need to specify the payload type to the depayloader. Here
is my pipeline:

gst-launch filesrc location=$1 ! 'raw/x-pcap' ! queue ! pcapparse src-ip=$2
src-port=$3 dst-ip=$4 dst-port=$5 ! \

'application/x-rtp,media=video,payload=104,clock-rate=90000,encoding-name=H264'
! \
    rtph264depay byte-stream=true ! video/x-h264 ! ffdec_h264 ! xvimagesink

My pipeline doesn't play well. It plays way too fast, but I haven't had the
time to figure out how to slow it down. Perhaps some else can make a
suggestion? The problem is that there isn't a clock, so the filesrc reads
as fast as it can.

Chuck


On Wed, Aug 14, 2013 at 4:48 PM, Manfred Ehgartner <
manfred.ehgartner at gmx.net> wrote:

> 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****
>
> ** **
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130814/2e9e3a19/attachment.html>


More information about the gstreamer-devel mailing list