Search code examples
pythonlinuxwebcamvideo-capture

What's the best library for video capture in Python on linux?


I want to write an application to video capture from web-cams in linux. Is there a python library to do that?


Solution

  • You should look at Gstreamer and its Python bindings. Here http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html is some sample code to display video from a webcam. To record the video you would have to change the pipeline definition from autovideosink to an encoder and filesink.