Video rotation
Rotate the video 90° / 180° / 270° frame by frame in the browser and re-encode to WebM, swapping the output canvas size at 90° / 270°; MP4 is a local ffmpeg command only.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
The video is decoded, rotated and re-encoded locally in your browser and never uploaded.
Pick a video file first.
Result
These are the real numbers from this run — play and download them right here.
Pick a video and set the options; the real result shows up here.
What this tool does
- Straighten a portrait clip for real: at 90° / 270° the output canvas swaps width and height and the frames are rotated in a canvas
- Rotate the whole clip or just the range picked on the timeline, and download a playable WebM
- Check the real output size, frame count, size and elapsed time; for MP4 the tool prints a local ffmpeg command and says it is a command
Example
Input
clip.mp4 (160×120, 1.05 s, 24,000 bytes) · angle: 90° clockwise · quality medium · output frame rate 10 fps · container WebM · range 0.000–1.050 s
Output
Source video: 160×120 · duration 0:01 · 24.0 KB Method: Rotate 90° clockwise (transpose=1) Canvas transform: translate(120, 0) + rotate(90°) Range: 0.000 → 1.050 s (1.050 s) Output size: 120×160 (width and height really swap at 90° / 270°) Output frame rate: 10 fps · frames: 11 (output duration 1.10 s) Target bitrate: 150 kbps (quality medium) · estimated size 0.02 MB Audio: a canvas recording carries the picture only, so the sound of the source video is not brought over (use the local ffmpeg command below to keep it) Output file name: clip-rot90.webm
These nine lines are what the pure logic computes for the input above (the first nine lines of the result panel). The panel then appends the frame count, size, MIME type and elapsed time of this real recording.
Frequently asked questions
Does it really rotate the picture?
Yes. Every frame is seeked in a hidden <video> and painted into a <canvas>: 90° uses translate(outWidth, 0) + rotate(π/2), 270° uses translate(0, outHeight) + rotate(-π/2) and 180° uses translate(width, height) + rotate(π). At 90° / 270° the output canvas swaps width and height, then canvas.captureStream + MediaRecorder re-encodes it to WebM.
Will a player rotate it a second time?
No. The exported WebM carries no rotate metadata from the source: the pixels themselves were rotated. The local ffmpeg command the tool prints also passes -metadata:s:v:0 rotate=0.
Why is WebM the only export?
The native MediaRecorder can only mux WebM (VP8/VP9). Picking MP4 makes the tool state plainly that a browser cannot mux MP4 and print a local ffmpeg command instead.
Why is the rotated size even?
At 90° / 270° width and height are swapped and then rounded to even numbers (161×121 becomes 122×162) because VP8/VP9 dislike odd dimensions. The output size in the panel is that real canvas size.
Keywords:transposevideo