MCPcopy
hub / github.com/simstudioai/sim / extractAudio

Function extractAudio

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

Source from the content-addressed store, hash-verified

534}
535
536async function extractAudio(
537 dir: string,
538 inputPath: string,
539 options: FfmpegOptions
540): Promise<FfmpegResult> {
541 const ext = (options.format || 'mp3').toLowerCase()
542 const outputPath = path.join(dir, `out.${ext}`)
543 const command = ffmpeg(inputPath).noVideo()
544 await runCommand(command, outputPath)
545 return readOut(outputPath, ext)
546}
547
548async function convert(
549 dir: string,

Callers 1

runFfmpegOperationFunction · 0.85

Calls 3

readOutFunction · 0.85
joinMethod · 0.80
runCommandFunction · 0.70

Tested by

no test coverage detected