MCPcopy
hub / github.com/mifi/editly / readDuration

Function readDuration

util.js:16–21  ·  view source on GitHub ↗
(ffprobePath, p)

Source from the content-addressed store, hash-verified

14}
15
16export async function readDuration(ffprobePath, p) {
17 const { stdout } = await execa(ffprobePath, ['-v', 'error', '-show_entries', 'format=duration', '-of', 'default=noprint_wrappers=1:nokey=1', p]);
18 const parsed = parseFloat(stdout);
19 assert(!Number.isNaN(parsed));
20 return parsed;
21}
22
23export async function readFileStreams(ffprobePath, p) {
24 const { stdout } = await execa(ffprobePath, [

Callers 2

readVideoFileInfoFunction · 0.85
readAudioFileInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected