How to capture a still image while previewing live video?
Paul Stuart
Paul_Stuart at seektech.com
Tue Sep 13 16:23:51 PDT 2011
Hi,
We need to simultaneously capture/preview video on a TI DM365 while asynchronously taking JPEG stills from the same video stream. Playing around with gst-launch, it only seems to work correctly when v4l2src num-buffers=1. Sample working pipeline:
gst-launch -v v4l2src num-buffers=1 always-copy=FALSE input-src=composite \
! TIVidResize contiguousInputFrame=TRUE \
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \
! queue \
! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P qValue=75 engineName=codecServer \
! queue \
! filesink location=output.jpg
If I modify the above to remove num-buffers=1, or even just set num-buffers=2, it hangs and never produces a valid JPEG. I would have expected it to just overwrite output.jpg
If, I change this to something that is, for instance, previewing the video at the same time, things break as well. Sample Pipeline:
gst-launch -v v4l2src always-copy=FALSE input-src=composite \
! queue \
! tee name= t \
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \
! tidisplaysink2 video-standard=vga display-output=lcd mmap-buffer=FALSE dma-copy=TRUE \
t. \
! queue \
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \
! videorate \
! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P qValue=75 engineName=codecServer \
! filesink location=output.jpg
Is it possible to create a gstreamer pipeline using "standard" parts to accomplish what I need, or will I need to modify my JPEG encoder element to make this work?
Thanks!
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110913/b74a2343/attachment.htm>
More information about the gstreamer-devel
mailing list