<div dir="ltr"><div>Dwight,</div>I do not know the full description of the problem you're trying to solve.<div>But, from the description you've provided, I assume, that for you appsink/appsource should be enough.</div><div>Refer to this:</div><div><a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html?gi-language=c">https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html?gi-language=c</a><br></div><div><a href="https://gstreamer.freedesktop.org/documentation/applib/gstappsink.html?gi-language=c#GstAppSink::new-sample">https://gstreamer.freedesktop.org/documentation/applib/gstappsink.html?gi-language=c#GstAppSink::new-sample</a><br></div><div><a href="https://gstreamer.freedesktop.org/documentation/gstreamer/gstsample.html?gi-language=c">https://gstreamer.freedesktop.org/documentation/gstreamer/gstsample.html?gi-language=c</a><br></div><div><br></div><div>Note about gst sample out of the appsink and memory ownership.</div><div><br></div><div>Best regards,</div><div>Anton. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 8:17 PM Dwight Kulkarni <<a href="mailto:dwight@realtime-7.com">dwight@realtime-7.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Anton,</div><div><br></div>Should I use proxysrc and proxysink to join them or appsrc and appsink ?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 12:08 PM Anton Pryima <<a href="mailto:zingfrid@gmail.com" target="_blank">zingfrid@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dwight,<div><br></div><div>I still do not understand, why do you need to encode raw frames to h264 in the first pipeline (vpuenc_h264), and decode its back to the raw frames in the second pipeline (avdec_h264). It will consume a lot of CPU power and in your case (if you're running this on the same PC) it is useless, as you already have raw (decoded) frames right after v4l2src.</div><div>So, as my first suggestion, it is more reasonable to appsink raw frames right after src, and then, using appsrc, encode these frames to h264 and put them into splitmuxsink, and at another pipeline encode it to the jpegenc and do whatever you want. </div><div><br></div><div>Best regards,</div><div>Anton.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 6:43 PM Dwight Kulkarni <<a href="mailto:dwight@realtime-7.com" target="_blank">dwight@realtime-7.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Anton,<br><div><br></div><div>1) Is there a way I can copy frames out of splitmuxsink ?   Which callback would I use for that if it's possible ?  Right now I am only using callback of "format-location" on splitmuxsink.</div><div><br></div><div>2) Suppose I split up the pipeline as follows:</div><div><br></div><div>(this is already working)</div><div><b>pipeline#1</b> = "v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080, framerate=15/1 ! vpuenc_h264 ! tee name=v ! queue ! h264parse ! appsink name=h264vid max-buffers=1 drop=true v. ! queue ! h264parse ! splitmuxsink name=filesink location=./videos/video%02d.mkv max-size-time=10000000000 muxer-properties=\"properties,streamable=true\" ";</div><div><br></div><div><br></div><div><b>pipeline#2</b> = "appsrc name=jpegvideosrc  ! queue ! avdec_h264 ! jpegenc ! appsink name=jpegsink max-buffers=1 drop=true"</div><div><br></div><div>For "pipeline#2" do I still need to terminate in an appsink or can I tap into the end result of jpegenc with a callback (eg. new-sample or need-data) and giving it a name. Something like:</div><div><br></div><div>string other_pipeline = "appsrc name=jpegvideosrc  ! queue ! avdec_h264 ! jpegenc name=jpegsink"<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 10:57 AM Anton Pryima via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Dwight.<br><div><br></div><div>Why do you need to construct a so complicated pipeline and do both encoding and decoding?</div><div>Why not make a couple of pipelines:</div><div>1. v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080, framerate=15/1 ! appsink</div><div>2. appsrc -> vpuenc_h264 ! splitmuxsink</div><div>3. appsrc -> jpegenc ! whatever you need next....  or just copy frames where every you need instead of second appsink.</div><div><br></div><div>Beste regards,</div><div>Anton.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 14, 2021 at 5:43 PM Dwight Kulkarni via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,<br clear="all"></div><div><br></div><div>I am trying to setup a pipeline with tee that has three forks. One of the forks is a jpegsink that I want to then access the image. Whereas the first two forks are working the last one for jpegsink is not.</div><div><br></div><div>Here is what I do:</div><div><br></div><div>gst_init (0, NULL);<br>string pipeline = "v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080, framerate=15/1 ! vpuenc_h264 ! tee name=v ! queue ! h264parse ! appsink name=h264vid max-buffers=1 drop=true v. ! queue ! h264parse ! splitmuxsink name=filesink location=./videos/video%02d.mkv max-size-time=10000000000 muxer-properties=\"properties,streamable=true\" v. ! queue ! avdec_h264 ! jpegenc ! appsink name=jpegsink max-buffers=1 drop=true";<br>gstreamer_main_video_pipeline = gst_parse_launch(pipeline.c_str(),NULL);<br><br>GstElement * jpegsink = gst_bin_get_by_name_recurse_up(GST_BIN(gstreamer_main_video_pipeline), "jpegsink");<br><br>JpegContext* ctx = g_new0 (JpegContext, 1);<br>g_signal_connect (G_OBJECT(jpegsink), "new-sample", G_CALLBACK(new_sample), ctx);</div><div><br></div><div><br></div><div>I never get the callback to new_sample, but the pipeline is running and other two tee forks work properly.</div><div><br></div><div>Any help would be appreciated!<br></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni <br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni </div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni                </div><div><span style="font-size:x-small">B.ASC, M.ASC, PMP</span></div><div><br></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=0BzlN7tI_lBoQZVVoRTJGdE5EUVU&revid=0BzlN7tI_lBoQb3FFd3hhbWlMSU9kR1llVTZOU0NMdld6K0dnPQ"><br></div><div><font size="1" face="verdana, sans-serif">Realize Potential</font></div><div><br></div><div><br></div><div>Office:  1-866-838-9101 x 101</div><div>Direct:  416-900-0863</div><div>Cell:     416-417-8144</div><div>Fax:     1-866-861-9611</div><div><div><div dir="ltr"><div><br>RealTime7 Inc., 27 Catharine Ave., Brantford, ON. Canada. N3T 1X5</div><div><a href="http://www.realtime7.net" target="_blank">www.realtime7.net</a><br></div><div><br></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:"Courier New",Courier,mono">This message may contain confidential information. If you are not the intended addressee you should not disseminate, distribute or copy this e-mail. Pleas</span><span style="color:rgb(0,0,0);font-family:"Courier New",Courier,mono;font-size:12.8px">e notify the sender immediately if you have received this e-mail in error and delete this e-mail from your system.<br></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>