Last active
June 1, 2025 17:27
-
-
Save keima/6649966090f732882ac0787abab6a72c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = async (args) => { | |
| var outputNumber = 1; | |
| if (Array.isArray(args?.inputFileObj?.ffProbeData?.streams)) { | |
| if ( | |
| args.inputFileObj.ffProbeData.streams | |
| .filter((stream) => stream.codec_type === 'audio') | |
| .length > 1 | |
| ) { | |
| outputNumber = 2; | |
| } | |
| } else { | |
| throw new Error('File has no stream data'); | |
| } | |
| return { | |
| outputFileObj: args.inputFileObj, | |
| outputNumber, | |
| variables: args.variables, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment