Skip to content

bipy/streamera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streamera

Go Report Card

streamera is a Stream Camera based on TCP, which contains client mode and server mode.

Features

  • Client Mode & Server Mode

    • Client Mode

      Capture camera video and send stream to server side.

    • Server Mode

      Receive tcp stream and display the video to screen, along with network speed and ping.

  • Connection-Error Handle

    • Client Mode

      streamera client will try to reconnect to the server every 3 second when TCP connection is lost. And the maximum buffered size is 180 frames, which is probably up to 6 seconds of the video.

    • Server Mode

      streamera server will continuously serve the incoming tcp connection, but the limit is set up to 1 client at the same time, which means only one video window will be shown during streamera server running.

      To be simple, When current TCP connection is lost, the server will wait for the next incoming connection and start over the video streaming.

  • Encoded Stream

    Use jpeg library to encode each frame instead of the raw RGB stream

  • Speed & Ping Monitoring

    Draw current network speed and ping directly to the video frame.

  • Thread Safe

    streamera uses golang as the main programming language: goroutine, channel and mutex are widely used in streamera. Thus, streamera has high performance and stability while keeping thread safe.

Screenshot

How to Install

streamera requires OpenCV as computer vision library and GoCV as golang bindings.

MacOS

Install OpenCV and pkg-config

brew install opencv pkg-config

Install GoCV

go get -u -d gocv.io/x/gocv

Linux or Windows

Please check Getting Start :: GoCV for more information.

Build

git clone git@github.com:bipy/streamera.git
cd streamera
go build

Usage

Run as server mode on 127.0.0.1:6666:

./streamera -m server

Run as client mode on 127.0.0.1:6666:

./streamera -m client

Specify host & port:

./streamera -m server -h 127.0.0.1 -p 6667
./streamera -m client -h 127.0.0.1 -p 6667

Use the configuration:

./streamera -c config.json

About

Licensed under the Apache 2.0 license. Copyright 2021 bipy.

Logo generated by GopherizeMe