Suggested PIpeline to capture jpegs from playing movie?

Nicolas Dufresne nicolas.dufresne at collabora.com
Tue Oct 6 15:21:03 PDT 2015


Le mardi 06 octobre 2015 à 16:10 -0400, Stirling Westrup a écrit :
> While we have a movie playing to a display, we'd like to have a
> secondary output capturing one frame every second or so, and storing
> it in a jpeg file. In particular, we want each new frame to overwrite
> the last, so that the jpeg file just shows one frame from the last
> second.
> 
> Does anyone have a suggestion for a good pipeline to accomplish this
> sort of thing?

If precision is not essential, I would simply use the last-sample
property of the sink with a separate pipeline for encoding. Otherwise,
you way use:

  ... ! tee name=t
    t. ! videosink
    t. ! videorate drop-only=1 ! video/x-raw,framerate=1/1 \
       ! jpegenc ! filesink location=myfile.jpeg

"tee" element could have side effects on the performance as it drops
the allocation query.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151006/4d665370/attachment.sig>


More information about the gstreamer-devel mailing list