ximagesrc to jpegenc

Tim Müller tim at centricular.com
Sun Nov 23 06:32:19 PST 2014


On Sun, 2014-11-23 at 14:36 +0100, Arnaud Loonstra wrote:

Hi Arnaud,

> I seem to be hitting a bug or missing a point. I just want to stream an 
> ximagesrc to mjpeg rtp stream, like
> 
> gst-launch-1.0 -v ximagesrc xname=xclock ! jpegenc ! rtpjpegpay ! 
> udpsink ...
> 
> I first test this but it fails
> 
> gst-launch-1.0 -v ximagesrc xname=xclock use-damage=false ! videoconvert 
> ! jpegenc ! jpegdec ! ximagesink
> 
> GstXImageSrc:ximagesrc0: Internal data flow error.

Might need a videoconvert in front of the sink as well.

> Whatever pipeline I try it gives errors.
> 
> The only one that worked was:
> gst-launch-1.0 -v ximagesrc xname=xclock ! videoconvert ! jpegenc ! 
> jpegdec ! glimagesink
> 
> However sending that to rtpjpegpay gives:
> 
> gst-launch-1.0 -v ximagesrc xname=xclock ! videoconvert ! jpegenc ! 
> rtpjpegpay
> 
> /GstPipeline:pipeline0/GstRtpJPEGPay:rtpjpegpay0.GstPad:src: caps = 
> "application/x-rtp\,\ media\=\(string\)video\,\ 
> clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)JPEG\,\ 
> a-framerate\=\(string\)25.000000\,\ a-framesize\=\(string\)769-371\,\ 
> payload\=\(int\)26\,\ ssrc\=\(uint\)3227055378\,\ 
> timestamp-offset\=\(uint\)505174886\,\ seqnum-offset\=\(uint\)6704"
> /GstPipeline:pipeline0/GstRtpJPEGPay:rtpjpegpay0.GstPad:sink: caps = 
> "image/jpeg\,\ sof-marker\=\(int\)4\,\ width\=\(int\)769\,\ 
> height\=\(int\)371\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ 
> framerate\=\(fraction\)25/1"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = 
> "image/jpeg\,\ sof-marker\=\(int\)4\,\ width\=\(int\)769\,\ 
> height\=\(int\)371\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ 
> framerate\=\(fraction\)25/1"
> WARNING: from element /GstPipeline:pipeline0/GstRtpJPEGPay:rtpjpegpay0: 
> Invalid component
> Additional debug info:
> gstrtpjpegpay.c(604): gst_rtp_jpeg_pay_read_sof (): 
> /GstPipeline:pipeline0/GstRtpJPEGPay:rtpjpegpay0

Try

 ximagesrc ! videoconvert ! video/x-raw,format=I420 ! jpegenc !
rtpjpegpay ! ....

There's a problem which is that the RTP JPEG payloading spec only allows
for certain formats and subsample arrangement, but that's something we
can't negotiate at the moment, so you need to hard-code the input to
something that's supported by the payloader/spec.

 Cheers
  -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list