Video Sampler -- sample frames from a video file
Project description
video-sampler
Video sampler allows you to efficiently sample video frames. Currently it uses keyframe decoding, frame interval gating and perceptual hashing to reduce duplicated samples.
Use case: for sampling videos for later annotations used in machine learning.
Installation
pip install -U video-sampler
then you can run
video-sampler --help
Quickstart
video-sampler --help
Benchmarks
Configuration for this benchmark:
SamplerConfig(min_frame_interval_sec=1.0, keyframes_only=True, buffer_size=10, hash_size=X, queue_wait=0.1, debug=True)
Video | Hash size | Decoded | Saved |
---|---|---|---|
Fat Cat Video | 8 | 297 | 278 |
Fat Cat Video | 4 | 297 | 173 |
SmolCat | 8 | 118 | 106 |
SmolCat | 4 | 118 | 62 |
HighLemurs | 8 | 458 | 441 |
HighLemurs | 4 | 458 | 309 |
Flit commands
Build
flit build
Install
flit install
Publish
flit publish
🛡 License
This project is licensed under the terms of the MIT
license. See LICENSE for more details.
📃 Citation
@misc{video-sampler,
author = {video-sampler},
title = {Video sampler allows you to efficiently sample video frames},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/LemurPwned/video-sampler}}
}
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
video_sampler-0.3.0.tar.gz
(11.1 kB
view details)
Built Distribution
File details
Details for the file video_sampler-0.3.0.tar.gz
.
File metadata
- Download URL: video_sampler-0.3.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5621bd877c8628fd0f129dc602d20049f65c676c6491bc995d7f67678b29ea |
|
MD5 | 3acd9faeb766a3e6a3196b187230dd27 |
|
BLAKE2b-256 | 987429f6b4108317634cdba4e6cacc85f0793db7d5020ba78e39512d6eeaa82f |
File details
Details for the file video_sampler-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: video_sampler-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1329c14c59204fd777858c426f31e1b274a8b88571517ed83bb5a7105332a4 |
|
MD5 | 42fa7c90a55c5f468bad41730bb54b73 |
|
BLAKE2b-256 | 4365ebda0e58c2ac13ff199ccb3a93b87f81affea17c74a1a99b5452d56026d6 |