mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 02:35:54 -07:00
If mp4, only set video stream first, skip other stream ordering
This commit is contained in:
parent
384f652466
commit
03329da35b
2 changed files with 11 additions and 5 deletions
|
|
@ -102,9 +102,15 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||||
+ 'This may be due to a corrupt file or permissions issue when scanning the file.');
|
+ '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') {
|
if (file.container === 'mp4' && file.fileMedium === 'video') {
|
||||||
response.infoLog += 'File is mp4 and already has the video stream in the correct order!'
|
if (file.ffProbeData.streams[0].codec_type === 'video') {
|
||||||
+ ' Due to FFmpeg issues when reordering streams in mp4 files, other stream ordering will be skipped';
|
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;
|
||||||
|
}
|
||||||
|
response.processFile = true;
|
||||||
|
response.infoLog += 'File is mp4 and contains video but video is not first stream, remuxing';
|
||||||
|
response.preset = ',-map 0:v? -map 0:a? -map 0:s? -map 0:d? -map 0:t? -c copy';
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,11 +148,11 @@ const tests = [
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
processFile: true,
|
processFile: true,
|
||||||
preset: '<io> -c copy -map 0:1 -map 0:4 -map 0:2 -map 0:0 -map 0:3 -map 0:5 -map 0:6',
|
preset: ',-map 0:v? -map 0:a? -map 0:s? -map 0:d? -map 0:t? -c copy',
|
||||||
container: '.mp4',
|
container: '.mp4',
|
||||||
handBrakeMode: false,
|
handBrakeMode: false,
|
||||||
FFmpegMode: true,
|
FFmpegMode: true,
|
||||||
infoLog: 'Streams are not in the correct order!',
|
infoLog: 'File is mp4 and contains video but video is not first stream, remuxing',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue