<div dir="ltr">On Tue, Oct 6, 2015 at 6:21 PM, Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas.dufresne@collabora.com" target="_blank">nicolas.dufresne@collabora.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mardi 06 octobre 2015 à 16:10 -0400, Stirling Westrup a écrit :<br>
> While we have a movie playing to a display, we'd like to have a<br>
> secondary output capturing one frame every second or so, and storing<br>
> it in a jpeg file. In particular, we want each new frame to overwrite<br>
> the last, so that the jpeg file just shows one frame from the last<br>
> second.<br>
><br>
> Does anyone have a suggestion for a good pipeline to accomplish this<br>
> sort of thing?<br>
<br>
</span>If precision is not essential, I would simply use the last-sample<br>
property of the sink with a separate pipeline for encoding. Otherwise,<br>
you way use:<br>
<br>
  ... ! tee name=t<br>
    t. ! videosink<br>
    t. ! videorate drop-only=1 ! video/x-raw,framerate=1/1 \<br>
       ! jpegenc ! filesink location=myfile.jpeg<br>
<br>
"tee" element could have side effects on the performance as it drops<br>
the allocation query.<br>
<span class="HOEnZb"><font color="#888888"></font></span><br></blockquote></div><br></div><div class="gmail_extra">Thanks, but your suggestion is what I tried first. the filesink just keeps appending the new frames to the myfile.jpeg, not overwriting.<br><br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Stirling Westrup<br>Programmer, Entrepreneur.<br><a href="https://www.linkedin.com/e/fpf/77228" target="_blank">https://www.linkedin.com/e/fpf/77228</a><br><a href="http://www.linkedin.com/in/swestrup" target="_blank">http://www.linkedin.com/in/swestrup</a><br><a href="http://technaut.livejournal.com" target="_blank">http://technaut.livejournal.com</a><br><a href="http://sourceforge.net/users/stirlingwestrup" target="_blank">http://sourceforge.net/users/stirlingwestrup</a></div>
</div></div>