Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Split a Video With FFmpeg (Why -c copy Ignores Your Segment Time, N Equal Parts, Scene Cuts, and a pytest Check)

Short answer: to split a video with FFmpeg, use the segment muxer: ffmpeg -i input.mp4 -map 0 -c copy -f segment -segment_times 4.041667,7.083333 -reset_timestamps 1 part_%03d.mp4 That is lossless and fast, but with -c copy FFmpeg can only cut on keyframes , so -segment_time 2 does not mean "2-second parts". If you need exact lengths you must re-encode and force a keyframe at every boundary.…

FFmpeg is a powerful tool for splitting videos, but it requires a specific command to achieve exact segment lengths without using the lossless and fast -c copy method. This command must include the segment muxer, specify the segment times, reset timestamps, and output the parts with sequential numbering.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Sunday 15 November →