cvvideoplayer


Namecvvideoplayer JSON
Version 1.2.9 PyPI version JSON
download
home_pageNone
Summarymoduler multi purpose video player for debugging algorithms in python
upload_time2024-12-12 11:58:36
maintainerNone
docs_urlNone
authorDaniel Tomer
requires_python>=3.8
licenseNone
keywords opencv video player video player cvvideoplayer computer vision image processing customizable
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="center"><img src=https://github.com/user-attachments/assets/2842b031-0075-454e-b4e4-cfe0e95cb1af width="250"></div>
<div align="center"><img src=https://github.com/user-attachments/assets/e05b0d77-2e67-4b4b-b28f-8a0797dfb169 width="900"></div>


## 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

```python
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
<details>
<summary>Running frame by frame</summary>
    
![frame_by_frame](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/7db8cb8c-0075-416c-9901-aa2f4bb49080)
</details>

<details>
<summary>Play/Pause and control play speed and direction</summary>
    
![playpause](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/fcf38b37-ec9c-4250-8c2f-6f123154c1e4)
</details>

<details>
<summary>Draw bounding boxes and adjust labels</summary>
    
![bboxes](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/0a6e07de-a015-48b4-b510-2c203e0d69f4)
</details>



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cvvideoplayer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "opencv, video, player, video player, cvvideoplayer, computer vision, image processing, customizable",
    "author": "Daniel Tomer",
    "author_email": "danieltomer1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/bb/93d786323908e24aea3fd1b9f254150da64d23e7c9cd14a894bd0aa16d80/cvvideoplayer-1.2.9.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\"><img src=https://github.com/user-attachments/assets/2842b031-0075-454e-b4e4-cfe0e95cb1af width=\"250\"></div>\n<div align=\"center\"><img src=https://github.com/user-attachments/assets/e05b0d77-2e67-4b4b-b28f-8a0797dfb169 width=\"900\"></div>\n\n\n## Introduction\nCV video player is a Python-based customizable video player that helps computer vision practitioners\ndevelop, analyze, and debug their video-related algorithms and models.\n\nThe video player is made with simplicity in mind to allow users to easily add or remove functionality.\nIt is only based OpenCV with no additional GUI frameworks, and\nIt's interactivity is based on keyboard presses (no buttons).\n\nThe player is designed as a callback system. When initialized the player receives a \nlist of callbacks, each with a `edit_frame` method.\nOn runtime the callbacks will run in order as specified in the input list. Each callback can also optionally add \nkeyboard shortcuts to change visualization settings in real time.\n\n## Installation\n`pip install cvvideoplayer`\n\n## Quick Start\n\n```python\nfrom cvvideoplayer import create_video_player\nfrom cvvideoplayer.frame_editors import FrameInfoOverlay, KeyMapOverlay, FitFrameToScreen\n\nVIDEO_OR_FRAME_FOLDER_PATH = \"<add local path here>\"\n\n\ndef run_player():\n    video_player = create_video_player(\n        video_source=VIDEO_OR_FRAME_FOLDER_PATH,\n        frame_edit_callbacks=[\n            FitFrameToScreen(),\n            FrameInfoOverlay(),\n            KeyMapOverlay(),\n        ],\n        record=True,\n    )\n\n    video_player.run()\n\n\nif __name__ == \"__main__\":\n    run_player()\n``` \n\nIn this example, we initiate a very basic video player that will play \"example_video.mp4\" with added basic\nframe edit callbacks:\n- `FitFrameToScreen`: Resizes the frame to fit the screen size\n- `FrameInfoOverlay`: Prints the current frame number and original frame resolution in the top left corner\n- `KeyMapOverlay`: prints all optional shortcuts registered by all callbacks\n\nCheck out the `./demos` folder which shows the use of other cool frame edit callback\nsuch as `OpticalFlow` and `DetectionCsvPlotter`\n## See it in action\n<details>\n<summary>Running frame by frame</summary>\n    \n![frame_by_frame](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/7db8cb8c-0075-416c-9901-aa2f4bb49080)\n</details>\n\n<details>\n<summary>Play/Pause and control play speed and direction</summary>\n    \n![playpause](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/fcf38b37-ec9c-4250-8c2f-6f123154c1e4)\n</details>\n\n<details>\n<summary>Draw bounding boxes and adjust labels</summary>\n    \n![bboxes](https://github.com/danieltomer1/CVVideoPlayer/assets/163285251/0a6e07de-a015-48b4-b510-2c203e0d69f4)\n</details>\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "moduler multi purpose video player for debugging algorithms in python",
    "version": "1.2.9",
    "project_urls": {
        "Homepage": "https://github.com/danieltomer1/CVVideoPlayer"
    },
    "split_keywords": [
        "opencv",
        " video",
        " player",
        " video player",
        " cvvideoplayer",
        " computer vision",
        " image processing",
        " customizable"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f94128ad9c37b8b4093ec0aa7e82d574b7bcee647f9d8a1a22dfc9b170f0465",
                "md5": "142f13491c6ea46b6689341a426e1593",
                "sha256": "c5eb71cd31b974f439afac3e935aa30efd2c7f71200dd782fffddadfd352efce"
            },
            "downloads": -1,
            "filename": "cvvideoplayer-1.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "142f13491c6ea46b6689341a426e1593",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 87489,
            "upload_time": "2024-12-12T11:58:31",
            "upload_time_iso_8601": "2024-12-12T11:58:31.899028Z",
            "url": "https://files.pythonhosted.org/packages/1f/94/128ad9c37b8b4093ec0aa7e82d574b7bcee647f9d8a1a22dfc9b170f0465/cvvideoplayer-1.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "adbb93d786323908e24aea3fd1b9f254150da64d23e7c9cd14a894bd0aa16d80",
                "md5": "73a7a1331766e7b9f22c9ab13083a91f",
                "sha256": "bf4e5147b64ff9b1cb36b1ae0adeed87695e53326966f1a9f3ccea8810a58956"
            },
            "downloads": -1,
            "filename": "cvvideoplayer-1.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "73a7a1331766e7b9f22c9ab13083a91f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 81549,
            "upload_time": "2024-12-12T11:58:36",
            "upload_time_iso_8601": "2024-12-12T11:58:36.044766Z",
            "url": "https://files.pythonhosted.org/packages/ad/bb/93d786323908e24aea3fd1b9f254150da64d23e7c9cd14a894bd0aa16d80/cvvideoplayer-1.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-12 11:58:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "danieltomer1",
    "github_project": "CVVideoPlayer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cvvideoplayer"
}
        
Elapsed time: 0.42466s