https://github.com/akmamun/live-stream-zeromq
Distributed Live Streaming with ZeroMQ, Flask and Socket Connection
https://github.com/akmamun/live-stream-zeromq
flask opencv-python python socket-communication streaming streaming-video zeromq
Last synced: 3 months ago
JSON representation
Distributed Live Streaming with ZeroMQ, Flask and Socket Connection
- Host: GitHub
- URL: https://github.com/akmamun/live-stream-zeromq
- Owner: akmamun
- Created: 2019-02-25T20:53:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-21T04:51:56.000Z (over 4 years ago)
- Last Synced: 2025-04-15T02:40:14.653Z (6 months ago)
- Topics: flask, opencv-python, python, socket-communication, streaming, streaming-video, zeromq
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 28
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Distributed Live Streaming with ZeroMQ and Flask Socket Connection
```python
pip install requirements.txt```
### Run Server
```python
python main.py
```
```python
python client.py
```
### Now Browse
- [http://127.0.0.1:5000/](http://127.0.0.1:5000/)#### Use Built-in Webcam of Laptop
##### Put Zero (O) in cv2.VideoCapture(0)
```python
cv2.VideoCapture(0)
```
#### Use Ip Camera/CCTV/RTSP Link
```python
cv2.VideoCapture('rtsp://username:password@camera_ip_address:554/user=username_password='password'_channel=channel_number_stream=0.sdp')```
#### Example RTSP Link
```python
cv2.VideoCapture('rtsp://mamun:123456@101.134.16.117:554/user=mamun_password=123456_channel=0_stream=0.sdp')```
#### Change Channel Number to Change the Camera
```python
cv2.VideoCapture('rtsp://mamun:123456@101.134.16.117:554/user=mamun_password=123456_channel=1_stream=0.sdp')```
#### Display the resulting frame in browser
```python
cv2.imencode('.jpg', frame)[1].tobytes()```