MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / analyzeKeyframeIntervals

Function analyzeKeyframeIntervals

packages/engine/src/utils/ffprobe.ts:405–417  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

403 * yt-dlp --download-sections or screen recordings often have sparse keyframes.
404 */
405export async function analyzeKeyframeIntervals(filePath: string): Promise<KeyframeAnalysis> {
406 const cached = keyframeCache.get(filePath);
407 if (cached) return cached;
408
409 const promise = analyzeKeyframeIntervalsUncached(filePath);
410 keyframeCache.set(filePath, promise);
411 promise.catch(() => {
412 if (keyframeCache.get(filePath) === promise) {
413 keyframeCache.delete(filePath);
414 }
415 });
416 return promise;
417}
418
419async function analyzeKeyframeIntervalsUncached(filePath: string): Promise<KeyframeAnalysis> {
420 const stdout = await runFfprobe([

Callers 2

compileForRenderFunction · 0.90
ffprobe.test.tsFile · 0.85

Calls 4

getMethod · 0.80
deleteMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected