Video Editor API: Crop, Rotate, Speed, Mute & Reverse avatar

Video Editor API: Crop, Rotate, Speed, Mute & Reverse

Pricing

from $20.00 / 1,000 clip editeds

Go to Apify Store
Video Editor API: Crop, Rotate, Speed, Mute & Reverse

Video Editor API: Crop, Rotate, Speed, Mute & Reverse

Edit videos from direct file URLs in one call: crop (9:16, 1:1 or exact box), rotate, flip, speed up or slow down, mute, reverse and set fps. H.264 mp4 out with a signed link. No YouTube. Billed per clip (30 s included), free on failure.

Pricing

from $20.00 / 1,000 clip editeds

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Features

Limited permissions

Share

This video editor API crops, rotates, flips, speeds up or slows down, mutes and reverses videos from direct file URLs, and sets the frame rate, all in one batch call. Pick the operations once, list as many videos as you like, and every video comes back as an H.264 mp4 with a download link. Several operations on one video are applied in a single pass, so you pay once. It runs ffmpeg in the cloud: nothing to install and no API key.

What it does not do. It reads direct video files (mp4, mov, webm, mkv, avi) from a public URL; it does not download from YouTube, Vimeo, TikTok, Instagram or other streaming sites and rejects those links without charge. HLS/DASH playlists (.m3u8, .mpd) are not supported. It only outputs H.264/AAC mp4: no WebM, GIF, H.265 or AV1. It does not cut or trim by time, merge, add audio or music, add text or logos, burn subtitles, stabilise, colour-correct or resize to a preset (use the related tools below). It is not a timeline editor: operations are a fixed set applied in a fixed order. Rotation is in quarter turns only (no free angle). Reverse is limited to 60 seconds and about 1.5 GB of raw frames, because ffmpeg holds every frame in memory. Speed is 0.25x to 4x. Sources above Full HD are limited to 3 minutes, and frames larger than 4K are rejected. It follows the robots.txt of the host that serves your files. Use it only on videos you own or have the right to edit.

What you get

  • One dataset row per video: the operations applied, source and result size in pixels and bytes, source and result length, the billed units, a signed download link, and a status or a clear error.
  • Operations applied in a fixed order: crop, rotate, flip, reverse, speed, frame rate. Crop comes first so that reverse has fewer pixels to hold.
  • Per-video options: give each video its own crop, speed or mute through the videos list.
  • Bad inputs never stop the run, say exactly what is wrong and are free.

Operations

OptionValuesWhat it does
cropAspect1:1, 9:16, 16:9, 4:5 or any W:HCentre-crops to the largest frame of that ratio.
cropWidth, cropHeight, cropX, cropYpixelsExact crop box. A missing width or height runs to the frame edge; a missing X or Y centres the box.
rotate0, 90, 180, 270Clockwise quarter turns. 90 and 270 swap width and height.
flipnone, horizontal, vertical, bothMirrors the picture.
speed0.25 to 42 = twice as fast, 0.5 = slow motion. Audio follows with its pitch kept.
reversetrue / falsePlays backwards, audio included. Up to 60 s.
mutetrue / falseRemoves the audio track. Mute alone on an H.264 file is a lossless stream copy.
fps1 to 120Converts to this constant frame rate.

Crop coordinates are in the picture as you see it: a phone video stored sideways with a rotation tag is measured after that tag is applied. Crop sizes are rounded down to even numbers (an H.264 requirement). A crop that does not fit inside the frame is rejected for that video, with the frame size in the message, and costs nothing. You must set at least one operation; a plain re-encode is the job of Video Compressor.

How to crop a video to 9:16 or 1:1

Set cropAspect to 9:16 for a vertical Reels/Shorts/TikTok frame, 1:1 for a square post or 4:5 for a feed portrait. The Actor takes the largest centred box of that ratio, so a 1920x1080 source becomes 606x1080 at 9:16 and 1080x1080 at 1:1. For a different part of the picture use cropX and cropY with cropWidth and cropHeight.

How to rotate or flip a video

rotate: "90" turns the video clockwise (a sideways phone clip becomes upright) and flip: "horizontal" mirrors it. Both can be combined with a crop in the same call.

How to speed up, slow down or reverse a video

speed: 2 doubles the speed and halves the length; speed: 0.5 makes slow motion by repeating frames (it does not invent new ones). Audio is time-stretched with its pitch kept. reverse: true plays the clip backwards and reverses the audio too. If a video is longer than 60 s, cut the part you want first with Cut Video: Video Trimmer, Clip Cutter & Video to GIF.

How to mute a video or change its frame rate

mute: true drops the audio track (and is a fast, lossless stream copy when the video is H.264 and nothing else is requested). fps: 24 or fps: 30 converts to a constant frame rate, which is useful before further processing.

Input

