MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / videoHasAudioTrack

Function videoHasAudioTrack

ai/ai.ts:925–944  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

923
924const videoHasAudioTrack = async (filePath: string): Promise<boolean> => {
925 try {
926 const { stdout } = await execFileAsync("ffprobe", [
927 "-v",
928 "error",
929 "-show_streams",
930 "-select_streams",
931 "a:0",
932 "-of",
933 "json",
934 filePath,
935 ]);
936
937 const info = JSON.parse(stdout);
938 const streams = info.streams || [];
939 return streams.length > 0;
940 } catch {
941 return false;
942 }
943};
944
945const ensureVideoHasAudio = async (
946 inputPath: string,
947 outputPath: string,

Callers 1

ensureVideoHasAudioFunction · 0.85

Calls 1

execFileAsyncFunction · 0.85

Tested by

no test coverage detected