Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: GStreamer capturing video frame

by zentara (Archbishop)
on Oct 12, 2012 at 15:39 UTC ( #998726=note: print w/ replies, xml ) Need Help??


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


Comment on Re: GStreamer capturing video frame
Download Code
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...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998726]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2015-07-02 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls