Skip to main content

ENOT video processor package for iterating over video frames easily.

Project description

ENOT Video Processor

Package for processing video with pyav package. Provides methods for reading from video and writing modified video frames.

Examples

Reading Only

from enot_vp import VideoProcessor
import numpy as np

with VideoProcessor(input_video=VIDEO_PATH) as vp:
    for frame in vp:
        print(np.mean(frame))

Reading and Writing

# TODO: does it work?
from enot_vp import VideoProcessor
from ultralytics import YOLO

model = YOLO(MODEL_PATH)

with VideoProcessor(input_video=VIDEO_PATH, output_video=OUTPUT_VIDEO_PATH) as vp:
    for frame in vp:
        ndarray = model(frame, imgsz=1600, verbose=False)[0].plot()[..., ::-1]
        vp.put(ndarray)

Writing Only

from enot_vp import VideoProcessor
import cv2, random, numpy as np

# `width`, `height` and `rate` are required arguments here
with VideoProcessor(output_video=OUTPUT_VIDEO_PATH, width=128, height=128, rate=30) as vp:
    for i in range(200):
        vp.put(cv2.circle(
            np.zeros((128,128,3), dtype=np.uint8), 
            (random.randint(20,108), random.randint(20,108)),
            random.randint(5,20),
            (255,255,255),
            -1,
        ))

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enot_vp-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file enot_vp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: enot_vp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for enot_vp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eae952c27f389ed37c6e33d2e77809ae6a87111a9fc6ee485a8a8ebc3e7ad745
MD5 01a1a7d613afbdac0279d3472f2ef935
BLAKE2b-256 cd1bb180dc3d761b1d448585c8b8d27c1b314ae7f71a53f9e92245f183fdf54d

See more details on using hashes here.

Supported by

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