🎯 Video Tracker — Physics Analysis
Analyze the motion of any object in a video: set up a coordinate system, calibrate the real-world scale, click on the object frame by frame, and instantly see position-vs-time graphs with optional curve fitting.
Overview
The workflow has four ordered phases. The toolbar mode buttons guide you through them left to right:
Results appear in real time on the right panel: an X(t) graph (red), a Y(t) graph (blue), and a data table. When you are done, export everything as CSV.
1 Load a video
Two ways to open a video file:
- Drag & drop the file anywhere onto the dark video panel.
- Click 📂 Load in the bottom controls bar and pick a file.
Set the frame rate (FPS)
The app defaults to 30 fps. If your video was recorded at a different rate (e.g. 60 fps slow-motion, 120 fps high-speed), change the FPS field in the bottom bar before you start tracking so that time values are correct.
Rotate the video (optional)
If the video was recorded in portrait mode, use ↺ 90° or 90° ↻ to rotate it without affecting the analysis.
2 Set up the coordinate origin
After loading a video the app is in ⚙ Origin mode. A white dot with red/blue dashed axes appears on the video.
- Drag the white dot to the point you want to be (0, 0) in your coordinate system — for example, the launch point of a projectile or a corner of a table.
- Optionally tilt the axes using the Axis° slider (or type an angle) in the top toolbar. This is useful when the surface of motion is not horizontal.
- The red dashed line is the X axis; the blue dashed line is the Y axis (pointing up by default).
3 Calibrate the scale
Calibration converts pixels to real-world units (metres or centimetres). You need a known length visible in the video — a ruler, a metre stick, the length of a table, etc.
- Click 📏 Calibrate in the top toolbar. The status bar changes to "Calibration — click 2 points".
- Click the two ends of the known length on the video. Gold markers (labelled 1 and 2) appear, connected by a dashed line showing the pixel distance.
- A dialog asks for the real-world distance between those two points. Enter the value and select the unit (m or cm) in the top toolbar, then click Confirm.
- The status bar now shows "Scale: X.XX px/m" — calibration is complete.
You can toggle the gold calibration markers on/off with the Cal button in the top toolbar.
4 Track the object
Click 🎯 Track to enter tracking mode.
- Navigate to the first frame where you want to start using the scrubber or ← / → arrow keys.
- Click on the object in the video. A gold dot is placed and the video automatically advances by the number of frames set in the Step field (default: 1 frame).
- Click on the object again in the new frame. Repeat until you reach the last frame of interest.
- The graphs on the right update after every click.
Step size
The Step field (bottom bar) controls how many frames the video skips after each click. Setting Step = 2 halves the number of clicks needed and effectively samples the motion every 2 frames.
Correcting mistakes
- ↶ Undo removes the last tracked point.
- The ✕ button in the data table deletes any individual point.
- 🗑 Clear removes all points and resets calibration (asks for confirmation).
5 Graphs & curve fitting
The right panel shows two live graphs and a data table:
- X(t) — horizontal position vs. time
- Y(t) — vertical position vs. time
Curve fitting
Each graph has a dropdown to overlay a best-fit curve:
| Option | Equation | Use when… |
|---|---|---|
| No fit | — | Exploratory / irregular motion |
| Linear fit | x = a + b·t | Constant-velocity motion |
| Quadratic fit | x = c·t² + b·t + a | Constant acceleration (free fall, projectile) |
Fit coefficients are printed directly on the graph in yellow. For a quadratic Y(t), the a(t²) coefficient equals ½g — compare it with −4.9 m/s² to check your calibration.
Showing / hiding graphs
Use the checkboxes in the graph headers to show or hide individual graphs. When a graph is hidden, its column is also hidden from the data table.
6 Export data (CSV)
- Click ⬇ CSV in the top toolbar.
- A dialog lets you choose which columns to include: Frame #, Time (s), X position, Y position.
- Click Export. The file
tracking_data.csvis downloaded immediately.
The CSV is ready to open in Excel, Google Sheets, Python (pandas), Logger Pro, or any data-analysis software.
x_m or y_cm —
so there is no ambiguity when you open the file later.Video controls reference
| Control | What it does |
|---|---|
| ▶ Play | Play / pause video |
| ■ Stop | Pause and return to trim-start frame |
| ◀◀ (Rewind) | Jump to trim-start frame |
| ↻ Loop | Toggle loop playback between trim points |
| Scrubber bar | Drag to any frame; click to jump |
| ◀ In / In field | Set the trim start to the current frame / type a frame number |
| Out ▶ / Out field | Set the trim end to the current frame / type a frame number |
| Step field | Frames to advance after each tracked click |
| ↺ 90° / 90° ↻ | Rotate the video 90° CCW / CW |
| FPS field | Set the frame rate used for time calculations |
Tips & tricks
Getting accurate results
- Use a slow-motion video (60–240 fps) for fast events like a bouncing ball; set FPS accordingly before loading.
- Keep the camera still during recording. Panning adds a systematic offset to all positions.
- Place the calibration object in the same plane as the motion; otherwise perspective introduces a scale error.
- Use trim points to restrict the scrubber range to only the frames of interest — this makes stepping through faster.
Typical physics experiments
| Experiment | Expected graph shape | Best fit |
|---|---|---|
| Projectile (horizontal) | X(t): straight line | Linear |
| Projectile (vertical) | Y(t): downward parabola | Quadratic |
| Free fall | Y(t): downward parabola; a(t²) ≈ −4.9 m/s² | Quadratic |
| Uniform circular motion | X(t) and Y(t): sinusoidal | No fit |
| Car / constant velocity | X(t): straight line | Linear |
Keyboard shortcuts
| Key | Action |
|---|---|
| Space | Play / Pause |
| → | Advance one frame (when paused) |
| ← | Go back one frame (when paused) |
Shortcuts are disabled while the cursor is inside a text or number input field.