(filePath: string)
| 923 | |
| 924 | const 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 | |
| 945 | const ensureVideoHasAudio = async ( |
| 946 | inputPath: string, |
| 947 | outputPath: string, |
no test coverage detected