Giter Club home page Giter Club logo

kombu-video-streaming's Introduction

Kombu/RabbitMQ-based Video Streaming

This repo includes a simple program that shows how to deliver a video stream using Kombu and RabbitMQ in real-time, with an assumption that the sender and the receiver reside in the same computer system.

RabbitMQ is an open-source message broker.

Kombu is a python-based messaging library that can use RabbitMQ as a transport.

Requirements

  1. Install RabbitMQ and run the server.

    • Installation guides for difference OS systems including Linux, Windows and Mac OS X are available at https://www.rabbitmq.com/download.html. On Mac OS X, you can install RabbitMQ and run the servcer as a service as follows.
      brew install rabbitmq
      brew services start rabbitmq
      
    • After starting the server, you can access the server monitoring panel at http://localhost:15672
  2. Install Kombu

  3. Install OpenCV and Python Wrapper.

Run the program

  1. Clone this repository and cd into the repository folder.
    git clone https://github.com/zebehn/kombu-video-streaming.git
    cd kombu-video-streaming
    
  2. Run the video stream consumer. As there is no message published yet, it just hangs around.
    python video_consumer.py
    
  3. Run the video stream producer. You will see the webcam lights on, a window pops up and shows a video stream captured by your webcam if successful.
    python video_producer.py
    

Speeding Up Message Delivery

  • Set the delivery_mode of Kombu's Exchange object to 1, which sets it to a transient mode that does not write message data to disk.
  • Shrink image size. With my system, the original webcam image size is 1280x720, and when I resized it to 768x432, I got real-time delivery (29fps publish, 29 delivery, 29 consumer acks, 0 unacked, 0 disk writes)

Getting Help

If you have any suggestions, bug reports or problems, please report them to the issue tracker.

Contributing

You are highly encouraged to improve, refactor or add your idea to this program. Just make pull requests!

License

This software is licensed under the New BSD-3 License. See the LICENSE file in the top distribution directory for the full license text.

kombu-video-streaming's People

Contributors

zebehn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kombu-video-streaming's Issues

IP Camera

i replaced webcam 0 with network ip, it didnt work

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.