Skip to content

Add getVideoClips() #115

Closed
Closed

Description

@Flosch1006

Type of Addition

Entirely new endpoint

Endpoint Name/Path

/v5/customerapi/matches/{matchId}/videos

Field Details

impectPy 2.7.0 added getVideoClips(). It takes a pre-filtered events dataframe and, for each row, cuts a clip from gameTimeInSec - lead to gameTimeInSec + duration + lag. The match video comes from /v5/customerapi/matches/{matchId}/videos, and the clips are merged into one file. impectR has no equivalent.

New Endpoint Details (if applicable)

  • HTTP Method: GET
  • Proposed R function: getVideoClips(events, output_path, token, lead = 3, lag = 3, target_width = 1920, target_height = 1080, target_fps = 25, warn_above_seconds = 600, host)

API Documentation Reference

No response

Example API Response

No response

Proposed Implementation (Optional)

  • Same behaviour as impectPy 2.7.1:
    • Keep the input row order.
    • Normalize every clip to a common resolution and fps before merging.
    • Skip events whose match video returns HTTP 403, warning once per match.
    • Raise an error only if none of the clips are available.
  • Require ffmpeg on PATH, call it via system2(), and stop early with a clear error message if it isn't found.
  • Document it as an interim solution (client-side cutting), as in impectPy.

Additional Context

Open points

  • /videos isn't listed in the glossary's endpoint documentation. Either document it there or mark it as internal.
  • Decide whether ffmpeg should go under SystemRequirements in DESCRIPTION. CRAN checks must not need ffmpeg, so examples should be wrapped in \dontrun{}.

Activity

  1. Flosch1006 commented on Oct 7, 2026

    @Flosch1006
    CollaboratorAuthor

    Resolved by #121, released in 2.6.0 via #123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions