Python library for viewing cameras
Project description
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_name, cam_number, use_text, fontfile)
The output shows this list: [cam_proc, response]:
cam_proc
- the subprocess.Popen() class (Popen)responce
- a line with the result of starting camera playback (string)
Input parameters:
command
- main FFMPEG command [ffmpeg
,ffplay
,ffprobe
] (string)parameters
- FFMPEG flags (string)cams_json
- json file containing cameras and their settings, example (json data)cam_name
- camera name (string)cam_number
- camera number (integer)use_text
- show camers name and number in video output (boolean True/False)font_file
- font file path (string)
Get camera data function:
cam_viewer.cam_data(cams_json, cam_name, cam_number)
The output shows this list: [cam_url, enabled, response]:
cam_url
- camera URL (string)enabled
- is the camera enabled (boolean True/False)responce
- a line with the result of getting camera data (string)
Input parameters:
cams_json
- json file containing cameras and their settings, example (json data)cam_name
- camera name (string)cam_number
- camera number (integer)
Checking camera URL for availability:
cam_viewer.url_available(cam_url)
The output shows this:
available
- is the camera available (boolean True/False)
Input parameters:
cam_url
- camera URL (string)
Get current time:
cam_viewer.current_time()
The output shows this:
time_str
- current time in%H:%M:%S
format (string)
Examples of using:
- streetcat-console (simple usage)
- streetcat-youtube
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cam_viewer-0.0.2.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file cam_viewer-0.0.2.tar.gz
.
File metadata
- Download URL: cam_viewer-0.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5b1d8c79d9d5e0cdb1c2c2914bbdae65393bcd744c26913fea7e64221acd21e |
|
MD5 | 375df2b6953961de2e1f0179dc6a8139 |
|
BLAKE2b-256 | 43b3cc1087f2cfc984ba5b3387fcab4dfea49418f80fd610d066d9eec04671db |
File details
Details for the file cam_viewer-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: cam_viewer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 531c3b2ee1ebc1a9ef9ab203478de9545cc9e98322003184c134170fcfdd69ae |
|
MD5 | 7b55a34240837764aab2e588776396bc |
|
BLAKE2b-256 | 2cb3ee6dc2d6f3a3c46ce1c74998ac3a01f3c424b28b55bcbefb35810af40387 |