<html><head></head><body><div>Le jeudi 26 août 2021 à 15:31 -0400, Dwight Kulkarni a écrit :</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>It seems that multifile sink pipeline below did work the second time. The first time for some reason the frames were blank, possibly I was too hasty in terminating the program ?</div><div><br></div><div>I have a followup question.  Is there a way for me to retrieve the result into memory rather than in a filesink. I am calling gstreamer in a C++ program. Can I have Gstreamer return a handle for each frame so that I can directly access the JPEG rather than having to write it to file ?</div></div></div></blockquote><div><br></div><div>Sure, you can end you pipeline with appsink, and use appsink public API to pull the GstSamples.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>Thanks in advance.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 26, 2021 at 12:25 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Le jeudi 26 août 2021 à 11:14 -0400, Dwight Kulkarni via gstreamer-devel a<br>écrit :<br>> Hi all,<br>> <br>> I am using gstreamer and try the following two pipelines:<br>> <br>> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920,<br>> height=1080, framerate=15/1 ! autovideosink<br>> <br>> When I run this command, a window opens up and shows me the camera output.<br>> <br>> Now I want to convert this stream to jpeg and save it to file, so I use the<br>> following:<br>> <br>> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920,<br>> height=1080, framerate=15/1 ! jpegenc ! multifilesink<br>> location=/home/myuser/mytestfolder/img_%06d.jpg<br>> <br>> <br>> I run the second command for a few seconds then terminate with Ctrl C. I see<br>> files img_00001.jpg etc. but the size of the file is 0 KB.<br>> <br>> Can anyone suggest what I might be doing wrong ?<br>> <br></div><div><br>This is strange, I ran this here, gst 1.18.4, and it just worked. Perhaps you<br>should set GST_DEBUG=2 to get warnings printed if any, might help ? Also,<br>consider adding videoconvert, in case your cam does not produce a pixel format<br>compatible with jpegenc ?<br></div><div><br></div></blockquote></div><br clear="all"><div><br></div></div></blockquote><div><br></div><div><span></span></div></body></html>