Suggested PIpeline to capture jpegs from playing movie?

Nicolas Dufresne nicolas.dufresne at
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.

-------------- 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: <>

More information about the gstreamer-devel mailing list