Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ffmpeg/encoder: encode only N minus offset frames after seek
FFmpeg will always encode N frames specified in the -vframes option unless it hits input EOF before N frames have been read. We assumed that the input file to the test case only contained N frames specified in the test case config. Thus, we compensated the frame count when setting up the metrics in seek cases... asserting that ffmpeg always hit input EOF. For example: input = 50 frames, case specifies 50 frames at 25 fps and seek = 1... ffmpeg will only encode 25 frames even with "-vframes 50". However, if the input file contains more frames than specified in the test case configuration, then ffmpeg will encode up to N frames after the seek. For example: input = 150 frames, case specifies 50 frames at 25 fps and seek = 1... ffmpeg will encode 50 frames with "-vframes 50". Unfortunately, we don't have a current method to determine the "actual" length of the input file to compensate this properly. Therefore, to make it deterministic, we need to update the test cases' frames property to "N - offset" so that ffmpeg -vframes only encodes "N - offset" frames for seek cases regardless of input length. This also removes the need to compensate the number of frames in the metrics setup. Fixes: VIZ-20687 Signed-off-by: U. Artie Eoff <[email protected]>
- Loading branch information