Is This 15s 9:16 Fixture Stored as 720×1280 With an Identity tkhd Matrix, or as a Landscape Frame With a 90° Rotation Tag?

A vertical clip can be stored as 720×1280 pixels with an identity tkhd display matrix, or as a landscape 1280×720 frame with a 90° rotation tag. I parsed the header and the visual sample entry on a constructed 15-second 9:16, 720×1280, 24 fps H.264 + AAC-LC fixture (ffmpeg 7.1.5, CRF 23, movflags +faststart). It is not a customer's paid Hit the Road Dude file. The helper is tkhd_matrix.py. pytest pins the figures below.

The source is already a 720×1280 portrait with an identity matrix

source_15s_916.mp4 is 5,264,872 bytes (MD5 38a90c22952432c8567bbeddb5249bf0). The video tkhd sits at offset 156, size 92. Its display width and height are 720.0 × 1280.0. The 3×3 matrix is the identity: a = d = 1, b = c = u = v = x = y = 0, w = 1 (raw [65536, 0, 0, 0, 65536, 0, 0, 0, 1073741824]). The avc1 visual sample entry at offset 457, size 177, stores the coded frame as 720 × 1280, not 1280 × 720. ffprobe agrees: width/coded_width 720, height/coded_height 1280, SAR 1:1, DAR 9:16. There is no rotate tag and no Display Matrix side data. ffmpeg's streamhash muxer, with -c copy -map 0, gives video MD5 1530607bba1e88d8e553aeb7d8401cde and audio MD5 649186bbea57a9153213443badde98f3. This file is not a landscape frame wearing a rotation tag.

A plain stream copy keeps that matrix

ffmpeg -i source_15s_916.mp4 -c copy -movflags +faststart streamcopy.mp4 writes another 5,264,872-byte file. The identity matrix, the 720×1280 coded size, the tkhd display size, the missing rotate tag, and both bitstream hashes all stay put. The file MD5 changes to 19842a8638ecc7e2d89f42268861229d. A remux is not a byte-for-byte copy of the file.

-display_rotation is an input option; placing it after -i fails

ffmpeg 7.1.5 documents -display_rotation as "set pure counter-clockwise rotation in degrees for stream(s)". I did not assume where it belongs. Placing it after -i on a stream copy fails with exit 234: Option display_rotation … cannot be applied to output url … Move this option before the file it belongs to. No output file is written. I am not going to guess how a phone would have displayed it.

Moving the same flag before -i does work as a stream copy:

ffmpeg -display_rotation 90 -i source_15s_916.mp4 -c copy \ -movflags +faststart display_rotation_before_i.mp4 

That file is still 5,264,872 bytes, MD5 0cb0849682a61b36de2deb85f59fd3e4. Both streamhashes are unchanged, and the coded size is still 720×1280. The video tkhd matrix is no longer the identity: a = 0, b = -1, c = 1, d = 0, w = 1. ffprobe still prints no rotate tag, still prints 720x1280 and DAR 9:16, and now emits a Display Matrix side-data block with rotation: 90. A row-vector ISO reading of that matrix is 90° clockwise / 270° counter-clockwise. I am reporting the raw coefficients and what ffprobe printed, not a player-support claim. Adding -noautorotate produces the same MD5 0cb08496….

Two other rewrites do nothing to tkhd on this tool: -metadata:s:v:0 rotate=90 and -bsf:v h264_metadata=rotate=90 each write a file whose MD5 matches the plain remux (19842a86…), with the identity matrix still in place and the video streamhash unchanged.

python3 src/tkhd_matrix.py files/source/source_15s_916.mp4 python3 -m pytest src/test_tkhd_matrix.py 

The studio at hittheroaddude.app sells one 15-second vertical clip from one photo, with a newly generated voice and no prompt box. I re-checked the pricing page on 5 December 2026 between 09:20:48 and 09:23:10 Asia/Shanghai: $9.99 / 6 credits at 480p, $12.99 / 14 credits at 720p. There is no subscription and no free clip.