Python library for connecting to m3u8 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_group, cam_id, use_title, fontfile, custom_title)
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_group
- camera group (string)cam_id
- camera ID (integer)use_title
- show camera group and camera ID in video output (boolean True/False)font_file
- font file path (string)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]:
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_group
- camera group (string)cam_id
- camera ID (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.3.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file cam_viewer-0.0.3.tar.gz
.
File metadata
- Download URL: cam_viewer-0.0.3.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 | 742a9fe2acd46709fd29fc85e1c0fa21008079630626dd1bfbae14c945fde93d |
|
MD5 | 1b0dba8045a5b5d46980ad3042d5ce91 |
|
BLAKE2b-256 | 12d5b3e21d5a13f667387c89efa2604f1ac6af8d232ac34635525239658381c3 |
File details
Details for the file cam_viewer-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: cam_viewer-0.0.3-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 | 6c603a81c7db09fb3e3a8a5fcdc3826a32dd9a8a542c58518d2141b40b4195da |
|
MD5 | 3252d5bafe1df3e0f1bc5f6654cf0bdb |
|
BLAKE2b-256 | e101892e24444eb3c4fba634ce49b52ed394e13f3e62b02a64b5bc5a03e75d17 |