<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)">Hello,</p><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)">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 fps.</p><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;background-color:rgb(247,247,248)"><font color="#374151" face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"><span style="font-size:16px">My current pipeline is as follows: </span></font><span style="background-color:rgb(255,255,255);font-size:16px"><font color="#374151" face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji">v4l2src device=/dev/video1 io-mode=4 ! video/x-raw,width=1920,height=1080,format=NV16_10LE32,framerate=30/1 ! appsink name=videosourcesink</font></span></p><div><span style="background-color:rgb(255,255,255);font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(34,34,34)"><br></span></div><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;background-color:rgb(247,247,248)"><font color="#374151" face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji"><span style="font-size:16px">And the next pipeline is: </span></font><span style="background-color:rgb(255,255,255);font-size:16px"><font color="#374151" face="Söhne, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Helvetica Neue, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji">appsrc name=encodersource ! video/x-raw,width=1920,height=1080,format=NV16_10LE32,framerate=30/1 ! omxh264enc target-bitrate=8000 num-slices=2 periodicity-idr=30 ! video/x-h264, alignment=au ! appsink name=encodersink</font></span></p><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)">I have the following questions:</p><ol style="border:0px solid rgb(217,217,227);box-sizing:border-box;list-style-position:initial;margin:1.25em 0px;padding:0px 0px 0px 1rem;display:flex;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)"><li style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px;padding-left:0.375em"><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px">What would be the best approach to add an overlay in the first pipeline before sending the frames to the second pipeline?</p></li><li style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px;padding-left:0.375em"><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px">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 moment?</p></li><li style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px;padding-left:0.375em"><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:0px">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?</p></li></ol><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)">I would greatly appreciate any guidance or recommendation on these three aspects, considering both efficiency and effectiveness.</p><p style="border:0px solid rgb(217,217,227);box-sizing:border-box;margin:1.25em 0px;color:rgb(55,65,81);font-family:Söhne,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",sans-serif,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;background-color:rgb(247,247,248)">Thank you in advance!</p></div></div></div></div>