{"id":19442949,"url":"https://github.com/syncom/psfv","last_synced_at":"2025-07-11T03:02:46.618Z","repository":{"id":245654735,"uuid":"816983660","full_name":"syncom/psfv","owner":"syncom","description":"Estimate Baseball/Softball Pitching Speed from Video Clip","archived":false,"fork":false,"pushed_at":"2024-06-24T22:34:04.000Z","size":2023,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T03:45:40.661Z","etag":null,"topics":["pitch-estimation","softball"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syncom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-18T19:22:55.000Z","updated_at":"2024-06-24T22:34:06.000Z","dependencies_parsed_at":"2024-06-23T07:01:37.696Z","dependency_job_id":"b7e28f81-909a-46b1-80a4-a13c6fb7eaa9","html_url":"https://github.com/syncom/psfv","commit_stats":null,"previous_names":["syncom/psfv"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syncom/psfv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Fpsfv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Fpsfv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Fpsfv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Fpsfv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syncom","download_url":"https://codeload.github.com/syncom/psfv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syncom%2Fpsfv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264719228,"owners_count":23653540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pitch-estimation","softball"],"created_at":"2024-11-10T15:41:30.777Z","updated_at":"2025-07-11T03:02:45.447Z","avatar_url":"https://github.com/syncom.png","language":"Go","readme":"# psfv: Estimate Baseball/Softball Pitch Speed from Video Clip\n\n`psfv` (Pitch Speed From Video) is a simple tool to estimate the speed of a\npitched softball or baseball from a video clip (i.e., one that was taken using a\ncell phone's camera), without using more accurate equipment such as\n[PITCHf/x](https://en.wikipedia.org/wiki/PITCHf/x) or a radar gun.\n\n## The methodology\n\nThe `psfv` tool computes the __average velocity__ `v` of a pitched ball, using\nthe simple formula \n\n```text\nv = d / t\n```\n\nwhere `d` and `t` are the distance and duration, respectively, from the ball\nleaves a pitcher's hand until it is above the home plate. Note that our estimate\nis different from and slower than the MLB [velocity\n(VELO)](https://www.mlb.com/glossary/statcast/velocity), which is defined to be\n\"the maximum speed of a given pitch at any point from its release to the time it\ncrosses home plate\" (effectively the speed of the ball at the release point due\nto physics).\n\n## How to use\n\nCurrently, only softball pitch speed estimation is supported. Baseball support\nwill be added in the future.\n\n### Install dependency and `psfv`\n\n`psfv` depends on `ffprobe`, which can be obtained by installing `ffmpeg`.\n\nOn macOS\n\n```bash\nbrew install ffmpeg\n```\n\nOn Ubuntu 24.04 LTS\n\n```bash\nsudo apt install ffmpeg\n```\n\nInstall `psfv`\n\n```bash\ngo install github.com/syncom/psfv@latest\n```\n\n### Prepare the video clip\n\nBefore AI can help us do better, one needs to do the video clip preparation step\nmanually. The manual work here isn't too difficult, yet needs to be performed\ncarefully.\n\nTo obtain the input video clip for `psfv`, load your game footage into a video\neditor supporting video trimming at the frame level. For example, [QuickTime\nPlayer for\nMac](https://support.apple.com/guide/quicktime-player/trim-a-movie-or-clip-qtpf2115f6fd/mac)\ncan be used to do this. Carefully trim the video so that the resulting clip\nstarts at the frame when the ball is released from the pitcher's hand, and end\nat the frame when the ball crosses the home plate. The duration of the video\nclip should be less than 1 second in practical scenarios. A sample prepared\nvideo clip is [pitch_sample_10u.mp4](./testdata/pitch_sample_10u.mp4)\n\n### Run `psfv`\n\nFor softball 10U\n\n```bash\n$ psfv softball --age-group 10u testdata/pitch_sample_10u.mp4 \nDuration of video: 0.636003\nAge group: 10u\nAverage pitch speed: 33.233119 mph (53.483388 kph)\n```\n\nPlease refer to `psfv --help` and `psfv softball --help` for more usage detail.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncom%2Fpsfv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncom%2Fpsfv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncom%2Fpsfv/lists"}