sciveo 0.1.76__tar.gz → 0.1.77__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sciveo-0.1.76 → sciveo-0.1.77}/PKG-INFO +1 -1
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/cli.py +11 -3
- sciveo-0.1.77/sciveo/media/capture/draw.py +81 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/gst_server.py +12 -2
- sciveo-0.1.77/sciveo/version.py +2 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/PKG-INFO +1 -1
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/SOURCES.txt +1 -0
- sciveo-0.1.76/sciveo/version.py +0 -2
- {sciveo-0.1.76 → sciveo-0.1.77}/README.md +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/api/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/api/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/api/predictors.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/api/server.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/api/upload.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/common/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/common/configuration.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/common/model.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/common/optimizers.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/common/sampling.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/content/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/content/dataset.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/content/experiment.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/content/project.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/content/runner.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/db/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/db/read_table.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/cam.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/asteroid.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/base_move.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/circle.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/game.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/geometrics.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/gravity_ball.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/laser.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/rocket.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/space_asteroids.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/games/asteroids/volume_bar.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/motion_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/nvr.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/readers.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/capture/rtsp.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/encoders/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/encoders/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/encoders/normalizer.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/nlp/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/nlp/search.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/time_series/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/time_series/dataset.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/time_series/predictor.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/time_series/trainer.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/ml/time_series/window_generator.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/job_daemon.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/layouts/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/layouts/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/pipeline.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/postprocessors/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/postprocessors/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/postprocessors/default.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/audio/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/audio/audio.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/audio/audio_extractor_process.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/aws.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/file/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/file/archive.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/album.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/album_in_image.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/depth_esimation.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/embeddings.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/filters.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/generators.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/histogram.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/mask.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/object_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/resize.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/segmentation.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/image/watermark.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/media_info.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/nlp/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/nlp/address.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/qr.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/dataset.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/predictor.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/trainer.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/tpu_base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/generators.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/motion_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/resize.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/video_album.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/video_frames.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/video/video_resample.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/queues.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/server.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/web/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/web/server.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/tools/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/tools/video_interactive.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/dataset/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/dataset/object_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/evaluation/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/evaluation/markdown.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/evaluation/object_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/description.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/embeddings.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/object_detection.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/tools.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/images/transformers.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/nlp/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/nlp/embeddings.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/nlp/tokenizers/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/nlp/tokenizers/bpe.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/video/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/ml/video/description.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/monitor.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/power/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/power/ems300.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/power/sim.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/power/tools.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/start.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/watchdog/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/watchdog/base.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/monitoring/watchdog/process.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/network/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/network/camera.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/network/sniffer.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/network/tools.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/array.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/aws/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/aws/priority_queue.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/aws/s3.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/common.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/complexity.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/compress.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/configuration.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/crypto.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/daemon.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/draw/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/draw/contours.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/formating.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/hardware.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/http.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/logger.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/os.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/queue.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/random.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/remote.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/simple_counter.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/synchronized.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/timers.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/tools/totp.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/web/__init__.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo/web/common.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/dependency_links.txt +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/entry_points.txt +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/requires.txt +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/sciveo.egg-info/top_level.txt +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/setup.cfg +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/setup.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_complexity.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_compress.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_configuration.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_crypto.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_eval_markdown.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_ml_datasets.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_monitoring.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_runner.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_sampling.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_tokenizers.py +0 -0
- {sciveo-0.1.76 → sciveo-0.1.77}/test/test_totp.py +0 -0
|
@@ -39,14 +39,15 @@ def main():
|
|
|
39
39
|
parser.add_argument('--auth', type=str, default=config['secret_access_key'], help='Auth secret access key')
|
|
40
40
|
parser.add_argument('--timeout', type=float, default=1.0, help='Timeout')
|
|
41
41
|
parser.add_argument('--net', type=str, default=None, help='Network like 192.168.10.0/24')
|
|
42
|
+
parser.add_argument('--url', type=str, default=None, help='URL')
|
|
42
43
|
parser.add_argument('--host', type=str, default=None, help='Host ip or name')
|
|
43
44
|
parser.add_argument('--port', type=int, default=22, help='Host port number, used for network ops')
|
|
44
45
|
parser.add_argument('--ports', type=str, default="[]", help='Host ports list')
|
|
45
46
|
parser.add_argument('--localhost', type=bool, default=False, help='Add localhost to list of hosts')
|
|
46
47
|
parser.add_argument('--input-path', type=str, default=None, help='Input Path')
|
|
47
48
|
parser.add_argument('--output-path', type=str, default=None, help='Output Path')
|
|
48
|
-
parser.add_argument('--width', type=
|
|
49
|
-
parser.add_argument('--height', type=
|
|
49
|
+
parser.add_argument('--width', type=int, default=None, help='width')
|
|
50
|
+
parser.add_argument('--height', type=int, default=None, help='height')
|
|
50
51
|
parser.add_argument('--fps', type=int, help='FPS')
|
|
51
52
|
parser.add_argument('--stream', type=str, default=None, help='Stream')
|
|
52
53
|
parser.add_argument('--rate', type=int, help='Rate number')
|
|
@@ -101,7 +102,14 @@ def main():
|
|
|
101
102
|
elif args.command == 'rtsp':
|
|
102
103
|
if args.src is None and args.src_id is None:
|
|
103
104
|
from sciveo.media.capture.nvr import RTSPVideoPlayer
|
|
104
|
-
|
|
105
|
+
if args.url is not None:
|
|
106
|
+
url = args.url
|
|
107
|
+
elif args.host is not None and args.stream is not None:
|
|
108
|
+
url = f"rtsp://{args.host}:{args.port}/{args.stream}"
|
|
109
|
+
else:
|
|
110
|
+
warning("Invalid URL")
|
|
111
|
+
return
|
|
112
|
+
player = RTSPVideoPlayer(url)
|
|
105
113
|
player.run()
|
|
106
114
|
else:
|
|
107
115
|
from sciveo.media.capture.gst_server import CamFactory, ColorBarFactory
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Pavlin Georgiev, Softel Labs
|
|
3
|
+
#
|
|
4
|
+
# This is a proprietary file and may not be copied,
|
|
5
|
+
# distributed, or modified without express permission
|
|
6
|
+
# from the owner. For licensing inquiries, please
|
|
7
|
+
# contact pavlin@softel.bg.
|
|
8
|
+
#
|
|
9
|
+
# 2025
|
|
10
|
+
#
|
|
11
|
+
|
|
12
|
+
import cv2
|
|
13
|
+
import numpy as np
|
|
14
|
+
from datetime import datetime
|
|
15
|
+
from sciveo.tools.logger import *
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DrawNone:
|
|
19
|
+
def __call__(self, frame, tag):
|
|
20
|
+
return frame
|
|
21
|
+
|
|
22
|
+
class DrawDateTime:
|
|
23
|
+
def __init__(self, position=(10, 10), color=(255, 255, 255), thickness=3, font_scale_factor=0.001, font=cv2.FONT_HERSHEY_SIMPLEX):
|
|
24
|
+
"""
|
|
25
|
+
position: tuple (x, y) displacement from top-left
|
|
26
|
+
color: BGR tuple
|
|
27
|
+
thickness: line thickness
|
|
28
|
+
font_scale_factor: relative to frame height (0.0015 is reasonable)
|
|
29
|
+
font: cv2 font
|
|
30
|
+
"""
|
|
31
|
+
self.position = position
|
|
32
|
+
self.color = color
|
|
33
|
+
self.thickness = thickness
|
|
34
|
+
self.font = font
|
|
35
|
+
self.font_scale_factor = font_scale_factor
|
|
36
|
+
|
|
37
|
+
def __call__(self, frame, tag):
|
|
38
|
+
"""
|
|
39
|
+
Draws date/time (or custom text) on the frame.
|
|
40
|
+
|
|
41
|
+
frame: np.ndarray
|
|
42
|
+
text: optional text to draw; if None, current date/time is used
|
|
43
|
+
position, color, thickness: optional overrides
|
|
44
|
+
"""
|
|
45
|
+
if frame is None or len(frame.shape) < 2:
|
|
46
|
+
return frame # invalid frame
|
|
47
|
+
|
|
48
|
+
h, w = frame.shape[:2]
|
|
49
|
+
|
|
50
|
+
font_scale = max(0.2, h * self.font_scale_factor)
|
|
51
|
+
|
|
52
|
+
date_text = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
53
|
+
draw_text = f"{tag} {date_text}"
|
|
54
|
+
|
|
55
|
+
# Adjust position to avoid going out of frame
|
|
56
|
+
x = min(max(self.position[0], 0), w - 1)
|
|
57
|
+
y = min(max(self.position[1] + int(font_scale * 20), int(font_scale * 20)), h - 1)
|
|
58
|
+
|
|
59
|
+
cv2.putText(frame, draw_text, (x, y), self.font, font_scale, self.color, self.thickness, cv2.LINE_AA)
|
|
60
|
+
return frame
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
if __name__ == "__main__":
|
|
65
|
+
|
|
66
|
+
cap = cv2.VideoCapture(0)
|
|
67
|
+
drawer = DrawDateTime(tag="test cam", position=(10, 10))
|
|
68
|
+
|
|
69
|
+
while True:
|
|
70
|
+
ret, frame = cap.read()
|
|
71
|
+
if not ret:
|
|
72
|
+
break
|
|
73
|
+
|
|
74
|
+
frame = drawer(frame)
|
|
75
|
+
|
|
76
|
+
cv2.imshow("Frame", frame)
|
|
77
|
+
if cv2.waitKey(1) & 0xFF == ord('q'):
|
|
78
|
+
break
|
|
79
|
+
|
|
80
|
+
cap.release()
|
|
81
|
+
cv2.destroyAllWindows()
|
|
@@ -18,6 +18,7 @@ from gi.repository import Gst, GObject, GstRtspServer, GLib
|
|
|
18
18
|
Gst.init(None)
|
|
19
19
|
|
|
20
20
|
from sciveo.tools.logger import *
|
|
21
|
+
from sciveo.media.capture.draw import *
|
|
21
22
|
from sciveo.media.capture.cam import CameraDaemon
|
|
22
23
|
|
|
23
24
|
|
|
@@ -116,15 +117,24 @@ class ColorBarFactory(RTSPFactoryBase):
|
|
|
116
117
|
|
|
117
118
|
|
|
118
119
|
class CamFactory(ColorBarFactory):
|
|
119
|
-
def __init__(self, cam_id, width, height, fps):
|
|
120
|
+
def __init__(self, cam_id, width, height, fps, list_draw={}):
|
|
120
121
|
super().__init__(width, height, fps)
|
|
121
122
|
self.cam = CameraDaemon(cam_id=cam_id)
|
|
122
123
|
self.cam.start()
|
|
124
|
+
self.list_draw = list_draw
|
|
125
|
+
self.list_draw_processors = {
|
|
126
|
+
"none": DrawNone(),
|
|
127
|
+
"dt": DrawDateTime(),
|
|
128
|
+
}
|
|
123
129
|
|
|
124
130
|
def next_frame(self):
|
|
125
131
|
frame = self.cam.read()
|
|
126
132
|
if frame is None:
|
|
127
133
|
frame = super().next_frame()
|
|
134
|
+
|
|
135
|
+
for k, v in self.list_draw.items():
|
|
136
|
+
self.list_draw_processors.get(k, DrawNone())(frame, v)
|
|
137
|
+
|
|
128
138
|
return frame
|
|
129
139
|
|
|
130
140
|
|
|
@@ -133,5 +143,5 @@ if __name__ == "__main__":
|
|
|
133
143
|
# server = ColorBarFactory(640, 480, 10)
|
|
134
144
|
# server.serve(host="0.0.0.0", port=8554, stream="test")
|
|
135
145
|
|
|
136
|
-
server = CamFactory(0, 640, 480, 30)
|
|
146
|
+
server = CamFactory(0, 640, 480, 30, list_draw={"dt": "cam-test"})
|
|
137
147
|
server.serve(host="0.0.0.0", port=8554, stream="camera")
|
|
@@ -29,6 +29,7 @@ sciveo/db/read_table.py
|
|
|
29
29
|
sciveo/media/__init__.py
|
|
30
30
|
sciveo/media/capture/__init__.py
|
|
31
31
|
sciveo/media/capture/cam.py
|
|
32
|
+
sciveo/media/capture/draw.py
|
|
32
33
|
sciveo/media/capture/gst_server.py
|
|
33
34
|
sciveo/media/capture/motion_detection.py
|
|
34
35
|
sciveo/media/capture/nvr.py
|
sciveo-0.1.76/sciveo/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/audio/audio_extractor_process.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/__init__.py
RENAMED
|
File without changes
|
{sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/predictor.py
RENAMED
|
File without changes
|
{sciveo-0.1.76 → sciveo-0.1.77}/sciveo/media/pipelines/processors/sci/time_series/trainer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|