Very Good FFmpeg
How it worksPricingCompareFAQDocs
Guide #4

Trim video with FFmpeg

Trimming is simple until keyframes matter. Fast cuts use stream copy. Accurate cuts usually re-encode around the chosen time range.

Copy + paste this:

Cut quickly without re-encoding. Good for rough clips.

ffmpeg -ss 00:01:30 -i input -t 00:00:20 -c copy clip.mp4

When this is the right tool

Start by checking whether this operation matches the job you actually need.

Use this when

3 Good fit
  • You need clips, previews, highlights, or moderation samples.

  • You want to remove leading or trailing dead time.

  • You need fixed-length exports from longer uploads.

Be careful when

2 Watch out
  • You need frame-perfect edits but are using stream copy.

  • The source has broken timestamps and has not been normalized.

Examples

Use these as starting points, then tune quality, size, and timing on real input files.

Fast trim

Cut quickly without re-encoding. Good for rough clips.

ffmpeg -ss 00:01:30 -i input -t 00:00:20 -c copy clip.mp4

Command breakdown

-ss 00:01:30
Seeks to the given timestamp.
input input
Reads this input file.
-t 00:00:20
Limits output duration.
-c copy
Copies streams without re-encoding.
output clip.mp4
Writes this output file.

Accurate trim

Re-encode for a more exact clip boundary.

ffmpeg -i input -ss 00:01:30 -t 00:00:20 -c:v libx264 -crf 23 -c:a aac clip.mp4

Command breakdown

input input
Reads this input file.
-ss 00:01:30
Seeks to the given timestamp.
-t 00:00:20
Limits output duration.
-c:v libx264
Sets the video codec.
-crf 23
Controls visual quality. Lower values make larger, higher-quality files.
-c:a aac
Sets the audio codec.
output clip.mp4
Writes this output file.

Helpful tips

These details prevent most bad outputs and confusing FFmpeg results.

Input seek is fast

Putting `-ss` before `-i` seeks quickly, but copied video may start on a nearby keyframe.

Output seek is more accurate

Putting `-ss` after `-i` decodes up to the cut point and is slower.

Re-encode for exact cuts

If exact frame boundaries matter, re-encode the trimmed output instead of using `-c copy`.

Related guides

Useful next steps when this operation is part of a larger workflow.

Extract audio with FFmpeg

Learn how to extract audio from video with FFmpeg, choose MP3, WAV, or AAC, and avoid needless re-encoding.

Create video thumbnails with FFmpeg

Learn how to create thumbnails, choose useful timestamps, and generate contact sheets with FFmpeg.

Compress video with FFmpeg

Learn practical FFmpeg video compression using CRF, presets, bitrate caps, and web-safe MP4 settings.

Need to run this at scale?

Run the same FFmpeg commands through a hosted API.

Keep the FFmpeg command surface. Very Good FFmpeg handles machines, logs, long jobs, outputs, and webhooks.

Try free →Read API docs
Very Good FFmpegChecking status...
Product
  • How it works
  • Pricing
  • Comparison
  • FAQ
Developers
  • Documentation
  • API Reference
  • MCP Server
  • TypeScript SDK
  • Python SDK
Company
  • Contact
  • Sign in
  • Sign up
Legal
  • Terms
  • Privacy
Compare
  • vs Rendi
  • vs RenderIO
  • vs ffmpeg-api.com
  • vs FFmpeg Micro
  • vs AWS MediaConvert
  • vs Google Transcoder API
  • vs Self-Hosted FFmpeg
  • vs Cloudinary
Integrations
  • Zapier
  • Make
  • n8n
Use Cases
  • Video SaaS Platforms
  • Content Creators & UGC Platforms
  • AI Video Startups
  • Agencies & Freelancers
  • Podcasts & Audio Pipelines
Guides
  • Convert video format with FFmpeg
  • Compress video with FFmpeg
  • Extract audio with FFmpeg
  • Trim video with FFmpeg
  • Create video thumbnails with FFmpeg
  • Resize video with FFmpeg
  • Add subtitles with FFmpeg
Best APIs
  • Best Video Transcoding API (2026)
  • Best Video Compression API (2026)
  • Best Audio Extraction API (2026)
  • Best API for Trimming Video (2026)
  • Best Video Thumbnail API (2026)
  • Best Video Resizing API (2026)
  • Best API for Adding Subtitles to Video (2026)
  • Best FFmpeg API (2026)
© 2026 Very Good FFmpeg