Bitmap to JPEG encoder

Nicolas Dufresne nicolas at ndufresne.ca
Mon May 28 16:03:01 UTC 2018


Le lundi 28 mai 2018 à 17:24 +0200, Wolfgang Grandegger a écrit :
> Hello,
> 
> I'm rather new to GSTreamer. I want to JPEG encode an RGB video stream
> and send it to the network e.g. with the command:
> 
>   # gst-launch-1.0 -v videotestsrc \
>     ! video/x-raw,format=RGB,width=640,height=480,framerate=30/1 \
>     ! vaapijpegenc quality=90 \
>     ! rtpjpegpay ! udpsink host=192.168.0.254 port=5678
>   Setting pipeline to PAUSED ...
>   Pipeline is PREROLLING ...
>   Got context from element 'vaapiencodejpeg0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1";
>   ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
>   Additional debug info:
>   gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
>   streaming stopped, reason not-negotiated (-4)
>   ERROR: pipeline doesn't want to preroll.
>   Setting pipeline to NULL ...
>   Freeing pipeline ...
> 
> This command works fine with the "NV12" format but fails with "RGB".
> Also "jpegenc" does not like it. Obviously, I missed something!?

You'll need to add color conversion. With VAAPI, you can use
vaapipostproc, with jpegenc, videoconvert. The second will work for
both, but vaapipostproc uses the GPU.

> 
> Any help is appreciated.
> 
> Thanks,
> 
> Wolfgang.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list