disposition fix (#213)

* disposition fix

* Fix
This commit is contained in:
HaveAGitGat 2021-12-15 06:07:37 +00:00 committed by GitHub
parent da397edeb3
commit 1baa066cf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -116,11 +116,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
}
ffmpegCommand += ` -map 0:a:${streamIdx} -disposition:a:${streamIdx} default`;
ffmpegCommand += ` -map 0:a:${streamIdx} -disposition:a:0 default`;
for (var i = 0; i < allAudioTracks.length; i++) {
if (i !== streamIdx) {
ffmpegCommand += ` -map 0:a:${i} -disposition:a:${i} none `;
ffmpegCommand += ` -map 0:a:${i} `;
}
if (i !== 0) {
ffmpegCommand += ` -disposition:a:${i} 0 `;
}
}

View file

@ -119,11 +119,14 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
}
}
ffmpegCommand += ` -map 0:s:${streamIdx} -disposition:s:${streamIdx} default`;
ffmpegCommand += ` -map 0:s:${streamIdx} -disposition:s:0 default`;
for (var i = 0; i < allSubtitleTracks.length; i++) {
if (i !== streamIdx) {
ffmpegCommand += ` -map 0:s:${i} -disposition:a:${i} none `;
ffmpegCommand += ` -map 0:s:${i} `;
}
if (i !== 0) {
ffmpegCommand += ` -disposition:s:${i} 0 `;
}
}