Reputation: 213
I am trying to get a stream from the webcam and then using tee to get two sinks(filesink and autovideosink) so I can visualise the video in a window and in the same time save it into a folder. When I run this command I get only a frozen image in the window and not a video stream. It works with two autovideosinks(I get two windows with two videostreams) so I guess the problem is in the filesink part. The filesink works perfectly alone.
gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
videoconvert ! autovideosink \
t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
x264enc ! mpegtsmux ! filesink location=~/Videos/test1.mp4
Upvotes: 5
Views: 2248
Reputation: 161
Try to add async=0
property to filesink.
gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
videoconvert ! autovideosink \
t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
x264enc ! mpegtsmux ! filesink **async=0** location=~/Videos/test1.mp4
Upvotes: 3