converting jpeg to h263p and streaming over RTP

Aleksander aleek998 at gmail.com
Sat Mar 16 03:38:18 PDT 2013


Naaah, still not working :)

I've added videoscale, because I was not sure, if rtph263ppay likes
640x480 video:

gst-launch-0.10 -v -e v4l2src device=/dev/video0 \
! 'image/jpeg,width=640,height=480,framerate=30/1'  \
! jpegdec  \
! videoscale \
! "video/x-raw-yuv, format=(fourcc)I420, width=(int)352,
height=(int)288, framerate=(fraction)30/1"\
! ffmpegcolorspace \
! ffenc_h263p \
! rtph263ppay \
! fakesink

Still, it doesn't work unless I remove rtph263ppay. Here is some
output of the working (without rtph263ppay) example, maybe it will
give you some clue:
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
image/jpeg, width=(int)640, height=(int)480,
interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1, format=(fourcc)I420, sof-marker=(int)0
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
image/jpeg, width=(int)640, height=(int)480,
interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1, format=(fourcc)I420, sof-marker=(int)0
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
image/jpeg, width=(int)640, height=(int)480,
interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1, format=(fourcc)I420, sof-marker=(int)0
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps =
image/jpeg, width=(int)640, height=(int)480,
interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1, format=(fourcc)I420, sof-marker=(int)0
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps =
video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps =
video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/ffenc_h263p:ffenc_h263p0.GstPad:src: caps =
video/x-h263, width=(int)352, height=(int)288,
framerate=(fraction)30/1, variant=(string)itu,
h263version=(string)h263p, annex-f=(boolean)true,
annex-j=(boolean)true, annex-i=(boolean)true, annex-t=(boolean)true
/GstPipeline:pipeline0/ffenc_h263p:ffenc_h263p0.GstPad:sink: caps =
video/x-raw-yuv, width=(int)352, height=(int)288,
framerate=(fraction)30/1, format=(fourcc)I420,
pixel-aspect-ratio=(fraction)12/11
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/x-h263, width=(int)352, height=(int)288,
framerate=(fraction)30/1, variant=(string)itu,
h263version=(string)h263p, annex-f=(boolean)true,
annex-j=(boolean)true, annex-i=(boolean)true, annex-t=(boolean)true
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll
 ******* "
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event
******* (fakesink0:sink) E (type: 102, GstEventNewsegment,
update=(boolean)false, rate=(double)1, applied-rate=(double)1,
format=(GstFormat)GST_FORMAT_TIME, start=(gint64)0, stop=(gint64)-1,
position=(gint64)0;) 0x1b5b140"
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain
******* (fakesink0:sink) (15059 bytes, timestamp: 0:00:00.103378443,
duration: 0:00:00.000000000, offset: -1, offset_end: -1, flags: 0 )
0x7fa290002150"
[...]

On Sun, Mar 10, 2013 at 4:56 PM, Nicolas Dufresne
<nicolas.dufresne at collabora.co.uk> wrote:
> Le dimanche 10 mars 2013 à 12:28 +0100, Aleksander Dutkowski a écrit :
>
> but this one...
> gst-launch-0.10 -v -e v4l2src device=/dev/video0 \
> ! 'image/jpeg,width=640,height=480,framerate=30/1'  \
> ! jpegdec  \
> ! "video/x-raw-yuv, format=(fourcc)I420, width=(int)640,
> height=(int)480, framerate=(fraction)30/1" \
> ! ffmpegcolorspace \
> ! ffenc_h263p \
> ! "video/x-h263, width=(int)640, height=(int)480,
> framerate=(fraction)30/1, variant=(string)itu,
> h263version=(string)h263p, annex-f=(boolean)true,
> annex-j=(boolean)true, annex-i=(boolean)true, annex-t=(boolean)true" \
> ! rtph263ppay \
> ! fakesink
>
> ... results in following error:
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
> not negotiate format
> Additional debug info:
> gstbasesrc.c(2830): gst_base_src_start ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> Check your filtered caps, if any
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> I'm confused, why v4l2src is crashing, as I add element to the end of
> the pipe. I checked src and sink of all elements, and it looks good.
>
>
> My suggestion would be to not force the caps as you are doing, and let the
> element negotiate. In my opinion, only the caps filster after the source is
> useful. If you need specific encoder parameter, set them on encoder
> properties instead. This will most likely work.
>
> Nicolas
>
> _______________________________________________
> 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