Skip to main content

moduler multi purpose video player for debugging algorithms in python

Project description

Introduction

CV video player is a Python-based customizable video player that helps computer vision practitioners develop, analyze, and debug their video-related algorithms and models.

The video player is made with simplicity in mind to allow users to easily add or remove functionality. It is only based OpenCV with no additional GUI frameworks, and It's interactivity is based on keyboard presses (no buttons).

The player is designed as a callback system. When initialized the player receives a list of callbacks, each with a edit_frame method. On runtime the callbacks will run in order as specified in the input list. Each callback can also optionally add keyboard shortcuts to change visualization settings in real time.

Installation

pip install cvvideoplayer

Quick Start

from cvvideoplayer import create_video_player
from cvvideoplayer.frame_editors import FrameInfoOverlay, KeyMapOverlay, FitFrameToScreen

VIDEO_OR_FRAME_FOLDER_PATH = "<add local path here>"


def run_player():
    video_player = create_video_player(
        video_source=VIDEO_OR_FRAME_FOLDER_PATH,
        frame_edit_callbacks=[
            FitFrameToScreen(),
            FrameInfoOverlay(),
            KeyMapOverlay(),
        ],
        record=True,
    )

    video_player.run()


if __name__ == "__main__":
    run_player()

In this example, we initiate a very basic video player that will play "example_video.mp4" with added basic frame edit callbacks:

  • FitFrameToScreen: Resizes the frame to fit the screen size
  • FrameInfoOverlay: Prints the current frame number and original frame resolution in the top left corner
  • KeyMapOverlay: prints all optional shortcuts registered by all callbacks

Check out the ./demos folder which shows the use of other cool frame edit callback such as OpticalFlow and DetectionCsvPlotter

See it in action

Running frame by frame

frame_by_frame

Play/Pause and control play speed and direction

playpause

Draw bounding boxes and adjust labels

bboxes

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

cvvideoplayer-1.2.6.tar.gz (80.9 kB view details)

Uploaded Source

Built Distribution

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

cvvideoplayer-1.2.6-py3-none-any.whl (87.4 kB view details)

Uploaded Python 3

File details

Details for the file cvvideoplayer-1.2.6.tar.gz.

File metadata

  • Download URL: cvvideoplayer-1.2.6.tar.gz
  • Upload date:
  • Size: 80.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cvvideoplayer-1.2.6.tar.gz
Algorithm Hash digest
SHA256 d5578e7bff5a68f36cce7e0aa0a3befa797f396be6d5f9f1e2b54d4e2a2e01ec
MD5 6aed9c31accd7a8a5cdb36b3b08eb0bf
BLAKE2b-256 284e0f9e389e05c1c989789cf65f81d58160f03b223d4aa8e62b593a0007b401

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvvideoplayer-1.2.6.tar.gz:

Publisher: publish.yml on danieltomer1/CVVideoPlayer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cvvideoplayer-1.2.6-py3-none-any.whl.

File metadata

  • Download URL: cvvideoplayer-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 87.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cvvideoplayer-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fa91bc65842954c33df54289542185b134ba62456996f6653f7dc650ff7bfca4
MD5 6166aeee8b637ed5be280489cfbd1834
BLAKE2b-256 d5d637085575ccc21f817b7355c51977a5cccf1d3a0e28e20b7f534588a68803

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvvideoplayer-1.2.6-py3-none-any.whl:

Publisher: publish.yml on danieltomer1/CVVideoPlayer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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