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(vp.timestamp)
        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.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enot_vp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for enot_vp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6664d956db33ef9d5b6100f690f2549bc32b252380a945d4aa8c0ae9edcdb5ae
MD5 219d3a7d038274ad9910ce00cddffaf8
BLAKE2b-256 ef2c83d455b7aeccc36f5c4e256a5608419a4dd30a66a9bc8f57b12da2ae2ac6

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