Hi everyone,
I'm trying to get a snapshot from a webcam that is continuously sending the picture to a GTK+ app using a gtreamer pipeline, so I can save that snapshot as a IPLImage, to later use it with OpenCV. I searched the web to find the answer and I found that I could use a gstbuffer to store the frame that gstreamer grabs from the v4l2src, but I couldn't get it to work... How do I get the data from the pipeline to the buffer? Thanks, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Carlos,
You men you want to store the data that you captured from the webcam ? you may even like to refer to http://github.com/Elleo/gst-opencv project incase you intend to use gstreamer and opencv ? best kapil On Fri, Apr 9, 2010 at 2:00 PM, Carlos Castro <[hidden email]> wrote: Hi everyone, -- http://www.linkedin.com/in/kapilagrawal ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
On Fri, Apr 9, 2010 at 4:30 PM, Carlos Castro <[hidden email]> wrote:
> Hi everyone, > > I'm trying to get a snapshot from a webcam that is continuously > sending the picture to a GTK+ app using a gtreamer pipeline, so I can > save that snapshot as a IPLImage, to later use it with OpenCV. > > I searched the web to find the answer and I found that I could use a > gstbuffer to store the frame that gstreamer grabs from the v4l2src, > but I couldn't get it to work... How do I get the data from the > pipeline to the buffer? > > Thanks, > Carlos Castro > gst-launch uridecodebin uri=file:///path/to/some/file ! \ ffmpegcolorspace ! videoscale ! pngenc snapshot=false ! multifilesink location=output-%05d.png http://www.gstreamer.net/wiki/MultiFileSink ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Kapil Agrawal
Hi Kapil,
I've seen that project but because I'm working with an ARM embedded system I didn't want to try that, cause I don't know if it will work on my system. Thanks. Carlo Castro 2010/4/9 Kapil Agrawal <[hidden email]>: > Carlos, > > You men you want to store the data that you captured from the webcam ? > you may even like to refer to http://github.com/Elleo/gst-opencv project > incase you intend to use gstreamer and opencv ? > > best > kapil > > On Fri, Apr 9, 2010 at 2:00 PM, Carlos Castro <[hidden email]> > wrote: >> >> Hi everyone, >> >> I'm trying to get a snapshot from a webcam that is continuously >> sending the picture to a GTK+ app using a gtreamer pipeline, so I can >> save that snapshot as a IPLImage, to later use it with OpenCV. >> >> I searched the web to find the answer and I found that I could use a >> gstbuffer to store the frame that gstreamer grabs from the v4l2src, >> but I couldn't get it to work... How do I get the data from the >> pipeline to the buffer? >> >> Thanks, >> Carlos Castro >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > -- > http://www.linkedin.com/in/kapilagrawal > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by lubiao
Hi Lubiao,
Thank you for your reply. I didn't know about the MultiFileSink, but I think I can work with that. But what I would really like, is to access the buffers that hold the current frame data: gst-launch videotestsrc num-buffers=100 ! \ video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ multifilesink ( I'm working in C language using the gstreamer0.10 API.) In this example, if I translate the pipeline to implement in my C code, how can I access this buffers? I don't know how to link them in the pipeline, so I can use them. Thanks, Carlos Castro 2010/4/9 lubiao <[hidden email]>: > On Fri, Apr 9, 2010 at 4:30 PM, Carlos Castro <[hidden email]> wrote: >> Hi everyone, >> >> I'm trying to get a snapshot from a webcam that is continuously >> sending the picture to a GTK+ app using a gtreamer pipeline, so I can >> save that snapshot as a IPLImage, to later use it with OpenCV. >> >> I searched the web to find the answer and I found that I could use a >> gstbuffer to store the frame that gstreamer grabs from the v4l2src, >> but I couldn't get it to work... How do I get the data from the >> pipeline to the buffer? >> >> Thanks, >> Carlos Castro >> > snapshot example > > gst-launch uridecodebin uri=file:///path/to/some/file ! \ > ffmpegcolorspace ! videoscale ! > pngenc snapshot=false ! multifilesink location=output-%05d.png > > http://www.gstreamer.net/wiki/MultiFileSink > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Fri, Apr 9, 2010 at 8:12 PM, Carlos Castro <[hidden email]> wrote:
> Hi Lubiao, > > Thank you for your reply. I didn't know about the MultiFileSink, but I > think I can work with that. > But what I would really like, is to access the buffers that hold the > current frame data: > > gst-launch videotestsrc num-buffers=100 ! \ > video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ > multifilesink > > ( I'm working in C language using the gstreamer0.10 API.) > In this example, if I translate the pipeline to implement in my C > code, how can I access this buffers? I don't know how to link them in > the pipeline, so I can use them. > > Thanks, > Carlos Castro > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html#section-data-probe try, please. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
Carlo,
Try using appsrc, which can feed the buffer data from the pipeline to your opencv application , wher you can convert to IPLImage and use it further. I dont think there should be an issue on arm, although you might even write your own gstream plugins for same. Let me know if you need any more details on gst-opencv best kapil On Fri, Apr 9, 2010 at 5:36 PM, Carlos Castro <[hidden email]> wrote: Hi Kapil, -- http://www.linkedin.com/in/kapilagrawal ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
I'm still a novice with gstreamer, but it sounds like you are basically looking for the same input I want. If you can modify the pipeline you have by adding a tee element to split the stream, you could send one of the tee outputs to the remainder of your pipeline, and use appsink to get at the data stream in the duplicated tee output.
As far as I can tell, the only way to learn about appsink is to download the source gst-plugins-base package and play with the code in tests/examples/app/appsink-scr.c ________________________________________ From: Carlos Castro [[hidden email]] Sent: Friday, April 09, 2010 7:12 AM To: Discussion of the development of GStreamer Subject: Re: [gst-devel] How to create a IPLImage Hi Lubiao, Thank you for your reply. I didn't know about the MultiFileSink, but I think I can work with that. But what I would really like, is to access the buffers that hold the current frame data: gst-launch videotestsrc num-buffers=100 ! \ video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ multifilesink ( I'm working in C language using the gstreamer0.10 API.) In this example, if I translate the pipeline to implement in my C code, how can I access this buffers? I don't know how to link them in the pipeline, so I can use them. Thanks, Carlos Castro 2010/4/9 lubiao <[hidden email]>: > On Fri, Apr 9, 2010 at 4:30 PM, Carlos Castro <[hidden email]> wrote: >> Hi everyone, >> >> I'm trying to get a snapshot from a webcam that is continuously >> sending the picture to a GTK+ app using a gtreamer pipeline, so I can >> save that snapshot as a IPLImage, to later use it with OpenCV. >> >> I searched the web to find the answer and I found that I could use a >> gstbuffer to store the frame that gstreamer grabs from the v4l2src, >> but I couldn't get it to work... How do I get the data from the >> pipeline to the buffer? >> >> Thanks, >> Carlos Castro >> > snapshot example > > gst-launch uridecodebin uri=file:///path/to/some/file ! \ > ffmpegcolorspace ! videoscale ! > pngenc snapshot=false ! multifilesink location=output-%05d.png > > http://www.gstreamer.net/wiki/MultiFileSink > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by lubiao
I was just working on that, the code is attached... Take a look...
2010/4/9 lubiao <[hidden email]>: > On Fri, Apr 9, 2010 at 8:12 PM, Carlos Castro <[hidden email]> wrote: >> Hi Lubiao, >> >> Thank you for your reply. I didn't know about the MultiFileSink, but I >> think I can work with that. >> But what I would really like, is to access the buffers that hold the >> current frame data: >> >> gst-launch videotestsrc num-buffers=100 ! \ >> video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ >> multifilesink >> >> ( I'm working in C language using the gstreamer0.10 API.) >> In this example, if I translate the pipeline to implement in my C >> code, how can I access this buffers? I don't know how to link them in >> the pipeline, so I can use them. >> >> Thanks, >> Carlos Castro >> > > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html#section-data-probe > > try, please. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel gst.c (4K) Download Attachment |
Hi Walter,
yes I think that could work: http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html It says "appsink — Easy way for applications to extract buffers from a pipeline"; that's exactly what I want, thanks. Here I see an implementation of that: http://robot.itcollege.ee/svn/opencv-local/opencv-itcollege/otherlibs/highgui/cvcap_gstreamer.cpp Thanks everyone. Carlos Castro 2010/4/9 Carlos Castro <[hidden email]>: > I was just working on that, the code is attached... Take a look... > > 2010/4/9 lubiao <[hidden email]>: >> On Fri, Apr 9, 2010 at 8:12 PM, Carlos Castro <[hidden email]> wrote: >>> Hi Lubiao, >>> >>> Thank you for your reply. I didn't know about the MultiFileSink, but I >>> think I can work with that. >>> But what I would really like, is to access the buffers that hold the >>> current frame data: >>> >>> gst-launch videotestsrc num-buffers=100 ! \ >>> video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ >>> multifilesink >>> >>> ( I'm working in C language using the gstreamer0.10 API.) >>> In this example, if I translate the pipeline to implement in my C >>> code, how can I access this buffers? I don't know how to link them in >>> the pipeline, so I can use them. >>> >>> Thanks, >>> Carlos Castro >>> >> >> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html#section-data-probe >> >> try, please. >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> > > > > -- > Cumprimentos, > Carlos Castro > -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
Am 09.04.2010 15:45, schrieb Carlos Castro:
> I was just working on that, the code is attached... Take a look... Just for your information - the dataprobe is intended for read only access, you should not modify the buffer content. Stefan > > 2010/4/9 lubiao <[hidden email]>: >> On Fri, Apr 9, 2010 at 8:12 PM, Carlos Castro <[hidden email]> wrote: >>> Hi Lubiao, >>> >>> Thank you for your reply. I didn't know about the MultiFileSink, but I >>> think I can work with that. >>> But what I would really like, is to access the buffers that hold the >>> current frame data: >>> >>> gst-launch videotestsrc num-buffers=100 ! \ >>> video/x-raw-yuv,format=\(I420\),width=320,height=240 ! \ >>> multifilesink >>> >>> ( I'm working in C language using the gstreamer0.10 API.) >>> In this example, if I translate the pipeline to implement in my C >>> code, how can I access this buffers? I don't know how to link them in >>> the pipeline, so I can use them. >>> >>> Thanks, >>> Carlos Castro >>> >> >> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html#section-data-probe >> >> try, please. >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel >> > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
Hi
On 09/04/2010 15:06, Carlos Castro wrote: > I've seen that project but because I'm working with an ARM embedded > system I didn't want to try that, cause I don't know if it will work > on my system. It's work fine for me, on ARM9 board. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |