[gst-devel] Problems getting a snapshot from a running videostream, please help

Fredrik Persson frepe at bredband.net
Sat May 27 14:37:02 CEST 2006

I'm trying to write a small app that shall display a videostream, and a 
snapshot button. If the user clicks the button, a single frame from the 
videostream shall be grabbed and displayed to the user.

For this I have written a small glade/gtk/gstreamer/python app, that does not 
work as it should; the video stream freezes when the user clicks the snapshot 

Here is the python program: http://pastebin.com/741807
It needs this .glade-file: http://pastebin.com/741810

The general idea is this: create a pipeline with some video source and some 
videosink and a tee element in between those. Then, at the click, attach a 
colorspace-pngenc-filesink to the tee. The pngenc will send a EOS signal when 
it has encoded one frame, putting us in the eos handler. In that handler, the 
colorspace-pngenc-filesink shall be removed and the image shall be displayed 
to the user. 

Save both files from pastebin in the same directory, and name the glade 
file "small_gui.glade". Then run the program with "python small_gui.py" and 
click on the snapshot button. The video stream will freeze. (There are other 
errors too...) I cannot, for my life, understand how to make the videostream 
continue. I've tried to solve this problem for almost two days.

Any help is greatly appreciated!

Best regards,

Fredrik Persson

More information about the gstreamer-devel mailing list