Preparing your files

How to Split a Video into Parts Without Losing Quality

The cleanest way to split a video into parts is a stream copy: the tool cuts the file without re-encoding, so the picture is untouched and the job takes seconds. The trade-off is that cuts can only start on keyframes, so pick split points at keyframes near natural pauses. ffmpeg and graphical tools such as LosslessCut both work this way, and a frame-accurate cut is possible when you accept a re-encode.

8 min read · Updated

Why lossless cuts snap to keyframes

Most video codecs, including H.264, HEVC, VP9 and AV1, store only a few complete pictures. These are keyframes (also called I-frames). The frames between them are stored as changes relative to neighboring frames. A decoder that starts in the middle of that chain has nothing to apply the changes to.

That is why a cut without re-encoding has to begin on a keyframe. If you ask ffmpeg to copy from 12:03 and the nearest keyframes are at 12:01 and 12:05, the new part either starts at 12:01, so it includes two extra seconds, or it starts at 12:03 with a moment of frozen or garbled picture until the next keyframe arrives. Which one you get depends on the tool and its options.

How far apart keyframes are varies a lot. Camera and phone footage often has one every second or two. Screen recordings, livestream archives and heavily compressed downloads can go many seconds between keyframes, which makes lossless cuts noticeably imprecise. If you are unsure what a codec is or why it compresses this way, the video codec explainer covers the background.

Find the keyframes and the pauses before you cut

A good split point satisfies two conditions: nobody is mid-sentence, and there is a keyframe there. You can find both with free tools.

To list keyframe times, run ffprobe -v error -select_streams v:0 -skip_frame nokey -show_entries frame=pts_time -of csv=p=0 input.mp4 and save the output to a text file. Each line is the timestamp of one keyframe in seconds. Older ffprobe versions call the field pkt_pts_time instead.

To find pauses, ffmpeg's silence detector prints where the audio drops below a threshold: ffmpeg -i input.mp4 -af silencedetect=noise=-35dB:d=0.8 -f null - and look for silence_start and silence_end lines. Raise the threshold if the room is noisy, or lengthen the duration to find only real breaks.

Then pick, for each split, a keyframe that falls inside a silence. In an editor or LosslessCut you can do the same visually by looking at the waveform and stepping between keyframes.

