DEV Community

Lakshmi Sravya Vedantham
Lakshmi Sravya Vedantham

Posted on

I Stopped Paying $30/month for Video Resizing. Here's the Open-Source Alternative.

Every social platform wants a different video size.

TikTok wants 9:16. YouTube wants 16:9. Instagram wants 1:1 and 4:5. Twitter wants 16:9 but at 720p. LinkedIn wants 16:9 but allows 10-minute videos.

Cloud tools like OpusClip and Kapwing charge $15-30/month for what ffmpeg can do for free — if you know the 47 flags. I wrapped it all in one Rust command.

The Problem

You record a video. Now you need it on 8 platforms. Each platform has its own:

  • Aspect ratio
  • Resolution
  • Maximum duration
  • Bitrate sweet spot
  • Codec preferences

Your options:

  1. Pay Kapwing/OpusClip — $15-30/month, upload your video to their cloud, wait for processing, download 8 versions
  2. Write ffmpeg commands — Free, but you're writing 50+ lines of flags per platform, debugging filter chains, and maintaining a shell script that breaks every time you add a platform
  3. Google's AutoFlip — Was open-source, now deprecated

I built option 4.

The Solution

socialcut input.mp4 --platforms all -o output/
Enter fullscreen mode Exit fullscreen mode

One command. Eight platform-optimized videos. Done.

No cloud upload. No subscription. No account. Your video never leaves your machine.

Platform Presets

socialcut ships with 8 platform presets, each tuned to that platform's requirements:

Platform Aspect Resolution Max Duration Bitrate
TikTok 9:16 1080x1920 180s 6 Mbps
Instagram Reel 9:16 1080x1920 90s 5 Mbps
Instagram Square 1:1 1080x1080 60s 5 Mbps
Instagram Post 4:5 1080x1350 60s 5 Mbps
YouTube 16:9 1920x1080 none 8 Mbps
YouTube Shorts 9:16 1080x1920 60s 6 Mbps
Twitter 16:9 1280x720 140s 5 Mbps
LinkedIn 16:9 1920x1080 600s 8 Mbps

These aren't guesses. They're pulled from each platform's upload specs and encoding recommendations.

Example Commands

All platforms at once:

socialcut input.mp4 --platforms all -o output/
Enter fullscreen mode Exit fullscreen mode

Just the platforms you need:

socialcut input.mp4 --platforms tiktok,instagram-reel,youtube -o output/
Enter fullscreen mode Exit fullscreen mode

Letterbox mode — preserve everything, add padding:

socialcut input.mp4 --platforms instagram-square --mode letterbox --bg-color "#1a1a2e" -o output/
Enter fullscreen mode Exit fullscreen mode

Burn a caption into the video:

socialcut input.mp4 --platforms tiktok --caption "Check this out!" -o tiktok.mp4
Enter fullscreen mode Exit fullscreen mode

Low quality for quick previews:

socialcut input.mp4 --platforms all --quality low -o preview/
Enter fullscreen mode Exit fullscreen mode

Max quality for the final export:

socialcut input.mp4 --platforms youtube --quality max -o final.mp4
Enter fullscreen mode Exit fullscreen mode

Three Crop Modes

This is where socialcut earns its keep. Converting between aspect ratios is the hard part, and there are three ways to handle it:

1. crop (default) — Fill the frame, cut the edges

Input 16:9           Output 9:16 (TikTok)
+----------------+   +------+
|    |      |    |   |      |
|    | KEEP |    | > |      |
|    |      |    |   |      |
+----------------+   +------+
     crop sides
Enter fullscreen mode Exit fullscreen mode

No black bars. The output fills the entire frame. You lose some edges, but the result looks native to the platform.

Use --gravity to control which part of the frame survives:

--gravity top       --gravity center     --gravity bottom
+----------+        +----------+         +----------+
| KEEP     |        |          |         |          |
|          |        | KEEP     |         |          |
+----------+        |          |         | KEEP     |
|          |        +----------+         |          |
|          |        |          |         +----------+
+----------+        +----------+         +----------+
Enter fullscreen mode Exit fullscreen mode

2. letterbox — Preserve everything, add bars

Input 16:9           Output 1:1 (Instagram)
+----------------+   +----------+
|                |   |##########|
|                | > |  video   |
|                |   |##########|
+----------------+   +----------+
                      # = padding
Enter fullscreen mode Exit fullscreen mode

Nothing gets cropped. Black bars (or any color you choose) fill the empty space. Use this when every pixel matters.

3. fit — Same as letterbox, clearer name

When "letterbox" sounds too technical. Same behavior.

Quality Presets

Preset Bitrate Audio Use Case
low 50% of platform spec 96 kbps Quick previews, testing
medium 75% of platform spec 128 kbps Drafts, internal review
high (default) 100% of platform spec 192 kbps Final exports
max 150% of platform spec 256 kbps Maximum quality

How It Compares

Feature socialcut OpusClip Kapwing raw ffmpeg
Price Free $15-30/mo $16-24/mo Free
Privacy 100% local Cloud upload Cloud upload 100% local
Speed Fast (local) Upload-dependent Upload-dependent Fast (local)
Ease of use One command Web UI Web UI 50-line script
All 8 platforms One command Manual each Manual each One script each
Offline Yes No No Yes
Caption burning Built-in Yes Yes Manual filter chain
Open source Yes No No Yes (but no presets)

The cloud tools have nicer UIs. But they also have your video on their servers, a monthly fee, and a dependency on their uptime.

The Info Command

Before you process anything, check what you're working with:

socialcut info input.mp4
Enter fullscreen mode Exit fullscreen mode

Instant metadata: resolution, duration, codec, fps, bitrate. No processing, just ffprobe under the hood.

The Privacy Angle

Your video never leaves your machine. Period.

No cloud upload. No "processing on our servers." No terms of service granting usage rights to your content. No wondering what happens to that unreleased video you're editing.

socialcut shells out to ffmpeg on your local machine. That's it. If your internet goes down, socialcut still works.

Architecture

CLI (clap) > probe (ffprobe) > processor (ffmpeg) > output files
                                      |
                                  platform presets
                                  quality presets
                                  crop calculation
                                  filter chain builder
Enter fullscreen mode Exit fullscreen mode

Five modules, each doing one thing:

  • platform.rs — 8 platform presets with aspect ratios, resolutions, durations, bitrates
  • probe.rs — ffprobe wrapper for video metadata extraction
  • processor.rs — crop/letterbox math, ffmpeg filter chain builder
  • caption.rs — drawtext filter construction with proper escaping
  • quality.rs — bitrate multipliers and CRF values

Built in Rust. 71 tests passing. No C bindings to ffmpeg — it shells out, which means if ffmpeg works on your system, socialcut works.

Try It

git clone https://github.com/LakshmiSravyaVedantham/socialcut.git
cd socialcut
cargo install --path .

# Requires ffmpeg
# macOS: brew install ffmpeg
# Ubuntu: apt install ffmpeg

socialcut input.mp4 --platforms all -o output/
Enter fullscreen mode Exit fullscreen mode

Star the repo if this saves you a subscription: github.com/LakshmiSravyaVedantham/socialcut


Your video. Your machine. Your formats. No cloud required.

Top comments (0)