Giter Site home page Giter Site logo

python-opencv-gstreamer-examples's Introduction

python-opencv-gstreamer-examples

Python examples for grabbing video devices (e.g. webcam, video, ...) and interacting with GStreamer (Shared Memory, RTP Stream).

  • Preliminars for Ubuntu 16.04.4 LTS
    • Install GStreamer (apt-get install gstreamer1.0* libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev libgstreamer1.0 libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev)
    • optional FFMPEG, QT
    • Build OpenCV > 3 without gstreamer 0.10 support: -D WITH_GSTREAMER=ON -D WITH_GSTREAMER_0_10=OFF

Usage

  • Test if installation was successful: gst-launch-1.0 v4l2src ! xvimagesink. You should see your webcam's image.

  • gst_device_to_shm grabs the VideoCapture(0) and puts the raw image in a shared memory. Mind here to define your own webcam properties.

  • gst_shm_to_app grabs the shared memory frame from gst_device_to_shm and pipes it to a VideoCapture.

  • gst_device_to_rtp grabs the VideoCapture(0),encodes the frame and streams it to rtp://localhost:5000

  • gst_shm_to_rtp grabs the shared memory frame from gst_device_to_shm ,encodes the frame and streams it to rtp://localhost:5000.

Further informations

Inspired by https://github.com/tik0/mat2gstreamer

python-opencv-gstreamer-examples's People

Contributors

mad4ms avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.