Skip to main content

The new video still had five frames. Two original pictures were gone.

A video is a sequence of still pictures, called frames. Suppose you mark an object in the second picture and need that label on a new version of the clip. If both clips have exactly five frames, wouldn’t the second frame still show the same picture?

We made a clip with five distinct pictures, A through E, and converted it to a steady frame rate. B and D disappeared. C filled three of the five slots, including the second one where B had been. Copy a label from the second frame of the original to the second frame of the new clip and you put it on the wrong picture.

The original pictures began to appear at uneven times: A at 0.0 seconds, B at 0.1, C at 0.2, D at 0.7 and E at 0.8. We used FFmpeg 9.0.2 with fps=fps=5:round=near to make a clip that showed five frames a second. The converter now had a slot to fill every 0.2 seconds.

Read down the output-image column. It goes A, C, C, C, E. Reusing C in two extra slots kept the total at five, even though B and D had no slot at all. The table puts the original and new sequences side by side by frame number, counting from zero. It doesn’t mean that each output frame came from the original on the same row. FFmpeg fps filter

The original and converted sequences, lined up by frame number
Zero-based indexSource imageSource time (s)Output imageOutput time (s)
0A0.0A0.0
1B0.1C0.2
2C0.2C0.4
3D0.7C0.6
4E0.8E0.8

Each original picture had distinct pixel values, so we could identify the source of a frame by inspecting its pixels. FFmpeg also recorded which original picture supplied each output before it packaged the video. Counting from zero, the record named source frames 0, 2, 2, 2 and 4. For example, output position 1 came from source position 2, picture C. Decoding the finished video let us check two things separately. The pixels identified the source picture and the timestamps showed when it appeared.

We tried the same conversion on a second clip whose frames were already spaced 0.2 seconds apart. All five pictures survived there, each at its original time. FFmpeg input-frame statistics

Our test covered two invented lossless clips, one filter and one output rate. Before transferring real labels, trace each output frame to its source picture in the finished video. A converter’s frame record, where available, gives you a mapping to check against the decoded pictures. Here that trace would show that no output frame carried B, so B’s label had no matching picture to move to.