Take frames from video
Project description
kadrovik
Python module for take frames from video
Installation
Package Installation from PyPi
$ pip install kadrovik-g4
Package Installation from Source Code
The source code is available on GitHub.
Download and install the package:
$ git clone https://github.com/Genzo4/kadrovik
$ cd kadrovik
$ pip install -r requirements.txt
$ pip install .
Basic usage
-
Import:
from kadrovik_g4 import Kadrovik
-
Create instance:
Create an instance of the Kadrovik. You can specify additional options:
- video - input video. Default value: ''
- frameN - extract frame number. Default value: 5
- outPath - Path to output frames. Default value: 'frame_%d.png'
kadrovik = Kadrovik(frameN = 5, outPath = 'frames/frame_%d.png')
-
Extract frames
kadrovik.process('input.ts')
See the example.py file for an example of usage.
kadrovik
Python модуль для извлечения кадров из видео.
Установка
Установка пакета с PyPi
$ pip install kadrovik-g4
Установка пакета из исходного кода
Исходный код размещается на GitHub.
Скачайте его и установите пакет:
$ git clone https://github.com/Genzo4/kadrovik
$ cd kadrovik
$ pip install -r requirements.txt
$ pip install .
Использование
-
Подключаем:
from kadrovik_g4 import Kadrovik
-
Создаём экземпляр
Создаём экземпляр Kadrovik. Можно указать дополнительные параметры:
- video - входное видео. Значение по умолчанию: ''
- frameN - номер извлекаемых кадров. Значение по умолчанию: 5
- outPath - имя (и путь) извлекаемых кадров. Используется подстановка %d. Значение по умолчанию: 'frame_%d.png'
kadrovik = Kadrovik(frameN = 5, outPath = 'frames/frame_%d.png')
-
Извлекаем кадры
kadrovik.process('input.ts')
Пример использования см. в файле example.py
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
kadrovik_g4-1.0.0.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file kadrovik_g4-1.0.0.tar.gz
.
File metadata
- Download URL: kadrovik_g4-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da555a24e9412e8173d1893aad7a2f64d3da490b31303e419372cfc889b25ccd |
|
MD5 | fc62e69ec33536e767e8e3efb2d338e2 |
|
BLAKE2b-256 | 4f10aa27449f66dc03f95309834b4afb3bdaacc1fc9fe4e7fe4c290b77bf4cf3 |
File details
Details for the file kadrovik_g4-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: kadrovik_g4-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78e970398065c86e79b24903bb8d3dc35dab6773e4f0092c6b89e09efaa03704 |
|
MD5 | 1527338e5ae9d76fce0cae0307cef244 |
|
BLAKE2b-256 | a5ce9fa41a5c7fa4fe3ce56647fdfa338101f87209b42bc329561fba59d27a82 |