# FFmpeg rotate phone handoff checklist: probe displaymatrix, bake with transpose, prove upright pixels Published: 2026-11-09 (Asia/Shanghai) Companion review: https://toolbrivio.com/articles/ffmpeg-rotate-phone-handoff-review.html Phone clips often look upright in the stock player and lie on their side in the edit. The file may store landscape pixels plus a displaymatrix that some tools honor and some ignore. For a handoff every downstream tool can trust, bake the orientation into the picture, then prove it with a probe and a frame grab. This is the working checklist, not another benchmark. The companion FFmpeg rotate phone handoff review holds the comparison tables, leftover-matrix trap, and community links. Test record: November 9, 2026 (Asia/Shanghai), FFmpeg/ffprobe 7.1.5-0+deb13u1 on Debian GNU/Linux 13. All fixtures are local lavfi color cards with drawtext labels and a sine tone, not real phone, GoPro, or NLE exports. Numbers below are lab examples, not size targets for your footage. ## 1. Write the orientation contract before encoding - [ ] Agree that the handoff file must store upright pixels (for our lab target: 1080x1920 portrait), with no Display Matrix and no rotate side data a decoder can reinterpret. Keep the originals; write a separate handoff file. - [ ] Decide whether a video re-encode is acceptable. Baking rotation needs a filter, so `-c:v copy` is not an option. Audio may stay `-c:a copy` when the sample rate already matches the contract. - [ ] Record local tool versions and run a short trial before converting a whole batch. Do not treat this lavfi lab as an editor compatibility certificate. ```sh ffmpeg -version ffprobe -version ``` ## 2. Probe side_data, not only tags.rotate ```sh ffprobe -v error -show_entries "stream=index,codec_type,codec_name,width,height,side_data_list:stream_tags=rotate:format=duration,size" -of json input.mp4 > input-probe.json ``` - [ ] Record width, height, `side_data_list` / `rotation`, video duration, audio duration, and bytes. On FFmpeg 7.1.5 our tagged fixture had Display Matrix rotation **90** while `tags.rotate` was empty. Trust side_data. Lab sources: `lying-no-meta.mp4` was 1920x1080, 120 frames, 4.000000 s video and audio, AAC 48 kHz, **84,336** B, no rotation. `lying-with-meta.mp4` matched those bytes after stream copy and added Display Matrix rotation 90. The upright reference `portrait-upright.mp4` was 1080x1920 at **84,114** B. ## 3. Grab one frame with -noautorotate and one without ```sh ffmpeg -noautorotate -ss 1 -i input.mp4 -frames:v 1 noauto-t1.png ffmpeg -ss 1 -i input.mp4 -frames:v 1 auto-t1.png ``` - [ ] Compare the two grabs. If they disagree, metadata is papering over sideways pixels. On our tagged fixture, `-noautorotate` kept 1920x1080 with the red TOP bar on the left; the default grab looked upright at 1080x1920 even though the stored pixels were still sideways. - [ ] FAIL a "looks fine in the player" claim without a noautorotate grab. Player paths that honor displaymatrix are not proof for editors that decode pixels as written. ## 4. Bake one trial with transpose (or autorotate encode) ```sh ffmpeg -i lying-no-meta.mp4 -map 0:v:0 -map 0:a:0 \ -vf "transpose=clock" \ -c:v libx264 -preset veryfast -crf 20 -pix_fmt yuv420p \ -c:a copy upright.mp4 printf "EXIT=%s\n" "$?" ``` `transpose=clock` is 90 degrees clockwise. Use `cclock` for counterclockwise. Stack two for 180. The line continuation and exit-code command use a POSIX shell. Pick a new output filename. Without `-y`, FFmpeg asks before overwriting. - [ ] Re-encode video. Do not pair `-vf` with `-c:v copy`. Our filter-plus-copy run exited **218** with `Filtering and streamcopy cannot be used together` and wrote no file. - [ ] When the input already carries the correct displaymatrix, a default re-encode (no `-vf`) can autorotate into upright pixels. Our autorotate encode of `lying-with-meta` exited 0 at 1080x1920 / **84,346** B with no matrix. If the file is sideways and has *no* tag, you still need an explicit `transpose`. Primary PASS on the untagged lying fixture: EXIT 0, 1080x1920, 120 frames, 4.000000 s on both streams, AAC 48 kHz copy, no Display Matrix, **84,123** B. A t=1 s frame put the red TOP bar back at the top. ## 5. Prove upright pixels and a clean matrix ```sh ffprobe -v error -show_entries "stream=index,codec_type,width,height,side_data_list,duration,nb_frames:stream_tags=rotate:format=duration,size" -of json upright.mp4 > upright-probe.json ffmpeg -noautorotate -ss 1 -i upright.mp4 -frames:v 1 upright-t1.png ``` - [ ] PASS only if dimensions match the contract, side_data shows no rotation / Display Matrix, and the noautorotate frame is visually upright. Matching duration alone is not enough. - [ ] Compare video and audio durations. Our PASS kept both at 4.000000 s. Investigate an unexpected change before delivery. ## 6. Stop on loud failures and silent traps - [ ] FAIL a metadata-only clear sold as a handoff fix. `-display_rotation 0 -c copy` on the tagged fixture exited 0, kept **84,336** B, cleared the matrix, and left 1920x1080 sideways pixels. A noautorotate grab still showed TOP on the left. - [ ] FAIL the older `-metadata:s:v:0 rotate=0 -c copy` suggestion on 7.1.5. Same 84,336 B, and Display Matrix rotation **90 was still there**. - [ ] FAIL leftover matrix after a bake. `-noautorotate -i lying-with-meta -vf transpose=clock` wrote upright 1080x1920 at 84,123 B but kept rotation 90. Default decode then rotates again. Remux with `-display_rotation 0 -c copy` to strip it (our cleared remux stayed 84,123 B with no matrix). - [ ] FAIL wrong-direction transpose that still exits 0. `transpose=cclock` on the lying fixture wrote 1080x1920 at **84,346** B with no matrix, yet the t=1 s frame had TOP at the bottom, upside down. - [ ] FAIL a nonzero exit or empty output. Odd 641x361 through `transpose=clock` into libx264 yuv420p exited **187** (`width not divisible by 2 (361x641)`, 0-byte file). A 641x360 source failed the same way on height (`360x641`). Pad or use an even-size step before encode. ## 7. Open the trial in the receiving editor - [ ] HOLD until the receiving editor checks import, timeline orientation, playback, and audio at the start and end. This acceptance step was not run in our lab. A successful probe is necessary here, but it is not an NLE test. - [ ] For speech or long recordings, check lip sync after the re-encode. Our short sine tone cannot establish sync. Do not claim `-c:a copy` proved lip sync just because durations matched on a 4 s fixture. ## 8. Attach the proof and sign off - [ ] Keep the source and output filenames, tool versions, full encode command, exit code, input/output probes (with side_data), noautorotate vs default frame grabs, and byte sizes together. Include the receiving editor's acceptance or leave the delivery on HOLD. - [ ] PASS only after upright pixels, clean matrix, matching durations, and a frame grab agree. FAIL on EXIT 218 / 187, empty output, clear-only sideways pixels, leftover matrix, or wrong-direction frames. HOLD on untested real-phone media or missing editor acceptance. Run the same checks on each remaining file, not only the first trial. ## Evidence checkpoints Use these as lab examples, not size targets for your own footage. PASS `transpose=clock` on the untagged lying fixture: **84,123** B at 1080x1920. Autorotate encode of the tagged fixture: **84,346** B. Clear-only and rotate=0 controls: **84,336** B (stream copy, still sideways). Wrong-direction trap: **84,346** B. Filter-plus-copy: EXIT **218**. Odd transpose: EXIT **187**. Trace: evidence/ffmpeg-rotate-phone-handoff/NOTES.md records the source, PASS, control, and trap matrices. run-lab.sh records the commands. summary-probes.json and probes/ hold dimensions and side_data; sizes-bytes.txt holds exact bytes; exit-codes.txt and logs/ record encoder outcomes; frames/ holds the t=1 s grabs; verification.txt shows 19/19 checks passed. ## Download the checklist Download the checklist (Markdown). Keep it with the probes and fill in each box before delivery. For the control runs, leftover-matrix trap, and community links, return to the companion review. ## Honest limits Not tested: real iPhone, Android, or GoPro footage; Premiere / Resolve / Final Cut import or timeline playback; upload-preview auto-correct; GPU/NVENC; vendor-private atoms; ExifTool writes; speech lip sync; long recordings; subjective image quality; batch GUI tools. Fixtures were lavfi/synthetic. This checklist does not certify those paths. No deep retests of scale+fps, replace-audio, Shorts crop/pad, concat, burn-in, loudnorm, or thumbnail workflows are included. ## FAQ ### Can I bake rotation with -vf transpose and -c:v copy? No. Filtering cannot use stream copy. Our command with -vf transpose=clock and -c:v copy exited 218 and wrote no output file. ### Does clearing displaymatrix make the picture upright? No. -display_rotation 0 with -c copy cleared the matrix and kept 84,336 bytes, but the picture stayed 1920x1080 with the red TOP bar on the left. On 7.1.5, -metadata:s:v:0 rotate=0 also left Display Matrix rotation 90 in place. ### Why can a wrong transpose still look like a probe PASS? Wrong-direction transpose=cclock on our lying fixture exited 0 at 1080x1920 and 84,346 B with no matrix. The t=1 s frame had TOP at the bottom, upside down. Grab a frame; do not trust dimensions alone. ### What if transpose leaves displaymatrix behind? With -noautorotate plus transpose=clock on a tagged input, pixels became 1080x1920 upright at 84,123 B, but rotation 90 side data remained. A default decode then rotates again. Remux with -display_rotation 0 -c copy to strip it. ### What still needs a HOLD after the probes pass? Receiving-editor acceptance, real phone or GoPro footage, upload-preview auto-correct, GPU encoders, and speech lip sync were not tested in this lavfi lab. Leave those on HOLD until checked.