aivclab / streamserver

Python library to stream images/video to a browser or a jupyter notebook

Home Page:https://pypi.org/project/streamserver/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multipart Image HTTP Streaming Server.

Install:

pip install git+git://github.com/aivclab/streamserver.git

Example:

import cv2
import streamserver
cap = cv2.VideoCapture(0)

ret,_ = cap.read()
assert ret == True

with streamserver.StreamServer(JPEG_quality=75,host='localhost',port=5000) as ss:
    while cap.isOpened():
        ret,frame = cap.read()
        ss.set_frame(frame)
        wk = cv2.waitKey(20)
        if wk == ord('q'):
            break
cap.release()

TODO:

  • Multiple streams on same server?

About

Python library to stream images/video to a browser or a jupyter notebook

https://pypi.org/project/streamserver/

License:Apache License 2.0


Languages

Language:Python 79.7%Language:HTML 20.3%