Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:54:12+00:00 2026-06-10T05:54:12+00:00

This is python code for capturing streaming video from server. but I need to

  • 0

This is python code for capturing streaming video from server. but I need to write a function to extract one frame from the flow. It will be a button. On click it will show current frame. I have no ideas. Can anyone help me with this???

    self.player = gst.Pipeline("player")
    self.source = gst.element_factory_make("uridecodebin", "video-source")
    #self.source = gst.element_factory_make("playbin2", "video-source")
    sink = gst.element_factory_make("xvimagesink", "video-output")
    colorspace = gst.element_factory_make("ffmpegcolorspace")
    scale = gst.element_factory_make("videoscale")

    self.source.set_property("uri",\
    "http://10.10.25.4:12345/webcam.flv")

    caps = gst.Caps("video/x-raw-yuv, width=640, height=480, framerate=20/1")
    myfilter = gst.element_factory_make("capsfilter", "myfilter")
    myfilter.set_property("caps", caps)  # ################

    clr_sink = colorspace.get_pad("sink")
    self.source.connect("pad-added", self.on_pad_added, clr_sink)

    self.player.add(self.source, colorspace, scale, myfilter, sink)
    gst.element_link_many(colorspace, scale, myfilter, sink)

    self.bus = self.player.get_bus()
    self.bus.add_signal_watch()
    self.bus.connect('message', self.__on_message)

    self.player.set_state(gst.STATE_PLAYING)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:54:14+00:00Added an answer on June 10, 2026 at 5:54 am

    you want to use the imagefreeze element.
    something like:

    #!/usr/bin/python
    
    import pygst
    pygst.require("0.10")
    import gst
    
    player = gst.Pipeline("player")
    source = gst.element_factory_make("videotestsrc", "testsource")
    effect = gst.element_factory_make("clockoverlay", "clock")
    freeze = gst.element_factory_make("imagefreeze", "freeze")
    colorspace = gst.element_factory_make("ffmpegcolorspace", "colorspace")
    sink = gst.element_factory_make("ximagesink", "imagesink")
    
    player.add(source, effect, freeze, colorspace, sink)
    gst.element_link_many(source, effect, freeze, colorspace, sink)
    player.set_state(gst.STATE_PLAYING)
    
    while True:
      inp = raw_input("Press enter:")
      player.set_state(gst.STATE_READY)
      player.set_state(gst.STATE_PLAYING)
    

    whenever you hit “enter” in the console a new screenshot will be taken (from the videotest with clockoverlay) and displayed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

/Users/smcho/Desktop/bracket/[10,20] directory has abc.txt, but when I run this Python code import glob import
Is there a way to write this C/C++ code in Python? a = (b
If i run this Python code: from Tkinter import *; w = Tk(); w.geometry(
I'm trying to convert this Python code to C. But for the life of
I have this Python code to do this: from struct import pack as _pack
Suppose I have this Python code: from itertools import count, tee original = count()
This my python code which is used to perform update operation from reading the
I am getting an error from this Python code: with open('names') as f: names
how good this python code ? need criticism) there is a error in this
I'm looking for the Perl equivalent to this Python code: from sys import stdout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.