<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><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 class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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>
<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>
<br>
</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><br></div></div></div></div></div></div></div></div>