How to convert pcap to avi file with video and audio by gstreamer?

Mark Nauwelaerts mark.nauwelaerts at gmail.com
Tue Apr 24 12:41:27 PDT 2012


Perhaps try to specify the particular audio or video muxer pad
(by sprinkling some mux.video_0 and/or mux.audio_0 or so in there) ?

On 04/24/2012 10:31 AM, Luis de Bethencourt wrote:
> don't know the answer, just want to bump this thread :)
>
> On 19 April 2012 02:51, gcoolman<ericwei at gorilla-technology.com>  wrote:
>> I want to read a pcap file and convert it into a avi file with audio and
>> video data by using gstreamer.
>>
>> If i try the following command, it only works for generating a video file.
>>
>> *Video Only*
>> gst-launch-0.10 -m -v filesrc location=h264Audio.pcap ! pcapparse
>> src-port=44602 \
>> !"application/x-rtp, payload=96" ! rtph264depay ! "video/x-h264, width=352,
>> height=288, framerate=(fraction)30/1" \
>> ! ffdec_h264 ! videorate ! ffmpegcolorspace \
>> ! avimux ! filesink location=testh264.avi
>>
>> *Audio Only*
>> And if i use the following command, it only works for generating a audio
>> file.
>>
>> gst-launch-0.10 -m -v filesrc location=h264Audio.pcap ! pcapparse
>> src-port=7892 \
>> ! "application/x-rtp, payload=8" ! rtppcmadepay ! alawdec ! audioconvert !
>> audioresample ! avimux ! filesink location=test1audio.avi
>>
>> *Video + Audio*
>> When i combine two commands as follows, i encountered an error message --
>> ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc1: Internal
>> data flow error.
>>
>> gst-launch-0.10 -m -v filesrc location=h264Audio.pcap ! pcapparse
>> src-port=44602 \
>> !"application/x-rtp, payload=96" ! rtph264depay ! "video/x-h264, width=352,
>> height=288, framerate=(fraction)30/1" \
>> ! ffdec_h264 ! videorate ! ffmpegcolorspace \
>> ! queue ! mux. \
>> filesrc location=h264Audio.pcap pcapparse src-port=7892 \
>> ! "application/x-rtp, payload=8" ! rtppcmadepay ! alawdec ! audioconvert !
>> audioresample ! queue ! avimux name=mux ! filesink
>> location=testVideoAudio.avi
>>
>> Please kindly give me some solutions or suggestions with regard to this
>> issue.
>> Thank you in advance.
>> Eric
>>
>> --
>> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-convert-pcap-to-avi-file-with-video-and-audio-by-gstreamer-tp4569612p4569612.html
>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list