How to capture a yuv frame from h.264 stream
Michael MacIntosh
mmacintosh at linear-systems.com
Thu Nov 2 17:36:55 UTC 2017
> 1. I would like to grab a yuv frame periodically to do some AR processing.
> What is the best way to grab a frame for processing?
Most sinks have a property called "last-sample" however autovidoesink is
a bin, and you would need to iterate through it to find the actual sink
at runtime.
For instance, you might use:
GstIterator *sink_iterator = gst_bin_iterate_sinks(GST_BIN(your_pipeline));
GValue item = G_VALUE_INIT;
while (gst_iterator_next (sink_iterator, &item) == GST_ITERATOR_OK)
{
// you only have one sink here
}
To get the actual video sink you are using, then you can use
g_object_get(sink, "last-sample", &samp, NULL); to get your sample for
processing.
> 2. Do these options make sense and are there suggestions for improvement?
> Do hw h.264 encoders automatically get utilized if present?
Hardware h264 encoders do not get automatically used, as far as I know
there are no bins that autoplug encoders (I could be wrong on this).
However, if you use decodebin, and want to use hardware h264 decoders,
they should autoplug, because hardware decoders generally have a high
merit (if they are working).
Hope that helps!
On 11/1/2017 12:11 PM, glenne wrote:
> I am successfully receiving a stream on android via the following config to
> hopefully get minimal latency:
>
> rtspsrc location=rtsp://10.0.1.155:8554/test latency=0 ! rtpjitterbuffer
> drop-on-latency=false latency=1 ! rtph264depay ! avdec_h264 ! videoconvert !
> autovideosink sync=false
>
> 1. I would like to grab a yuv frame periodically to do some AR processing.
> What is the best way to grab a frame for processing?
>
> 2. Do these options make sense and are there suggestions for improvement?
> Do hw h.264 encoders automatically get utilized if present?
>
>
> --
> Glenn
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> 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