Skip to main content

Language

Stream saver

PyPI PyPI - License PyPI - Python Version

Python module for save stream to disk


Installation

Package Installation from PyPi

$ pip install stream-saver-g4

Package Installation from Source Code

The source code is available on GitHub.
Download and install the package:

$ git clone https://github.com/Genzo4/stream_saver
$ cd stream_saver
$ pip install -r requirements.txt
$ pip install .

Basic usage

  • Import:

from stream_saver_g4 import StreamSaver
  • Create instance:

Create an instance of the StreamSaver. You can specify additional options:

  • stream_URL - Stream URL. Default value: ''
  • output_template - Output template. Default value: 'output_%Y-%m-%d_%H-%M-%S.ts'
  • segment_time - Segment length. Default value: '01:00:00'
stream = StreamSaver(stream_URL='rtsp://cam_1.local:554/live1.sdp',
                     output_template='output_%H-%M-%S.ts',
                     segment_time='00:30:00'
                     )
  • Run saving stream

Stream saving is running in the background.

stream.run()
  • Stop saving stream

stream.stop()

Changelog


Language

Stream saver

PyPI PyPI - License PyPI - Python Version

Python модуль для сохранения видеопотока на диск.


Установка

Установка пакета с PyPi

$ pip install stream-saver-g4

Установка пакета из исходного кода

Исходный код размещается на GitHub.
Скачайте его и установите пакет:

$ git clone https://github.com/Genzo4/stream_saver
$ cd stream_saver
$ pip install -r requirements.txt
$ pip install .

Использование

  • Подключаем:

from stream_saver_g4 import StreamSaver
  • Создаём экземпляр

Создаём экземпляр StreamSaver. Можно указать дополнительные параметры:

  • stream_URL - адрес потока. Значение по умолчанию: ''
  • output_template - шаблон выходных файлов. Значение по умолчанию: 'output_%Y-%m-%d_%H-%M-%S.ts'
  • segment_time - длина одного сегмента. Значение по умолчанию: '01:00:00'
stream = StreamSaver(stream_URL='rtsp://cam_1.local:554/live1.sdp',
                     output_template='output_%H-%M-%S.ts',
                     segment_time='00:30:00'
                     )
  • Запускаем сохрание потока

Сохранение потока идёт в фоновом режиме.

stream.run()
  • Останавливаем сохранение потока

stream.stop()

Changelog

Release files for stream-saver-g4 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stream-saver-g4 1.1.0
File Size Uploaded
stream_saver_g4-1.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stream-saver-g4 1.1.0
File Interpreter ABI Platform
stream_saver_g4-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / stream_saver_g4-1.1.0.tar.gz

Download URL stream_saver_g4-1.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3c1c837ce5d03d3c4b6999e82b641517df062e6e2caabb633fa665aacefb41b3
BLAKE2b-256 checksum
How to use checksums
18c708817144d5492783d31681b24b2f0abea2fe9ae745f259882acda30acc54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / stream_saver_g4-1.1.0-py3-none-any.whl

Download URL stream_saver_g4-1.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c71bae5bba8637d4bfd73edff0c42f711c2416c686eae83b640baa8cf754e5a7
BLAKE2b-256 checksum
How to use checksums
17bddc90d36cb9ffbc1f87e90823132f556f8ec03a91d31b72e05a93a6278b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page