match-video


Namematch-video JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://gitlab.com/grantwenzinger/match-video
SummaryA Python library that simplifies working with video from soccer matches.
upload_time2023-10-09 23:16:56
maintainer
docs_urlNone
authorGrant Wenzinger
requires_python>=3.9.0,<4.0.0
license
keywords soccer football match video
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Match Video

This is a Python library that simplifies working with video from soccer matches. It allows match video to be selected intuitively by period number and clock, instead of absolute video time.

To accomplish this the start of each period is set as a chapter in the match video's metadata. Clips from the video can then be selected by period number and clock. ffmpeg handles both reading and writing the video chapter metadata and clip selection.

## Installation

### Requirements
- Python 3.9 or newer
- [ffmpeg](https://ffmpeg.org)

```shell
pip install match-video
```

## Usage

Before the video can be used, the start time of each half needs to be set.

```shell
match-video set-half-starts path/to/video.mp4 0:04 63:20
```

Then it is easy to select match video by period and clock!

```python
import match_video as mv

# get the third minute of the match
clip = mv.get_clip("path/to/video.mp4", period=1, start_clock=180, end_clock=240)

# get the start of each half and concatenate them
clip_clocks = [
    {"period": 1, "start_clock": 0, "end_clock": 30},
    {"period": 2, "start_clock": 0, "end_clock": 30},
]
clips = mv.get_clips("path/to/video.mp4", clip_clocks)
```

See the [examples](https://gitlab.com/grantwenzinger/match-video/-/tree/main/examples) to see how to save or display video clips.

## Support

<grantwenzinger@gmail.com>

## License

[MIT](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/grantwenzinger/match-video",
    "name": "match-video",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "soccer,football,match,video",
    "author": "Grant Wenzinger",
    "author_email": "grantwenzinger@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/88/9c/957b65f5be7182bd83aa6a3157de87408f0912c8c82fe27b6da05c0af9f3/match-video-0.1.2.tar.gz",
    "platform": null,
    "description": "# Match Video\n\nThis is a Python library that simplifies working with video from soccer matches. It allows match video to be selected intuitively by period number and clock, instead of absolute video time.\n\nTo accomplish this the start of each period is set as a chapter in the match video's metadata. Clips from the video can then be selected by period number and clock. ffmpeg handles both reading and writing the video chapter metadata and clip selection.\n\n## Installation\n\n### Requirements\n- Python 3.9 or newer\n- [ffmpeg](https://ffmpeg.org)\n\n```shell\npip install match-video\n```\n\n## Usage\n\nBefore the video can be used, the start time of each half needs to be set.\n\n```shell\nmatch-video set-half-starts path/to/video.mp4 0:04 63:20\n```\n\nThen it is easy to select match video by period and clock!\n\n```python\nimport match_video as mv\n\n# get the third minute of the match\nclip = mv.get_clip(\"path/to/video.mp4\", period=1, start_clock=180, end_clock=240)\n\n# get the start of each half and concatenate them\nclip_clocks = [\n    {\"period\": 1, \"start_clock\": 0, \"end_clock\": 30},\n    {\"period\": 2, \"start_clock\": 0, \"end_clock\": 30},\n]\nclips = mv.get_clips(\"path/to/video.mp4\", clip_clocks)\n```\n\nSee the [examples](https://gitlab.com/grantwenzinger/match-video/-/tree/main/examples) to see how to save or display video clips.\n\n## Support\n\n<grantwenzinger@gmail.com>\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python library that simplifies working with video from soccer matches.",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://gitlab.com/grantwenzinger/match-video",
        "Repository": "https://gitlab.com/grantwenzinger/match-video"
    },
    "split_keywords": [
        "soccer",
        "football",
        "match",
        "video"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c6a04c712990f3e9a0e2d405c5ec79abf9166ce22dd21231f2f7e03752815bd",
                "md5": "9bcc4019137e5472bcb3477ea2e4100e",
                "sha256": "e3b3f6fa9f333a104a2c732b5564c4e7dff3190f5dc8f685b9aacc6f17f1f675"
            },
            "downloads": -1,
            "filename": "match_video-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9bcc4019137e5472bcb3477ea2e4100e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0,<4.0.0",
            "size": 6990,
            "upload_time": "2023-10-09T23:16:58",
            "upload_time_iso_8601": "2023-10-09T23:16:58.445892Z",
            "url": "https://files.pythonhosted.org/packages/4c/6a/04c712990f3e9a0e2d405c5ec79abf9166ce22dd21231f2f7e03752815bd/match_video-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "889c957b65f5be7182bd83aa6a3157de87408f0912c8c82fe27b6da05c0af9f3",
                "md5": "76262a085447d7691a9f665af5d3eee5",
                "sha256": "1ee9e1f624fc1418574251c99427021ce0f99bafe57b435580dfd67afccdfbdb"
            },
            "downloads": -1,
            "filename": "match-video-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "76262a085447d7691a9f665af5d3eee5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0,<4.0.0",
            "size": 6699,
            "upload_time": "2023-10-09T23:16:56",
            "upload_time_iso_8601": "2023-10-09T23:16:56.935595Z",
            "url": "https://files.pythonhosted.org/packages/88/9c/957b65f5be7182bd83aa6a3157de87408f0912c8c82fe27b6da05c0af9f3/match-video-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-09 23:16:56",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "grantwenzinger",
    "gitlab_project": "match-video",
    "lcname": "match-video"
}
        
Elapsed time: 0.12474s