Why a 30 second part has to be encoded, not just copied
The fastest way to split a video is not to encode it at all. A compressed video is a chain of frames that mostly describe how they differ from the one before, broken up every few seconds by a keyframe that stands on its own, and a file can be cut at a keyframe and copied without decoding a single picture. It takes seconds for any length of video. The catch is that a cut can only land on a keyframe. Phones and screen recorders place them anywhere from half a second to ten seconds apart, so a part meant to end at 30 seconds would end at the next keyframe instead, perhaps at 33, and a WhatsApp status that is 33 seconds long is refused. A limit that is only roughly respected is not a limit.
So every part here is encoded, using the same approach the trimmer uses for a single piece. The engine jumps to the keyframe before the part’s start, decodes forward to the exact frame, and encodes from there for exactly the part’s length, so a 30 second part is 30 seconds and the next part starts on the very next frame. The source file is read into the engine once and each part is encoded in turn, which is why the progress bar counts across all the parts rather than restarting for each one. The whole job takes about as long as the video plays.
The parts themselves are worked out before anything is encoded, and shown, so there is no surprise at the end. With a length limit every part is that long except the last, which is whatever remains. With equal parts the video’s length is divided evenly. A remainder shorter than a twentieth of a second is treated as rounding rather than as a part of its own, so a video that is 90.00001 seconds long split into 30 second parts gives three parts, not three and a sliver. Parts are numbered with leading zeros, so part 9 of 12 is part-09 and sorts before part-10 in any file browser, and they can be downloaded one by one or together as a single ZIP.
Each part comes out as an MP4 with H.264 picture and AAC sound, whatever the source was, because that is the pair every phone, messaging app and social site accepts. A WebM recording from a browser, whose sound is Opus, still gives parts that post anywhere. The sound in each part is cut at the same frame as the picture, so nothing is lost or repeated at the joins between parts, and a video with no sound gives parts with no sound track rather than a silent one. The whole source is read into the browser tab’s memory before the first part is encoded, which is fine for the phone clips and recordings people split for stories, but a video of several gigabytes can be more than a phone browser will hold. Like every video tool here, nothing is uploaded.