Conversation
…single-GOP videos analyzeKeyframeIntervals returned isProblematic: false for any video with fewer than two keyframes. A video with exactly one keyframe is one GOP spanning the whole file, so every seek past 0 decodes from the start. Zero keyframes keeps the old result. One keyframe now reports the video stream's duration as the interval and flags the file over the existing 2s threshold. The video stream duration, not the container duration, is used so a 1s picture inside a 10s audio container is not flagged. Closes heygen-com#3460
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3460
analyzeKeyframeIntervalsreturnedisProblematic: falsefor any video with fewer than two keyframes. A video with exactly one keyframe is one GOP spanning the whole file, so every seek past 0 decodes from the start. The compiler warned about a 5s GOP and stayed silent about a 10s one.This change splits the early return. Zero keyframes (still images) keep the old result. One keyframe now reports the video stream's duration as both the average and max interval, and flags the file when that duration exceeds the existing 2s threshold. It reads
videoStreamDurationSecondsfrom the cachedextractMediaMetadataprobe, per the maintainer note on the issue: a 1s picture in a 10s audio container has a 1s GOP, so the container duration is the wrong number.Scope: interval math only. The warning text in
compileForRenderis unchanged.Repro (from the issue), before and after, on macOS with ffmpeg 8:
Tests: three new cases in
ffprobe.test.ts(single keyframe over 2s flags, short video stream inside a long audio container does not flag, zero keyframes stays silent).oxfmt --check,oxlint, enginetsc --noEmit, and the producermediaProbeConcurrencytest pass.