http://www.perlmonks.org?node_id=998726


in reply to GStreamer capturing video frame

There is a simpler way of doing this. :-)
mplayer -vf screenshot tv:// driver=v4l2:width=800:height=600:device=/ +dev/video0 -fps 15 # and that gave me 800x600 video, and after I pressed 's' i obtained 8 +00x600 in the snapshot. # q to quit # I did the same for 1024x768, 1280x1024, and 1600x1200 and obtained a + 1024x768, # 1280x1024, and 1600x1200 video and snapshot respectively. # or get shots from a video # mplayer -vf screenshot some.avi # use keys # 1 and 2 - Adjust contrast. # 3 and 4 - Adjust brightness. # 5 and 6 - Adjust hue. # 7 and 8 - Adjust saturation.
I know it isn't Perl, but you can run it via Perl's system command. :-)

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: GStreamer capturing video frame
by pablacho (Initiate) on Oct 12, 2012 at 16:12 UTC
    Hi zentara
    thanks for your reply!
    I think that might do the trick, but I don't think that that is a solution for me... this is a PC that will run as an embedded system with no keyboard or mouse (that's why I need that paralell port button I've mentioned).
    I've tried before with ffmpeg (that I think is the base that mplayer uses) and the results were not that good...
    Thanks again for answering! I'll just keep looking!!

    Has anyone been able to set a callback from a pad in GStreamer? I think that through that I might be able to take my picture, but I found absolutely no documentation for Perl :-(
    in c this is made through
     gst_pad_add_probe(GstPad *pad,GstPadProbeType mask,GstPadProbeCallback callback,gpointer user_data,GDestroyNotify destroy_data);
    But i did't found the Perl equivalent...