video-automationffmpegapi

Turn long-form video into Shorts/Reels/TikToks automatically

·Javid Jamae·8 min read
Turn long-form video into Shorts/Reels/TikToks automatically

Most "turn one video into ten Shorts" tutorials point you at an app like Opus Clip or Vidyo.ai, hand you a monthly seat, and stop there. That works until you want it inside a pipeline: a webhook fires, a podcast episode lands, and clips should show up in your CMS without a human opening a tab. At that point you don't need another editor. You need the clipping to be an API call in a loop.

Quick answer: To turn long form video into shorts automatically, split the work into two jobs. Use a transcript plus an LLM (or timestamps you already have) to pick the moments, then call a video API like FFmpeg Micro to cut each moment, crop it to 9:16, and burn in captions. No AI clipping app, and no servers to run.

The real bottleneck isn't the AI

Conventional wisdom says turning long video into shorts is an AI problem, and the magic tool is the one that "finds the viral moments." That's half true. Picking which 45 seconds to clip is genuinely a language task, and a transcript with timestamps plus a decent prompt handles it well.

But moment-picking isn't the part that breaks at scale. The part that breaks is everything after: cutting a frame-accurate segment, cropping 1920x1080 down to a 1080x1920 vertical frame, burning captions, and encoding a separate file for YouTube Shorts, Reels, and TikTok. That's deterministic media work, and it's exactly where a homegrown pipeline turns into a queue of stuck FFmpeg processes on a box you now have to babysit.

So separate the two. Let a transcript and an LLM decide which moments. Let a media API produce the actual clips. The second half is where FFmpeg Micro replaces a whole microservice with one call per operation.

How to convert a long video to shorts with an API

The pipeline is four steps: get timestamps, cut, crop, caption. Here's each one with the raw FFmpeg command and the API equivalent.

1. Get the timestamps worth clipping

Run the source video through a transcription service (Whisper, Deepgram, AssemblyAI) to get a time-coded transcript, then ask an LLM to return start/end timestamps for the strongest moments. The output you want is boring on purpose: a list of { start, end, caption } objects. FFmpeg Micro doesn't score virality for you, and that's the honest line to draw. You bring the timestamps; it makes the clips.

2. Cut each moment into its own clip

Cutting a 45-minute video at 00:12:30 to 00:13:15 is one FFmpeg command. Put -ss/-to after the input and re-encode so the cut lands on the exact frame instead of the nearest keyframe:

ffmpeg -i episode.mp4 -ss 00:12:30 -to 00:13:15 \
  -c:v libx264 -c:a aac clip-01.mp4

The API version is the same intent as a job: submit the source URL and the time range, get a job ID back, then poll or receive a webhook when the output is ready.

curl -X POST https://api.ffmpeg-micro.com/jobs \
  -H "Authorization: Bearer $FFMPEG_MICRO_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "source": "https://.../episode.mp4",
        "trim": { "start": "00:12:30", "end": "00:13:15" } }'

That request body is illustrative. Check https://www.ffmpeg-micro.com/docs for the exact fields, or build the call visually in the https://www.ffmpeg-micro.com/playground. The point is that one video becomes ten clips by running this job ten times in a loop, and the jobs run in parallel with no server of yours involved.

3. Crop horizontal to vertical 9:16

A center crop pulls a 9:16 column out of the middle of a 16:9 frame, then scales it to a clean 1080x1920:

ffmpeg -i clip-01.mp4 \
  -vf "crop=ih*9/16:ih,scale=1080:1920" \
  -c:a copy vertical-01.mp4

A hard center crop cuts off anything at the edges, which is a problem when the speaker sits left of frame. If you'd rather keep the whole shot, put the horizontal video on a blurred 9:16 background instead. We walk through both approaches in convert vertical to horizontal video and back for social formats and the fill technique in how to add a blurred background to vertical video.

4. Burn in captions and encode per platform

Captions drive silent-autoplay watch time, so burn them in rather than shipping a sidecar file. Feed the SRT the LLM already gave you:

ffmpeg -i vertical-01.mp4 \
  -vf "subtitles=clip-01.srt:force_style='Fontsize=18'" \
  -c:a copy short-01.mp4

With the API, this is one more job in the chain, and it dodges the classic self-hosted failure: the subtitles filter needs libass and a font present on the machine, and a missing fontconfig entry silently drops your text. A managed toolkit has the fonts installed already.

Manual FFmpeg vs. one API call

