runrazor 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. runrazor-0.1.2/LICENSE +21 -0
  2. runrazor-0.1.2/PKG-INFO +90 -0
  3. runrazor-0.1.2/README.md +62 -0
  4. runrazor-0.1.2/pyproject.toml +49 -0
  5. runrazor-0.1.2/src/runrazor/__init__.py +17 -0
  6. runrazor-0.1.2/src/runrazor/app/__init__.py +5 -0
  7. runrazor-0.1.2/src/runrazor/app/cli.py +967 -0
  8. runrazor-0.1.2/src/runrazor/app/core.py +336 -0
  9. runrazor-0.1.2/src/runrazor/app/docs.py +163 -0
  10. runrazor-0.1.2/src/runrazor/app/export.py +594 -0
  11. runrazor-0.1.2/src/runrazor/app/gpx_parser.py +61 -0
  12. runrazor-0.1.2/src/runrazor/app/gui.py +4032 -0
  13. runrazor-0.1.2/src/runrazor/app/playback_timeline.py +337 -0
  14. runrazor-0.1.2/src/runrazor/app/projection.py +126 -0
  15. runrazor-0.1.2/src/runrazor/app/reframe_integration.py +158 -0
  16. runrazor-0.1.2/src/runrazor/app/segmentation.py +327 -0
  17. runrazor-0.1.2/src/runrazor/app/video_backends.py +258 -0
  18. runrazor-0.1.2/src/runrazor/app/visualize.py +350 -0
  19. runrazor-0.1.2/src/runrazor/base/__init__.py +31 -0
  20. runrazor-0.1.2/src/runrazor/base/cli_common.py +4 -0
  21. runrazor-0.1.2/src/runrazor/base/cv2_utils.py +44 -0
  22. runrazor-0.1.2/src/runrazor/base/ffmpeg_tools.py +304 -0
  23. runrazor-0.1.2/src/runrazor/base/progress_reporter.py +106 -0
  24. runrazor-0.1.2/src/runrazor/base/timefmt.py +135 -0
  25. runrazor-0.1.2/src/runrazor/compare/__init__.py +6 -0
  26. runrazor-0.1.2/src/runrazor/compare/align.py +165 -0
  27. runrazor-0.1.2/src/runrazor/compare/cli.py +192 -0
  28. runrazor-0.1.2/src/runrazor/compare/engine.py +146 -0
  29. runrazor-0.1.2/src/runrazor/compare/plots.py +122 -0
  30. runrazor-0.1.2/src/runrazor/compare/render.py +235 -0
  31. runrazor-0.1.2/src/runrazor/compare/report.py +129 -0
  32. runrazor-0.1.2/src/runrazor/compare/tag.py +496 -0
  33. runrazor-0.1.2/src/runrazor/compare/trajectory.py +123 -0
  34. runrazor-0.1.2/src/runrazor/compare/turns.py +188 -0
  35. runrazor-0.1.2/src/runrazor/compare/warp.py +182 -0
  36. runrazor-0.1.2/src/runrazor/docs/compare.md +234 -0
  37. runrazor-0.1.2/src/runrazor/docs/reframe.md +185 -0
  38. runrazor-0.1.2/src/runrazor/docs/runrazor.md +264 -0
  39. runrazor-0.1.2/src/runrazor/reframe/__init__.py +8 -0
  40. runrazor-0.1.2/src/runrazor/reframe/blob_features.py +281 -0
  41. runrazor-0.1.2/src/runrazor/reframe/cache_utils.py +142 -0
  42. runrazor-0.1.2/src/runrazor/reframe/cadence.py +49 -0
  43. runrazor-0.1.2/src/runrazor/reframe/config_docs.py +82 -0
  44. runrazor-0.1.2/src/runrazor/reframe/config_types.py +182 -0
  45. runrazor-0.1.2/src/runrazor/reframe/config_utils.py +8 -0
  46. runrazor-0.1.2/src/runrazor/reframe/deshake_utils.py +509 -0
  47. runrazor-0.1.2/src/runrazor/reframe/detection_candidates.py +115 -0
  48. runrazor-0.1.2/src/runrazor/reframe/detection_color.py +76 -0
  49. runrazor-0.1.2/src/runrazor/reframe/detection_geometry.py +45 -0
  50. runrazor-0.1.2/src/runrazor/reframe/detection_preview.py +29 -0
  51. runrazor-0.1.2/src/runrazor/reframe/interactive.py +564 -0
  52. runrazor-0.1.2/src/runrazor/reframe/optimization_utils.py +758 -0
  53. runrazor-0.1.2/src/runrazor/reframe/output_blend.py +66 -0
  54. runrazor-0.1.2/src/runrazor/reframe/parsing_utils.py +65 -0
  55. runrazor-0.1.2/src/runrazor/reframe/payload_utils.py +13 -0
  56. runrazor-0.1.2/src/runrazor/reframe/pins.py +155 -0
  57. runrazor-0.1.2/src/runrazor/reframe/plot_utils.py +78 -0
  58. runrazor-0.1.2/src/runrazor/reframe/profile_mode.py +43 -0
  59. runrazor-0.1.2/src/runrazor/reframe/projection.py +169 -0
  60. runrazor-0.1.2/src/runrazor/reframe/reframe.py +4203 -0
  61. runrazor-0.1.2/src/runrazor/reframe/reframing_utils.py +187 -0
  62. runrazor-0.1.2/src/runrazor/reframe/result_types.py +97 -0
  63. runrazor-0.1.2/src/runrazor/reframe/tracking_stats_utils.py +180 -0
  64. runrazor-0.1.2/src/runrazor/reframe/uncertainty.py +255 -0
  65. runrazor-0.1.2/src/runrazor/reframe/warmup_plan.py +15 -0
  66. runrazor-0.1.2/src/runrazor/reframe/warmup_utils.py +21 -0
