Record video at 30fps and images at 1fps simultaneously

Brukernavn complire at hotmail.com
Wed Feb 14 09:16:29 UTC 2018


Hello, 

I'm trying to record both video and take images at the same time through one
gst-launch. It works perfectly using ximagesink to show the videostream at
the same time frames are saved every second. 

gst-launch-1.0 tcamsrc serial=.. !
video/x-bayer,format=bggr,width=1024,height=768 ! capssetter join=false
caps="video/x-bayer,format=gbrg" ! bayer2rgb ! tee name=t t. ! queue !
videoscale ! video/x-raw,framerate=30/1 ! videoconvert ! ximagesink t. !
queue ! videorate ! video/x-raw,framerate=1/1 ! videoconvert ! jpegenc !
multifilesink location=bilder/frame_%04d.jpg 

When I change the filesink to save to mp4 it suddenly stops working. I've
figured the problem out to be the "x264enc" part of the pipeline, as it
stops working when calling this. This is my non-working attempt: 

gst-launch-1.0 tcamsrc num-buffers=40 serial=... !
video/x-bayer,format=bggr,width=1024,height=768 ! capssetter join=false
caps="video/x-bayer,format=gbrg" ! bayer2rgb ! tee name=t t. ! queue !
videoscale ! video/x-raw,framerate=30/1 ! videoconvert ! x264enc ! mp4mux !
filesink location=bilder/test.mp4 t. ! queue ! videorate !
video/x-raw,framerate=1/1 ! videoconvert ! jpegenc ! multifilesink
location=bilder/frame_%04d.jpg 

And for some reason it works fine with avimux, since I then can remove
x264enc. The files become huge (1GB after 2-3 seconds), so this is not an
alternative. 

Does anyone have suggestions on how to fix this? If not, alternatives to mp4
or how to compress the avi files on the go? 

Thank you



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180214/be8518d6/attachment.html>


More information about the gstreamer-devel mailing list