[gst-devel] save an rtp stream: aviheader issue

Marco Ballesio gibrovacco at gmail.com
Thu Apr 15 08:47:10 CEST 2010


Hi,

wouldn't it be easier to save the stream with e.g. tcpdump and then
convert it with something like (this is for h264 video only but is
extensible to audio as well):

gst-launch filesrc location=capture.pcap ! pcapparse src-port=3378 !
"application/x-rtp, payload=97" ! rtph264depay ! "video/x-h264,
width=320, height=240, framerate=(fraction)30/1" ! avimux ! filesink
location=test.avi

the capture command should be something like:

tcpdump -ietho -s0 -w capture.cap

you've to check the udp port and payload type you're interested in by
using wireshark, but some automation is possible anyway.

Regards

On Mon, Apr 12, 2010 at 4:51 PM, lorenzo centurelli
<l.centurelli at gmail.com> wrote:
> Hi.
> Can you write the transmission pipeline?
> Which board are you using?
>
> Lorenzo
>
>
> 2010/4/11 Mailing List SVR <lists at svrinformatica.it>
>>
>> I added a videorate element so this pipeline works:
>>
>> gst-launch-0.10 -e -v udpsrc port=6000 caps="application/x-rtp,
>> media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG,
>> payload=(int)26" ! .recv_rtp_sink_0 gstrtpbin ! rtpjpegdepay  ! videorate
>> !
>> image/jpeg, width=352, height=288, framerate=3/1 ! avimux ! filesink
>> location=test-gst.avi
>>
>> but if I don't know the framerate or the framerate is variable how can I
>> tell
>> to gstreamer to autodetect these infos?
>>
>>
>> In data domenica 11 aprile 2010 12:34:01, Mailing List SVR ha scritto:
>> : > Hi,
>> >
>> > I'm trying to save an rtp stream with the following pipeline:
>> >
>> > gst-launch-0.10 -e -v udpsrc port=6000 caps="application/x-rtp,
>> > media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG,
>> > payload=(int)26" ! .recv_rtp_sink_0 gstrtpbin ! rtpjpegdepay  ! queue !
>> > avimux ! filesink location=test-gst.avi
>> >
>> > the resulting file miss some information in the headers, if I try to see
>> > it
>> > with mplayer I have this error:
>> >
>> > Playing test-gst.avi.
>> > AVI file format detected.
>> > [aviheader] Video stream found, -vid 0
>> > AVI: No audio stream found -> no sound.
>> > VIDEO:  [MJPG]  352x288  24bpp  0.000 fps    0.0 kbps ( 0.0 kbyte/s)
>> > FPS not specified in the header or invalid, use the -fps option.
>> > No stream found.
>> >
>> > to see the stream I have to manually specify the fps:
>> >
>> > mplayer -fps 3 test-gst.avi
>> >
>> > works fine,
>> >
>> >
>> > using:
>> >
>> > gst-launch-0.10 playbin uri=file:///home/nicola/test-gst.avi
>> >
>> > the video is played very slow,
>> >
>> > what modifications I have to do to the above pipeline to generate a
>> > standard aviheader?
>> >
>> > thanks
>> > Nicola
>> >
>> > P.S. I need to use an avi container
>> >
>> >
>> > ---------------------------------------------------------------------------
>> > --- Download Intel&#174; Parallel Studio Eval
>> > Try the new software tools for yourself. Speed compiling, find bugs
>> > proactively, and fine-tune applications for parallel performance.
>> > See why Intel Parallel Studio got high marks during beta.
>> > http://p.sf.net/sfu/intel-sw-dev
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>




More information about the gstreamer-devel mailing list