runrazor-0.1.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ken Walker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: runrazor
3
+ Version: 0.1.2
4
+ Summary: RunRazor: movement-analysis tools for stationary-camera footage
5
+ Author: Ken Walker
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: End Users/Desktop
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Topic :: Multimedia :: Video
14
+ Classifier: Environment :: Console
15
+ Requires-Dist: gpxpy>=1.6.2
16
+ Requires-Dist: numpy>=2.0
17
+ Requires-Dist: scipy>=1.13
18
+ Requires-Dist: matplotlib>=3.9
19
+ Requires-Dist: click>=8.1
20
+ Requires-Dist: pyside6>=6.8
21
+ Requires-Dist: pyopengl>=3.1.7
22
+ Requires-Dist: python-mpv>=1.0.8
23
+ Requires-Dist: opencv-python>=4.9
24
+ Requires-Dist: click-option-group>=0.5.9
25
+ Requires-Dist: markdown>=3.6
26
+ Requires-Python: >=3.12
27
+ Description-Content-Type: text/markdown
28
+
29
+ # RunRazor
30
+
31
+ Tools for movement analysis from stationary-camera footage.
32
+
33
+ If you film yourself or someone else repeating a course past a fixed camera -- hill repeats, sprints, drills -- RunRazor turns that raw footage into usable clips. It uses the subject's GPS track to find each pass automatically, can crop and follow the subject so they stay framed, and lets you compare runs side by side or export the cuts straight to a video editor.
34
+
35
+ | Command | What it does |
36
+ | --- | --- |
37
+ | `runrazor` | The main app: automatically cut a video using the subject's GPS track, review and tune the cut points, reframe, and export (see `rrdocs runrazor`) |
38
+ | `rrreframe` | Crop and follow a moving subject automatically so they stay framed (see `rrdocs reframe`) |
39
+ | `rrcompare` | Play two runs side by side, lined up in time, to compare them (see `rrdocs compare`) |
40
+ | `rrtag` | Mark matching points in two runs by hand so `rrcompare` can line them up (see `rrdocs compare`) |
41
+ | `rrdocs` | Open the bundled documentation in your browser |
42
+
43
+ ## Environment
44
+
45
+ - Python 3.12
46
+ - `ffmpeg` and `ffprobe` on PATH (used for probing and cutting video)
47
+ - `libmpv` installed on the system for GUI video playback (the GUI still launches without it; see `rrdocs runrazor`)
48
+
49
+ ## Install
50
+
51
+ ```
52
+ pip install runrazor
53
+ ```
54
+
55
+ Documentation is bundled with the package; run `rrdocs` to open it in your browser (`rrdocs reframe` opens a specific page).
56
+
57
+ ## RunRazor
58
+
59
+ The GUI ties it all together: load a video and GPS track, review and tune the cut points against the footage, reframe, and export.
60
+
61
+ ```
62
+ runrazor
63
+ ```
64
+
65
+ See `rrdocs runrazor` for all options, hotkeys, time format, libmpv setup, and examples.
66
+
67
+
68
+ ## Reframe
69
+
70
+ Automatic subject tracking and reframing pipeline. Crops video from a stationary camera to follow a moving subject. You can use this without the RunRazor segmentation.
71
+
72
+ ```
73
+ rrreframe input.mp4
74
+ ```
75
+
76
+ You may get reasonable results without any additional arguments.
77
+
78
+ See `rrdocs reframe` for fine-tuning, deshake, horizon correction, 360 video input, interactive pinning, profile mode, and cache options.
79
+
80
+ ## Split-screen comparison
81
+
82
+ Side-by-side comparison of two ski runs (or one run against its own mirror), phase-locked turn-by-turn. It runs on Reframe outputs: each clip's trajectory sidecar (written by default) drives automatic turn-apex detection, and one clip plays at native speed while the other is retimed per turn segment to stay in sync.
83
+
84
+ ```
85
+ rrreframe runA.mp4 --output a.mp4
86
+ rrreframe runB.mp4 --output b.mp4
87
+ rrcompare a.mp4 b.mp4 -o compare.mp4
88
+ ```
89
+
90
+ The alignment is written to an editable JSON sidecar that you can hand-tweak and re-render. To compare against an external clip that was never reframed (or to fix wrong auto-detected turns), tag its apexes with `rrtag clip.mp4`. See `rrdocs compare` for turn pairing, mirroring, pane fit, retiming, manual tagging, and the alignment JSON.
@@ -0,0 +1,62 @@
1
+ # RunRazor
2
+
3
+ Tools for movement analysis from stationary-camera footage.
4
+
5
+ If you film yourself or someone else repeating a course past a fixed camera -- hill repeats, sprints, drills -- RunRazor turns that raw footage into usable clips. It uses the subject's GPS track to find each pass automatically, can crop and follow the subject so they stay framed, and lets you compare runs side by side or export the cuts straight to a video editor.
6
+
7
+ | Command | What it does |
8
+ | --- | --- |
9
+ | `runrazor` | The main app: automatically cut a video using the subject's GPS track, review and tune the cut points, reframe, and export (see `rrdocs runrazor`) |
10
+ | `rrreframe` | Crop and follow a moving subject automatically so they stay framed (see `rrdocs reframe`) |
11
+ | `rrcompare` | Play two runs side by side, lined up in time, to compare them (see `rrdocs compare`) |
12
+ | `rrtag` | Mark matching points in two runs by hand so `rrcompare` can line them up (see `rrdocs compare`) |
13
+ | `rrdocs` | Open the bundled documentation in your browser |
14
+
15
+ ## Environment
16
+
17
+ - Python 3.12
18
+ - `ffmpeg` and `ffprobe` on PATH (used for probing and cutting video)
19
+ - `libmpv` installed on the system for GUI video playback (the GUI still launches without it; see `rrdocs runrazor`)
20
+
21
+ ## Install
22
+
23
+ ```
24
+ pip install runrazor
25
+ ```
26
+
27
+ Documentation is bundled with the package; run `rrdocs` to open it in your browser (`rrdocs reframe` opens a specific page).
28
+
29
+ ## RunRazor
30
+
31
+ The GUI ties it all together: load a video and GPS track, review and tune the cut points against the footage, reframe, and export.
32
+
33
+ ```
34
+ runrazor
35
+ ```
36
+
37
+ See `rrdocs runrazor` for all options, hotkeys, time format, libmpv setup, and examples.
38
+
39
+
40
+ ## Reframe
41
+
42
+ Automatic subject tracking and reframing pipeline. Crops video from a stationary camera to follow a moving subject. You can use this without the RunRazor segmentation.
43
+
44
+ ```
45
+ rrreframe input.mp4
46
+ ```
47
+
48
+ You may get reasonable results without any additional arguments.
49
+
50
+ See `rrdocs reframe` for fine-tuning, deshake, horizon correction, 360 video input, interactive pinning, profile mode, and cache options.
51
+
52
+ ## Split-screen comparison
53
+
54
+ Side-by-side comparison of two ski runs (or one run against its own mirror), phase-locked turn-by-turn. It runs on Reframe outputs: each clip's trajectory sidecar (written by default) drives automatic turn-apex detection, and one clip plays at native speed while the other is retimed per turn segment to stay in sync.
55
+
56
+ ```
57
+ rrreframe runA.mp4 --output a.mp4
58
+ rrreframe runB.mp4 --output b.mp4
59
+ rrcompare a.mp4 b.mp4 -o compare.mp4
60
+ ```
61
+
62
+ The alignment is written to an editable JSON sidecar that you can hand-tweak and re-render. To compare against an external clip that was never reframed (or to fix wrong auto-detected turns), tag its apexes with `rrtag clip.mp4`. See `rrdocs compare` for turn pairing, mirroring, pane fit, retiming, manual tagging, and the alignment JSON.
@@ -0,0 +1,49 @@
1
+ [project]
2
+ name = "runrazor"
3
+ version = "0.1.2"
4
+ description = "RunRazor: movement-analysis tools for stationary-camera footage"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "Ken Walker" }]
10
+ classifiers = [
11
+ "Development Status :: 3 - Alpha",
12
+ "Intended Audience :: End Users/Desktop",
13
+ "Operating System :: OS Independent",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Topic :: Multimedia :: Video",
17
+ "Environment :: Console",
18
+ ]
19
+ dependencies = [
20
+ "gpxpy>=1.6.2",
21
+ "numpy>=2.0",
22
+ "scipy>=1.13",
23
+ "matplotlib>=3.9",
24
+ "click>=8.1",
25
+ "PySide6>=6.8",
26
+ "PyOpenGL>=3.1.7",
27
+ "python-mpv>=1.0.8",
28
+ "opencv-python>=4.9",
29
+ "click-option-group>=0.5.9",
30
+ "markdown>=3.6",
31
+ ]
32
+
33
+ [project.scripts]
34
+ runrazor = "runrazor.app.cli:main"
35
+ rr = "runrazor.app.cli:main"
36
+ rrreframe = "runrazor.reframe.reframe:main"
37
+ rrcompare = "runrazor.compare.cli:main"
38
+ rrtag = "runrazor.compare.tag:main"
39
+ rrdocs = "runrazor.app.docs:main"
40
+
41
+ [dependency-groups]
42
+ dev = [
43
+ "pytest>=8.0",
44
+ "ruff>=0.4",
45
+ ]
46
+
47
+ [build-system]
48
+ requires = ["uv_build>=0.11.8,<0.12.0"]
49
+ build-backend = "uv_build"
@@ -0,0 +1,17 @@
1
+ """RunRazor package.
2
+
3
+ Kept import-light on purpose: importing ``runrazor`` (or any submodule) must not
4
+ eagerly pull in the CLI/GUI/domain layer, so the base <- reframe <- compare <- app
5
+ layering holds. Entry points reference module paths (e.g. ``runrazor.app.cli:main``)
6
+ directly.
7
+ """
8
+
9
+ from importlib.metadata import PackageNotFoundError, version
10
+
11
+ try:
12
+ __version__ = version("runrazor")
13
+ except PackageNotFoundError: # running from a source tree without install metadata
14
+ __version__ = "0.0.0+unknown"
15
+
16
+ del version, PackageNotFoundError
17
+
@@ -0,0 +1,5 @@
1
+ """App layer: GPX/segmentation domain, export pipeline, CLI, and GUI.
2
+
3
+ Top of the dependency graph (base <- reframe <- compare <- app). Modules here may
4
+ import from base, reframe, and compare.
5
+ """