Trying to encode a captured frame as jpeg

kilamski malik.cisse at gmx.net
Mon Jun 17 12:55:32 UTC 2019


Hi,
I am attempting to capture a jpeg snapshot from a stream, much like the
example listed here:
https://github.com/rubenrua/GstreamerCodeSnippets/blob/master/C/takepic.c

It actually works but I am unable to pass the jpegenc "quality" property:

GstCaps *caps;
GstSample *from_sample, *to_sample;
caps = gst_caps_from_string ("image/jpeg");
to_sample = gst_video_convert_sample (from_sample, caps,
GST_CLOCK_TIME_NONE, &err);

But I want to do something like this and it does not work.
caps = gst_caps_from_string
 ("image/jpeg, quality=99");

to_sample = gst_video_convert_sample (from_sample, caps,
GST_CLOCK_TIME_NONE, &err);
Please help



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list