Guys, tell me what to use? The task is to display the video stream from the ip-camera to the screen. I found several graphic libraries - wxWidgets, PyGTK, tkinter. Which one of these can, or even apply to Pygame?
3 answers
These are GUI libraries. To work with video, use OpenCV.
|
As for the python, I'm not sure, but, as an option, I can offer a FFMpeg + Qt bundle for consideration. The first to capture, the second to play. An example of a simple implementation of the link .
|
To show the video available on a given link, you can use GStreamer:
#!/usr/bin/env python """Play a media file using GStreamer.""" import sys from gi.repository import GObject, Gst Gst.init(None) player = Gst.ElementFactory.make('playbin', None) player.set_property('uri', sys.argv[1]) # file://, http://, etc player.set_state(Gst.State.PLAYING) try: GObject.MainLoop().run() except KeyboardInterrupt: # stop playing on Ctrl-C player.set_state(Gst.State.NULL) Sample code adapted from another answer .
|