Splitting with ffmpeg without re-encoding

  1. Note your chosen split times from the keyframe list, for example 1690.52 and 3342.08 seconds.
  2. For one part at a time, give a start and an end: ffmpeg -ss 1690.52 -i input.mp4 -to 1651.56 -c copy -map 0 part02.mp4 (with -ss before the input, the -to value counts from the new start, so it is the part's length).
  3. To cut the whole file in one pass at those points, use the segment muxer: ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_times 1690.52,3342.08 -reset_timestamps 1 part%02d.mp4
  4. To cut into equal lengths instead, replace the segment_times option with -segment_time 1800 for half-hour parts; ffmpeg still waits for the next keyframe after each half hour.
  5. Open each part, play the first and last few seconds, and check the durations add up to the original.

The -map 0 option keeps every stream, including extra audio and subtitle tracks, which is usually what you want for an archive. Leave it out if you only want the default video and audio.

Graphical tools that split losslessly

LosslessCut is a free, open-source app for Windows, macOS and Linux built on ffmpeg. It shows the waveform and keyframes, lets you mark segments and exports them with stream copy. For most people who don't want a terminal, it is the most direct route to the method above.

Avidemux can also cut without re-encoding when both video and audio output are set to Copy; it warns you if a cut isn't on a keyframe. Full editors such as DaVinci Resolve, Shotcut, iMovie or Premiere Pro re-encode on export by default, which is fine for quality at high settings but slower and not lossless. Use them when you are editing anyway, not just to divide a file.

When a frame-accurate cut is worth re-encoding

Sometimes the keyframe nearest to the pause is too far away, for example in a screen recording with keyframes ten seconds apart. Then you have three options.

  • Re-encode only the parts: ffmpeg -ss 1693.2 -i input.mp4 -t 1650 -c:v libx264 -crf 18 -c:a aac part02.mp4 cuts exactly where you ask, at the cost of time and a small, usually invisible, quality loss at a low CRF value.
  • Accept an overlap of a few seconds and trim the repeat later, which is often fine for review copies.
  • Re-encode the whole source once with shorter keyframe intervals, then split it losslessly as many times as you like.

Smart-cut features in some tools re-encode only the few frames around a cut and copy the rest. They work well with common codecs but can fail on unusual files, so check the result.

Example: dividing a course recording into lessons

Recorded training day

A 95-minute MP4 of an internal course covers six topics. Learners want each topic as its own video, and the team wants to dub three of the lessons for a Spanish-speaking office, without touching the other three.

The trainer lists keyframes and silences, then picks the five pauses where she moves to a new slide section. Four fall within a second of a keyframe. The fifth sits in a screen-share segment with sparse keyframes, so she moves that split three seconds earlier to the start of a long pause, where a keyframe exists. LosslessCut exports six files in under a minute.

Only lessons two, four and five, totaling 41 minutes, go to dubbing. That costs 2,050 credits ($2.05) instead of dubbing the full 95 minutes, and each lesson can be reviewed and re-run on its own.

Naming parts so they can be put back together

Splitting is easy; reassembling a pile of files called "clip (3) final.mp4" is not. A naming scheme prevents that.

  • Use a zero-padded sequence number first, so files sort correctly: course_01, course_02 and so on.
  • Add the start time in the source, for example course_02_0h28m10s.mp4. This is the offset you need later to shift subtitles back into the original timeline.
  • Add a language code to processed versions, such as course_02_es.mp4, and never overwrite the original part.
  • Keep a short text log with each part's start time, duration and the keyframe it was cut on.

Reassembling translated parts

If the parts were cut losslessly and processed the same way, they usually share codecs and settings, so ffmpeg's concat demuxer can join them without re-encoding. Create a text file named list.txt with one line per part, in order, in the form file 'course_01_es.mp4', then run ffmpeg -f concat -safe 0 -i list.txt -c copy course_es.mp4. If ffmpeg complains about mismatched streams, or the joined file stutters at a boundary, re-encode during the join instead.

Subtitles need their timestamps shifted. Each part's SRT starts at zero, so the cues for part two must be moved forward by part two's start time before the files are merged and renumbered. Subtitle editors such as Subtitle Edit can offset an entire file and join files, and subtitle timestamp alignment explains how SRT timing works. Often, publishing the parts separately is simpler than rejoining at all.

Pitfalls when splitting video

  • Cutting mid-sentence. Speech recognition and translation lose the sentence on both sides of a cut, and a voice track can start or end abruptly.
  • Overlap at boundaries. Keyframe-snapped cuts can repeat a second or two; when rejoining, a repeated phrase is the giveaway. Cutting both parts at the same keyframe time avoids it.
  • Very short parts. Per-file minimums in many services, including mydubly's dubbing minimum of 2 minutes per file, make tiny parts cost more.
  • Audio clicks at joins. Audio and video frames rarely end at exactly the same instant, so a join in the middle of speech can click. Joins in silence are inaudible.
  • Variable frame rate sources. Phone and screen recordings often use variable frame rate, which some tools handle poorly when cutting; see variable frame rate explained if parts drift out of sync.

Splitting video for mydubly

mydubly accepts files up to 2 hours each, so most videos don't need splitting at all. Split when a recording is longer than that, when you only want some sections translated, or when you want to publish or review chapters separately. Long-form specifics, such as keeping terminology consistent across parts and keeping the tab open for a long job, are covered in translating long videos.

Each part is its own job, priced on its own: a transcript is 1 credit per minute with a 5-credit minimum per file, and dubbing is 50 credits per minute with a 2-minute minimum. Pick the same target language and the same voice for every part so they sound continuous, since one chosen voice speaks each whole file.

The translated video for each part keeps the original picture, because the browser swaps in the new audio track instead of re-encoding; the browser muxing article explains how. That makes losslessly cut parts good candidates for a lossless rejoin later. If a part's video codec can't go into MP4, that part comes back as MKV, so join those parts into an MKV as well.

Before you cut

Keep the untouched original, decide why you are splitting, and find keyframes inside pauses before you export anything. When the parts are ready, run them through the video translator one at a time, or see the step-by-step translation guide for the rest of the workflow.

Frequently asked questions

Why does my split part start with a gray or frozen picture?

The cut started between keyframes while copying the stream, so the player had no complete frame to draw until the next keyframe arrived. Either move the start to a keyframe time from the ffprobe list, put the -ss option before the input so ffmpeg seeks to a keyframe, or re-encode that part so it begins exactly where you asked. LosslessCut can also snap cut points to keyframes for you.

Can I split a video by file size instead of time?

ffmpeg has an -fs option that stops writing when a size limit is reached, but each part then ends wherever the limit falls, often mid-sentence. A better approach is to divide the size limit by the file's bitrate to estimate a duration, then split at keyframes inside pauses near that duration. You get parts under the limit that also start and end cleanly.

Does splitting a video reduce its quality?

Not with stream copy, which is what ffmpeg's -c copy option, LosslessCut and Avidemux in copy mode do. The picture and sound data are written to the new files unchanged. Quality only changes when a tool re-encodes, as most full video editors do on export. At high quality settings that loss is hard to see, but it isn't zero, and repeated re-encodes add up.

How do I split a video into equal parts?

Use ffmpeg's segment muxer with a fixed duration, such as -segment_time 600 for ten-minute parts, together with -c copy and -reset_timestamps 1. Each part will run slightly past the requested length because ffmpeg waits for the next keyframe. If equal parts must also avoid cutting through speech, adjust individual split points by hand after checking where the pauses are.

Should I split before or after translating?

For recordings over 2 hours, you must split first, because each file can be at most 2 hours long. Otherwise, translate the whole file if you will publish it as one video, since a single job keeps the voice and timeline continuous. Split first when you only need some sections, want to publish chapters, or want reviewers to work on parts in parallel.