GithubHelp home page GithubHelp logo

cam-viewer's Introduction

Cam-viewer

Library installation:

pip install cam-viewer

Functions:

To use the functions, import cam-viewer:

import cam_viewer

Camera playback function:

cam_viewer.playback(command, parameters, cams_json, cam_group, cam_id, use_title, fontfile, custom_title)

The output shows this list: [cam_proc, response]:

  1. cam_proc - the subprocess.Popen() class (Popen)
  2. responce - a line with the result of starting camera playback (string)

Input parameters:

  1. command - main FFMPEG command [ffmpeg, ffplay, ffprobe] (string)
  2. parameters - FFMPEG flags (string)
  3. cams_json - json file containing cameras and their settings, example (json data)
  4. cam_group - camera group (string)
  5. cam_id - camera ID (integer)
  6. use_title - show camera group and camera ID in video output (boolean True/False)
  7. font_file - font file path (string)
  8. custom_title - your custom title (string)

Get camera data function:

cam_viewer.cam_data(cams_json, cam_group, cam_id)

The output shows this list: [cam_url, enabled, response]:

  1. cam_url - camera URL (string)
  2. enabled - is the camera enabled (boolean True/False)
  3. responce - a line with the result of getting camera data (string)

Input parameters:

  1. cams_json - json file containing cameras and their settings, example (json data)
  2. cam_group - camera group (string)
  3. cam_id - camera ID (integer)

Checking camera URL for availability:

cam_viewer.url_available(cam_url)

The output shows this:

  1. available - is the camera available (boolean True/False)

Input parameters:

  1. cam_url - camera URL (string)

Get current time:

cam_viewer.current_time()

The output shows this:

  1. time_str - current time in %H:%M:%S format (string)

Examples of using:

cam-viewer's People

Contributors

vasysik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.