MCPcopy Index your code
hub / github.com/simstudioai/sim / thumbnail

Function thumbnail

apps/sim/lib/media/ffmpeg.ts:560–571  ·  view source on GitHub ↗
(
  dir: string,
  inputPath: string,
  options: FfmpegOptions
)

Source from the content-addressed store, hash-verified

558}
559
560async function thumbnail(
561 dir: string,
562 inputPath: string,
563 options: FfmpegOptions
564): Promise<FfmpegResult> {
565 const outputPath = path.join(dir, 'out.jpg')
566 const command = ffmpeg(inputPath)
567 .seekInput(options.start ?? 0)
568 .frames(1)
569 await runCommand(command, outputPath)
570 return readOut(outputPath, 'jpg')
571}
572
573export { extFromMime, mimeFromExt }

Callers 1

runFfmpegOperationFunction · 0.85

Calls 3

readOutFunction · 0.85
joinMethod · 0.80
runCommandFunction · 0.70

Tested by

no test coverage detected