Skip to main content

Save stream to disk

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stream_saver_g4-1.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

stream_saver_g4-1.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file stream_saver_g4-1.1.0.tar.gz.

File metadata

  • Download URL: stream_saver_g4-1.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for stream_saver_g4-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3c1c837ce5d03d3c4b6999e82b641517df062e6e2caabb633fa665aacefb41b3
MD5 3d60e7725117f2459368e92f99e1aef3
BLAKE2b-256 18c708817144d5492783d31681b24b2f0abea2fe9ae745f259882acda30acc54

See more details on using hashes here.

File details

Details for the file stream_saver_g4-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stream_saver_g4-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c71bae5bba8637d4bfd73edff0c42f711c2416c686eae83b640baa8cf754e5a7
MD5 e11279ed0635c50909e141dbeaad6a32
BLAKE2b-256 17bddc90d36cb9ffbc1f87e90823132f556f8ec03a91d31b72e05a93a6278b77

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page