Update re-ordering of mp4 files

This commit is contained in:
HaveAGitGat 2022-05-25 08:19:25 +01:00
parent f8f5172765
commit 91b12d5b83
2 changed files with 95 additions and 3 deletions

View file

@ -102,6 +102,12 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
+ 'This may be due to a corrupt file or permissions issue when scanning the file.');
}
if (file.container === 'mp4' && file.ffProbeData.streams[0].codec_type === 'video') {
response.infoLog += 'File is mp4 and already has the video stream in the correct order!'
+ ' Due to FFmpeg issues when reordering streams in mp4 files, other stream ordering will be skipped';
return response;
}
let { streams } = JSON.parse(JSON.stringify(file.ffProbeData));
streams.forEach((stream, index) => {