Best option to add overlay, ensure frame rate (fallback source), handle need callback, and frame transfer in GStreamer
isra601988 at gmail.com
Mon Jun 12 06:47:11 UTC 2023
I'm working with GStreamer and have a pipeline that captures video from a
v4l2src device and sends it to an appsink. Currently, I receive the frames
through the new-sample callback of appsink. I need to add a simple overlay
before sending the frames to another pipeline with omxh264enc.
Additionally, I would like to ensure that the frames arrive at a rate of 30
My current pipeline is as follows: v4l2src device=/dev/video1 io-mode=4 !
And the next pipeline is: appsrc name=encodersource !
omxh264enc target-bitrate=8000 num-slices=2 periodicity-idr=30 !
video/x-h264, alignment=au ! appsink name=encodersink
I have the following questions:
What would be the best approach to add an overlay in the first pipeline
before sending the frames to the second pipeline?
Is there a way to ensure that the need-data callback of appsrc is called
at a rate of 30 fps? Or should I consider an alternative approach, such as
restarting a timer every time a frame is received from v4l2src and, in case
of a timeout without receiving frames, generating the test pattern at that
Currently, I'm receiving the frames through the new-sample callback of
appsink, and then I add the frames to appsrc using gst_app_src_push_buffer.
Is this the recommended method for frame transfer in this scenario, or are
there other approaches I should consider?
I would greatly appreciate any guidance or recommendation on these three
aspects, considering both efficiency and effectiveness.
Thank you in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel