Skip to main content

A Python library that simplifies working with video from soccer matches.

Project description

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

pip install match-video

Usage

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

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!

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 to see how to save or display video clips.

Support

grantwenzinger@gmail.com

License

MIT

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

match_video-0.1.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

match_video-0.1.5-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file match_video-0.1.5.tar.gz.

File metadata

  • Download URL: match_video-0.1.5.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.10 Darwin/24.4.0

File hashes

Hashes for match_video-0.1.5.tar.gz
Algorithm Hash digest
SHA256 54ef822814e13ec15b84298165f694a7d7a0aade53375f823acc596425736419
MD5 c6cc145475fd8573e74dc930b404e8f0
BLAKE2b-256 b636be6295ff74c8a04915e5836a487a59f875598968c00d9ecbd5abece56e05

See more details on using hashes here.

File details

Details for the file match_video-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: match_video-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.10 Darwin/24.4.0

File hashes

Hashes for match_video-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ca3804b2707bc004e238d39401df98a07e9c56ef40ffd9f9609c003ad8afdd
MD5 7fed1e492b92d83a3f9a462216340d36
BLAKE2b-256 1c09866cd5da496c8e301643faf8584fde0aff08d708ed224f49404684014ae1

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