FFmpeg recipe

FFmpeg: Trim an MP4 (No Re-Encoding)

Stream-copy trims an MP4 between two timestamps without re-encoding. Output is bit-identical to the source — instant on any machine.

Command

ffmpeg -ss 00:00:10 -i input.mp4 -to 00:00:30 -c copy -y output.mp4
Prefer no terminal?
Use the Video Trimmer in your browser
Open Video Trimmer

What each flag does

-ssSeek to this timestamp (HH:MM:SS or seconds). Place BEFORE -i for fast keyframe seek; AFTER -i for sample-accurate seek.
-iInput file. Can be a video, audio, or image. Repeat for multiple inputs.
-toStop at this timestamp (absolute, not duration). Use -t instead for a relative duration.
-c copyStream-copy: no re-encoding. Output is bit-identical between cut points. Fastest possible.
-yOverwrite output file without confirmation.

Notes & gotchas

  • Place -ss BEFORE -i for fast keyframe seek. AFTER -i is sample-accurate but slower.
  • -to is the absolute end time. Use -t 20 for "encode 20 seconds starting from -ss" instead.
  • Stream-copy snaps to the nearest keyframe, which can offset the start by up to ~10 seconds in long-GOP video. Re-encode for frame-accurate cuts.

Related recipes