Browse Source

improve stream selection

pull/22/head
Mikael Finstad 6 years ago
parent
commit
42e9e0d122
  1. 5
      index.js

5
index.js

@ -264,6 +264,7 @@ module.exports = async (config = {}) => {
'-movflags', 'faststart', '-movflags', 'faststart',
'-y', outPath, '-y', outPath,
]; ];
const args = [ const args = [
...(enableFfmpegLog ? [] : ['-hide_banner', '-loglevel', 'panic']), ...(enableFfmpegLog ? [] : ['-hide_banner', '-loglevel', 'panic']),
@ -275,6 +276,10 @@ module.exports = async (config = {}) => {
'-i', '-', '-i', '-',
...(audioFilePath ? ['-i', audioFilePath, '-shortest'] : []), ...(audioFilePath ? ['-i', audioFilePath, '-shortest'] : []),
'-map', '0:v:0',
...(audioFilePath ? ['-map', '1:a:0'] : []),
...(audioFilePath ? ['-acodec', 'aac', '-b:a', '128k'] : []), ...(audioFilePath ? ['-acodec', 'aac', '-b:a', '128k'] : []),
...outputArgs, ...outputArgs,

Loading…
Cancel
Save