Nodes/MKRShift_Nodes/Video Rotate/Flip
ComfyUI Node

Video Rotate/Flip

Rotate and flip a clip — fix phone footage before it hits the pipeline

By criskb·Created 7 months ago·Updated 5 months ago· 0
Video Rotate/Flip
  • video
  • video
  • output_path
  • summary
rotate_degrees0
flip_horizontalfalse
flip_verticalfalse
fallback_fps24.0
output_formatauto
filename_prefixMKR_rotate_flip
subfolder
overwritefalse
filename_label

MKRVideoRotateFlip rotates a clip in 90° steps and optionally flips it horizontally or vertically. It's the "this video is sideways" node - and honestly that's the whole job, done properly for every frame and written back out as a new file.

Why does a one-trick node like this exist? Because rotation metadata is a lie. A lot of phone footage stores orientation as EXIF/rotation flags in the container rather than baked into the pixels, and plenty of processing pipelines - including AI video models - ignore those flags. So your 4K portrait video plays fine in a phone gallery and comes out sideways everywhere else. Baking the rotation into the actual pixels with this node fixes it at the source, before it goes anywhere near a model or a deliverable.

Mechanically it's a per-frame PIL pass: rotate_degrees is a dropdown of 0, 90, 180, 270 (cardinal only, no free angles), applied alongside flip_horizontal and flip_vertical as needed. Note the order matters the way you'd expect - a 90° rotation swaps width and height, so the output canvas reflects the rotated dimensions. The other inputs are the standard pack quartet: video, fallback_fps, output_format, filename_prefix, subfolder, overwrite.

Outputs: video (MKR_VIDEO payload), output_path, summary.

Install

Part of MKRShift Nodes - install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

or ComfyUI Manager → search MKRShift_Nodes → restart. mp4/mov/webm output needs system ffmpeg on PATH; gif/webp work without it. No pip dependencies.

Where people get burned

The classic confusion is thinking a 90° rotate "shouldn't change the file size" - it does change the dimensions, and that's correct. Second, if your video already looks correct in ComfyUI's preview but comes out rotated in the file, the source is carrying rotation metadata and this node is exactly the fix - bake it in. And the usual: no audio carried through, since it's a frame-based pass, so mux sound back on if you need it.

CategoryMKRShift Nodes/Media/Video/Utility

Inputs (10)

NameTypeDefaultDescription
video*
rotate_degreesCOMBO04 options: 0, 90, 180, 270
flip_horizontalBOOLEANfalse
flip_verticalBOOLEANfalse
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_rotate_flip
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING