To trim a gameplay clip just before a turn or a jump, mark the first picture you want and check the exported file against it. In our eight-second driving sample, we asked for a cut at 1.400 seconds. Copying the compressed video packets with the command below started the excerpt at source frame 60. Decoding and encoding the excerpt began at frame 42, the one we marked. At 30 frames per second, that difference cost the viewer six tenths of a second of context.
| Cut from the same file | First source frame, counting from zero | Pictures delivered |
|---|---|---|
| Output-side seek and video stream copy | 60 | 42 |
| Output-side seek and lossless encode | 42 | 60 |
| Intended two-second excerpt | 42 | 60 |
Pick the picture that explains the action
In a GTA VI clip, the first thing you want viewers to see might be a route choice at a junction. If the car is already halfway through the turn when the excerpt starts, the payoff survives but the choice disappears. On the editor timeline, move backward from the payoff and identify the earliest picture someone needs to understand it. Make a note of both that picture and the last one you want to include. A timestamp from a public watch page can help you find an event again, but these commands need a local recording you have permission to edit. For getting that file off a console, see the capture guide.
For a repeatable test we used the SuperTuxKart benchmark, credited to the SuperTuxKart authors on Commons. We took eight seconds beginning at source time 0:18, resized to 640 by 360 and made a 30 fps H.264 editing master. We placed a keyframe every two seconds, disabled scene-cut keyframes and disabled B-frames. That setup gives a known comparison between a requested picture and the next independent picture. Your recorder can choose different keyframes. The six-tenths result belongs to this test file.
What the copy command actually kept
Try the two cuts on a copy in a new folder. The name master.mp4 here means the input to both cuts. Give each output its own filename. This first command deliberately selects picture only so an earlier audio packet cannot obscure the comparison.
ffmpeg -i "master.mp4" -ss 1.4 -t 2 -an -c:v copy "copy.mp4"
The position of the seek argument matters. Here it appears after the input. FFmpeg processes output starting at the requested time. With video stream copy it has compressed packets to pass on, including pictures that depend on earlier pictures. In this file the first usable picture the output retained was the independent picture at 2.000 seconds. The output contained 42 pictures before the requested end. If a different program places a seek before the input, retains preroll or writes a different container, the apparent start can differ. Use the actual output to decide. FFmpeg documents seeking and stream copy separately.
Check the exact cut without guessing from a thumbnail
Make a comparison file using a lossless intermediate. FFV1 in Matroska is convenient for this particular check because it lets us compare decoded pixels without introducing another lossy change. It is a test format here. You can deliver an ordinary H.264 editing copy afterward.
ffmpeg -i "master.mp4" -ss 1.4 -t 2 -an -c:v ffv1 "exact.mkv"
ffmpeg -v error -i "master.mp4" -map 0:v:0 -f framemd5 "source-frames.txt"
ffmpeg -v error -i "exact.mkv" -map 0:v:0 -f framemd5 "exact-frames.txt"
Open the two text files. Ignore header lines starting with a hash sign. Each data line ends with the checksum of one decoded picture. Compare the first checksum from exact-frames with the checksum on the 43rd data line from source-frames. Our values matched. There are 42 pictures before that line, which is why an editor counting from zero calls this frame 42. Run the same checksum command on copy.mp4 and compare its first value with the 61st data line. That was the first match in our copy test. FFmpeg frame checksum formats
When the scene is perfectly still, consecutive identical pictures can produce the same value. Check several neighbors in order, or choose a moving reference. When delivering a lossy encode, use visual landmarks or a frame stepper. A small encoding change can alter a checksum while leaving the correct cut visible. If your source changes frame rate, use presentation times from the file to identify the boundary. Multiplying seconds by 30 worked here because we created a constant-rate master.
Put the sound back for the viewing copy
For a master containing one video and one wanted audio stream, use the same boundaries on both streams. This example targets the first audio stream. Listen to it before choosing that mapping on a multi-track recording.
ffmpeg -i "master.mp4" -ss 1.4 -t 2 -map 0:v:0 -map 0:a:0 -c:v libx264 -c:a aac "highlight.mp4"
Play the finished highlight from a stopped player, then step through the first few pictures. Check the lead-in, the part immediately before the end and the sound at both points. A black thumbnail from the operating system tells you little about those boundaries. If you can move the cut to a nearby keyframe without changing what the viewer understands, a verified copy may be sufficient. Keep the precise encode when the missing interval contains the setup.
Frequently asked questions
Why did my clip lose the lead-in?
A stream-copy cut can skip to a usable keyframe. Check the first decoded picture against the original.
Do I have to encode my entire session again?
You can encode only the highlight. Keep the full recording for later edits.
Can a correct duration prove the first frame is right?
A different two-second interval can have the same duration. Compare a recognizable picture at each boundary.



