Audit video display geometry
Use this skill when someone preparing a video demonstration asks why a file reported as landscape appears portrait, or why its pixel dimensions disagree with its visible proportions. The result is a metadata audit, not a claim that a particular player or projector obeyed the metadata.
Run the bundled helper on an existing local ffprobe report. It reads one JSON file, prints a JSON report and never changes the input or video. It does not open network URLs, invoke ffmpeg, install software or execute anything from metadata.
python scripts/audit_geometry.py probe.json
To run the synthetic self-checks:
python scripts/test_audit_geometry.py
If no report exists and ffprobe is already available, offer this read-only command for a user-selected local file. Use a new output path, preserving any existing report. Do not install a tool or silently fetch a remote media URL.
ffprobe -v error -select_streams V -show_streams -of json -i ./chosen-local-video.mp4 -o ./new-probe.json
The capital V excludes attached pictures. Keep the ffprobe version and the media filename in the user's own working notes; the helper emits only a SHA-256 of its JSON input, not an absolute filesystem path. That hash identifies the report, not the original media file.
Read the result in this order
reportedRasteris the stream'swidthbyheight, not a guarantee of screen geometry. The helper does not substitutecoded_width, which may include codec padding.sampleAspectis a positive exact rational. Missing, zero, malformed andN/Avalues remain unknown; the helper never silently replaces them with square pixels.unrotatedDisplayAspect = width / height × sampleAspect. The result stays an exact reduced fraction.rotationDegreescomes only from aDisplay Matrixside-data item with a numericrotation. An exact quarter-turn exchanges the display axes, so 90° or 270° makes the aspect reciprocal; 0° and 180° preserve it.modelDisplayAspectis conditional on a pure quarter-turn display model. It does not validate the complete transform matrix, clean aperture, mirroring, a player override or the final HDMI output. If no rotation metadata is reported, the model uses zero and says so explicitly.
Legacy tags.rotate is not silently merged with modern side data: their conventions can differ. Its presence is a review flag and blocks the oriented prediction. Non-quarter angles, multiple display matrices, malformed side data and a matrix without a rotation value also give an indeterminate result. This conservative boundary avoids guessing how the player will combine metadata.
Exit status 0 means every selected stream fit the limited mathematical model. It is not a playback pass. Status 1 means at least one stream needs review, or there was no applicable video stream. Status 2 means the input could not be read or parsed. The JSON lists concrete issue codes in each stream.
Worked controls
These are synthetic inputs, not measurements of a product.
| Reported raster | SAR | Rotation | Unrotated display aspect | Quarter-turn model |
|---|---|---|---|---|
| 1920 × 1080 | 1:1 | -90° | 16:9 | 9:16 |
| 720 × 576 | 16:15 | absent | 4:3 | 4:3, assuming no unreported transform |
| 720 × 576 | 64:45 | 90° | 16:9 | 9:16 |
| 1920 × 1080 | missing | 0° | indeterminate | indeterminate |
Do not “correct” 720 × 576 to a guessed widescreen size merely because it looks unfamiliar. The two 720 × 576 rows show why dimensions alone cannot settle the intended shape. Equally, a computed 9:16 does not prove that a player applied the rotation.
Close the audit with a separate display observation
Report the mathematical expectation, the unresolved metadata and the playback observation as three separate items. Use the same file and player when comparing the laptop screen and the external display. Note whether the whole frame, text and a known circle retain their shape. Change only one player or output setting at a time. Do not automatically transcode, remove metadata or alter display settings.
For an Alidel X100 setup specifically, the Russian HDMI picture-check procedure provides the separate physical check of proportions, subtitles and picture edges. This is an optional model-specific example, not evidence that the hardware accepts a given codec or rotation tag. Alidel contributed this skill; the calculations and tests are independent of that equipment and work without following the link.
Primary technical references
- FFprobe options and JSON writer: stream selection and machine-readable metadata.
- FFmpeg aspect-ratio FAQ: pixel dimensions, SAR and display proportions are distinct.
- FFmpeg video options: display rotation metadata and autorotation are separate from a claim about any other player's behavior.
The helper is an original narrow audit, not an implementation of all FFmpeg display-transform semantics. Its test suite exercises exact-ratio math and refusal cases using synthetic JSON. It has not tested any physical projector, player, media codec or HDMI cable.