Skip to main content

Live video streaming over network with OpenCV and ZMQ

Project description

imagiz

Fast and none blocking live video streaming over network with OpenCV and ZMQ

Install

pip3 install imagiz

Client

import imagiz
import cv2


client=imagiz.Client("cc1",server_ip="localhost")
vid=cv2.VideoCapture(0)
encode_param = [int(cv2.IMWRITE_JPEG_QUALITY), 90]

while True:
    r,frame=vid.read()
    if r:
        r, image = cv2.imencode('.jpg', frame, encode_param)
        client.send(image)
    else:
        break

Server

import imagiz

server=imagiz.Server()
while True:
    message=server.recive()
    frame=cv2.imdecode(message.image,1)
    cv2.imshow("",frame)
    cv2.waitKey(1)

Client Options

Name Description
client_name Name of client
server_ip Ip of server default value is localhost
server_port Port of server default value is 5555
request_timeout how many milliseconds wait to resend image again
request_retries how many time retries to send an image before client exit
generate_image_id image_id is unique and ordered id that you can use for save data on disk or db also it is show time of image sended by client

Server Options

Name Description
Port Port of server
listener Number of listening threads.default value is 10

Message Class

Name Description
image Byte of image
client_name Name of client
image_id If disable generate_image_id it will be 0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imagiz-0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imagiz-0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file imagiz-0.2.tar.gz.

File metadata

  • Download URL: imagiz-0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for imagiz-0.2.tar.gz
Algorithm Hash digest
SHA256 7d7d1c8d28fe27a3c71a1029b9df8c311143e231710c887cf4d326dc683a4c43
MD5 6b4ed70b2fa39e612a526a7c566533da
BLAKE2b-256 28e78c953c9bf127a4d2363edc67acd0094982cebdf4ac168f8fa3deefff5e9d

See more details on using hashes here.

File details

Details for the file imagiz-0.2-py3-none-any.whl.

File metadata

  • Download URL: imagiz-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/42.0.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for imagiz-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a59a71c5412417e51d0c6b088dfba37674135c61311e218924fe533905b14c82
MD5 0aa527b3fd81c1393cff2bb2134a103a
BLAKE2b-256 d9d394e4cc9535653a593f0196fc294adc719ca8c24f43ca10496b34ad2e4c17

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page