Fixing a sideways-displaying video losslessly (metadata-only remux) with ffmpeg is confusing because the -display_rotation option value and ffprobe's reported rotation side_data disagree in sign/value, and an existing wrong display matrix contaminates frame extraction. Verified mapping on real iPhone MOV footage: ffmpeg -display_rotation:v:0 270 -i in.MOV -c copy -map_metadata 0 out.MOV writes ffprobe side_data rotation=-90, which players render as a 90° CLOCKWISE rotation (visually identical to -vf transpose=1); -display_rotation:v:0 90 writes rotation=90, rendered 90° counter-clockwise (== transpose=2). Two more traps: (1) -display_rotation is an INPUT option — it must precede -i, and it silently OVERRIDES any existing display matrix on remux (no flag needed to replace a wrong value like -180); (2) when extracting frames to decide orientation, pass -noautorotate, otherwise ffmpeg applies the existing (possibly wrong) matrix on decode and your preview no longer reflects raw storage orientation.