Opening a webcam which is already in use by a gst-launch
arjen at moonlightmedia.nl
Wed Aug 30 08:41:06 UTC 2017
Yasushi SHOJI-2 wrote
> On Tue, Aug 29, 2017 at 11:07 PM, Arjen Veenhuizen
> > wrote:
>> What one typically would do is write a little app and use a combination
>> tee and appsink:
>> gst-launch-1.0 -e v4l2src device=/dev/webcam ! videoconvert !
>> video/x-raw,width=544,height=288,framerate=10/1 ! v4l2h264enc ! h264parse
>> tee name=t ! mp4mux ! filesink location=video.mp4 t. ! decodebin !
>> videoconvert ! "video/x-raw,format=I420" ! appsink
> Wouldn't it be better to tee right before v4l2h264enc, so that you don't
> have to
> decode the frames you just encoded?
> Unfortunately, the current tee implementation do memcpy(), so if you
> need every single frame, I'd suggest using the "handoff" signal from the
> identity element or pad probes to get the frame you want, copy it
> when you need it.
> If you have plenty of CPU time and memory memory bandwidth, don't
> worry about the above.
> : https://gstreamer.freedesktop.org/documentation/design/probes.html
Ah, yes, off course, put tee before the encoder. Your suggestion to use the
hand-off signal is also a very good one.
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel