MCPcopy Create free account
hub / github.com/TomClive/SeeDance2Stitcher / analyseSession

Function analyseSession

server.js:652–676  ·  view source on GitHub ↗
(id, video1, video2, names = {})

Source from the content-addressed store, hash-verified

650}
651
652async function analyseSession(id, video1, video2, names = {}) {
653 const [meta1, meta2, frames1, frames2] = await Promise.all([
654 ffprobe(video1),
655 ffprobe(video2),
656 decodeGray(video1),
657 decodeGray(video2)
658 ]);
659 const fps = meta1.fps || meta2.fps || 24;
660 const analysis = analyzeFrames(frames1, frames2, fps);
661 const session = {
662 id,
663 video1,
664 video2,
665 names: {
666 video1: cleanBaseName(names.video1 || video1, "video1"),
667 video2: cleanBaseName(names.video2 || video2, "video2")
668 },
669 meta1,
670 meta2,
671 analysis,
672 createdAt: Date.now()
673 };
674 sessions.set(id, session);
675 return session;
676}
677
678async function handleAnalyze(req, res) {
679 try {

Callers 1

handleAnalyzeFunction · 0.85

Calls 4

ffprobeFunction · 0.85
decodeGrayFunction · 0.85
analyzeFramesFunction · 0.85
cleanBaseNameFunction · 0.85

Tested by

no test coverage detected