The FFmpeg commands above are correct. The trouble starts when you run them for real: ten clips per episode, across dozens of episodes, on infrastructure that has to stay up.

StepManual FFmpegFFmpeg Micro
Cut a moment`-ss/-to` on your own boxone job
Crop to 9:16crop + scale filterone job
Burn captionssubtitles filter + font depsone job, fonts included
10 clips per videoyour server, your queue10 parallel jobs
Scaling to 50 videosmore servers, more babysittingusage-based, no servers to run

The manual column isn't wrong, it just makes you the operator of a media-processing service. The API column deletes that job.

Wiring it into n8n, Make, or Zapier

You can run this entire flow without writing a backend. In n8n, a typical automatic video repurposing workflow is: a trigger node (new file in Drive or a webhook), a transcription node, an LLM node that returns the timestamp list, then a loop that fires one FFmpeg Micro job per clip and waits for the webhook. It works the same way in Make and Zapier.

One gotcha: video jobs run longer than a default HTTP node wants to wait, so a naive "call and wait" setup times out mid-render. Use the webhook or polling pattern instead, which we cover step by step in how to fix n8n timeout errors when processing video. If you're assembling faceless-channel content from scratch rather than clipping existing footage, faceless YouTube channel automation covers the assembly side.

Common pitfalls when auto-clipping long video

  • Keyframe drift on fast cuts. Cutting with -c copy is fast but snaps to the nearest keyframe, so your clip can start a second early or late. Re-encode when the start time matters.
  • Center crop decapitates the speaker. If the subject isn't centered, a hard crop loses them. Use a blurred fill or a tracked crop instead.
  • Missing caption fonts. On self-hosted FFmpeg, the subtitles filter needs libass and fontconfig, and a missing font fails quietly. A managed API sidesteps this.
  • Audio drift when you stitch. If you concatenate clips or add music, mismatched sample rates cause A/V drift. See concatenate clips programmatically.
  • Silent timeouts in no-code tools. Long renders outlast default HTTP timeouts. Always use webhooks or polling.

When NOT to use this

If you want a consumer app that scores clips for virality, adds animated karaoke captions from a template gallery, and lets you drag a timeline, a finished product like Opus Clip, Vidyo.ai, or Descript is the better buy. FFmpeg Micro is an API, not an editor, and it won't rank your clips for you.

Reach for the API path when you're a builder who wants to own the pipeline: your own moment-selection logic, your own caption style, running inside n8n or your app, at a cost that scales with usage instead of a fixed seat. See https://www.ffmpeg-micro.com/pricing for the free tier and usage-based rates.

FAQ

How do I automatically create YouTube Shorts from a long video?

Transcribe the long video, use an LLM to return timestamped moments, then call a video API to cut each moment, crop it to 9:16, and burn captions. Run the cut job once per clip to turn one upload into many Shorts.

Can I turn a podcast video into TikToks automatically?

Yes. A recorded podcast video is an ideal source because the transcript already marks the good lines. Feed the transcript to an LLM for timestamps, then generate one vertical, captioned clip per moment with the API and post them as TikToks or Reels.

What's the best API to convert long video to shorts?

Pick based on where the work lives. For the media steps (cut, crop to vertical, caption, encode per platform), FFmpeg Micro exposes each as one call and runs with no servers on your side. Pair it with a transcription and LLM step for moment selection.

How many shorts can I generate from one long video?

As many as your timestamp list contains. Because each clip is an independent API job, one 45-minute episode with ten flagged moments becomes ten parallel jobs, and jobs run without you provisioning any infrastructure.

Does FFmpeg Micro pick the best moments for me?

No. FFmpeg Micro handles the deterministic media work: cutting, cropping, captions, watermarks, and encoding. Moment selection is a transcript-and-LLM task you run first, then hand the timestamps to the API.

Ready to turn one long video into a batch of vertical, captioned clips? Grab a key and run your first cut on the free tier at https://www.ffmpeg-micro.com/auth/signup.

About Javid Jamae

Founder & CEO at FFmpeg Micro

Javid is a software engineer, author, and entrepreneur with over 25 years of professional software development experience across enterprise, startup, and consulting environments. He founded FFmpeg Micro to make video processing accessible to developers through a simple, automation-first REST API.

Software EngineeringVideo ProcessingFFmpegCloud ArchitectureAPI DesignAutomation

Ready to process videos at scale?

Start using FFmpeg Micro's simple API today. No infrastructure required.

Get Started Free