Barbalho12 / kafka-streaming

Presents an example of streaming video with Kafka and Python. Environment configured using Docker (more details see the references section in README).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependencies

  • docker
  • docker-compose
  • python3
  • pip3

Python libs:

  • kafka-python (lib)
  • opencv-python (lib)
  • Flask (lib)

Install libs

pip3 install -r requirements.txt

Running

Terminal 1 Execute Zookeeper and Kafka on Docker

docker-compose up

Terminal 2 Execute consumer script, for receive data frames and show on browser

python consumer.py

Terminal 3 Execute producer passing video sample dummy.mp4 or 0 for camera streaming (if connected)

python producer.py dummy.mp4

Open http://localhost:5000 in Browser

References

About

Presents an example of streaming video with Kafka and Python. Environment configured using Docker (more details see the references section in README).


Languages

Language:Python 100.0%