FieldDefaultWhat it does
videoUrlssample videoDirect video file links (required unless you use videos).
videosemptyPer-video settings: [{"url", "name", "speed", "cropAspect", ...}]. Options left out come from the run-level settings.
operationsnonecropAspect, cropWidth, cropHeight, cropX, cropY, rotate, flip, speed, reverse, mute, fps (see above). At least one is needed.
crf23Quality when re-encoding, 16 (best) to 35 (smallest).
maxDurationMinutes10Source duration cap (above Full HD: 3 min). Billing is per 30 s, so this also caps your cost.
maxVideoSizeMb500Source size cap (max 2048).
maxVideosPerRun50Hard cap on videos per run (max 1000).
videoTimeoutSecs1800Per download and per edit.
outputStoreNameemptySave the files in a named store that is kept until you delete them.

Input example:

{
"videoUrls": ["https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"],
"cropAspect": "1:1",
"speed": 2
}

Output

One row per video, from a real local run of the input above:

{
"sourceUrl": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"videoIndex": 1,
"name": null,
"operations": {"cropAspect": "1:1", "speed": 2.0},
"mode": "encode",
"sourceBytes": 1128375,
"bytes": 145549,
"sourceWidth": 960,
"sourceHeight": 540,
"width": 540,
"height": 540,
"sourceDurationSeconds": 5.055,
"durationSeconds": 2.569,
"billedClips": 1,
"billedExtra30s": 0,
"url": "https://api.apify.com/v2/key-value-stores/<store>/records/v01-edited.mp4",
"key": "v01-edited.mp4",
"status": "ok",
"error": null,
"note": "Audio was sped up or slowed down with its pitch kept (atempo)."
}

A failure row has status: "error" and an error naming the problem. status: "skipped" means a free skip: the spending limit was reached or maxVideosPerRun was hit. On Apify the url is a signed link that downloads without a token.

Use with the Apify API, MCP, n8n and Make

Python:

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/video-editor-ops").call(run_input={
"videoUrls": ["https://example.com/demo.mp4"], "cropAspect": "9:16", "mute": True})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["status"], row["url"] or row["error"])

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/video-editor-ops').call({
videoUrls: ['https://example.com/demo.mp4'], rotate: '90', flip: 'horizontal' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();

In n8n or Make use the Apify node with the actor name and the same JSON. With Apify's MCP server (mcp.apify.com) an AI assistant can call it: "crop this video to vertical and mute it". It needs only a video URL.

Use cases

  • Turn landscape footage into vertical 9:16 or square 1:1 versions for Reels, Shorts and feed posts.
  • Fix sideways phone video with a rotation, or mirror a selfie clip.
  • Make time-lapse (speed: 4) and slow-motion (speed: 0.5) versions of clips.
  • Strip the sound from product demos and background loops with mute.
  • Normalise a batch of clips to one frame rate before further processing.
  • Make reversed clips for transitions and loops.

How much does it cost

Pay per event: $0.025 per edited video, which covers its first 30 seconds of source video, plus $0.02 for each further started 30 seconds. The length counted is the source video, so speed and reverse do not change the price.

Source lengthPrice
up to 30 s$0.025
31 to 60 s$0.045
5 minutes$0.205
10 minutes$0.405

Failed videos, skipped videos, rejected links and the SUMMARY record are free, and any number of operations on a video cost the same. Plan discounts apply (Silver about 10%, Gold and higher about 20%). Apify platform usage is included. maxVideosPerRun and maxDurationMinutes cap a run, and if you set a maximum spend per run the Actor stops cleanly when it is reached and removes the file it could not charge for.

FAQ

Can I apply several operations at once?

Yes, all of them in one pass and for one price: for example crop to 9:16, mute and speed up 1.5x. The order is fixed: crop, rotate, flip, reverse, speed, frame rate.

Is the result re-encoded?

Yes, except when mute is the only operation and the source is H.264, which is a lossless copy of the video stream. Otherwise the video is re-encoded to H.264 with crf 23 by default and 128 kbps AAC audio. Metadata such as GPS tags and chapters are removed, and only the first audio track is kept.

Why was my reverse rejected?

Reverse needs every frame in memory. It is limited to 60 s and about 1.5 GB of raw frames, so a 720p 30 fps clip can be about 35 s, a 1080p clip about 15 s, and cropping first makes room. The message gives the numbers. Cut the clip shorter first with the video trimmer.

Does speed change the pitch of the sound?

No. Audio is time-stretched with ffmpeg's atempo filter so the voice keeps its pitch. Very fast or very slow speeds can sound processed.

Which limits apply?

Source files up to 2 GB (default 500 MB) and 10 minutes by default (set maxDurationMinutes up to any value; above Full HD the limit is 3 minutes and frames larger than 4K are rejected), up to 1,000 videos per run. Links to private or internal addresses are blocked, and the hosts of your files must allow automated fetching in their robots.txt. The whole source file is downloaded once per video.

How long are the files kept?

They live in the run's key-value store, which expires with your plan's retention period. Set outputStoreName to keep them in a named store until you delete them.

  • Cut Video: Video Trimmer, Clip Cutter & Video to GIF cuts clips by time and makes GIFs.
  • Video Compressor & Resizer: Shrink MP4 for Web, Social & AI shrinks files to a preset size or a target size in MB.
  • Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI pulls still images from the same videos.
  • Merge Videos: Concatenate, Join & Combine Video Clips joins clips into one file.