Accessing raw data from v4lsrc
Martin Vachovski
Martin.Vachovski at skytek.com
Thu Sep 7 09:57:21 UTC 2017
Hi Simon,
You can do something like:
gst-launch-1.0 -e v4l2src device=/dev/webcam ! videoconvert ! video/x-raw,width=544,height=288,framerate=10/1 ! tee name=tee0 ! queue ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=video.mp4 tee0. ! queue ! appsink
Note
1) the use of the "tee" element to split the pipeline in two branches
2) appsink will let you get data out of the pipeline as a (gchar *) C-array every time a new frame arrives (see the "new-sample" signal)
Hope that helps
?Martin
________________________________
From: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> on behalf of simo zz <simon.zz at yahoo.com>
Sent: Thursday, September 7, 2017 10:26 AM
To: Discussion of the Development of and With GStreamer
Subject: Accessing raw data from v4lsrc
Hello,
I need to generate a video from a USB webcam and, at the same time, access to the non encoded raw data of the webcam.
The following pipe works for me to record a video:
gst-launch-1.0 -e v4l2src device=/dev/webcam ! videoconvert ! video/x-raw,width=544,height=288,framerate=10/1 ! v4l2h264enc ! h264parse ! mp4mux ! filesink location=video.mp4
But how do I get the raw data from webcam with gstreamer ?
Thank you.
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170907/26ca705a/attachment.html>
More information about the gstreamer-devel
mailing list