Mikael Finstad 1 year ago
parent 751287b7cd
commit af9fe16bb4
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -300,7 +300,7 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea
const chaptersInputIndex = copyFileStreamsFiltered.length;
const rotationArgs = rotation !== undefined ? ['-metadata:s:v:0', `rotate=${360 - rotation}`] : [];
const rotationArgs = rotation !== undefined ? ['-display_rotation:v:0', String(360 - rotation)] : [];
// This function tries to calculate the output stream index needed for -metadata:s:x and -disposition:x arguments
// It is based on the assumption that copyFileStreamsFiltered contains the order of the input files (and their respective streams orders) sent to ffmpeg, to hopefully calculate the same output stream index values that ffmpeg does internally.
@ -383,6 +383,8 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea
...getOutputPlaybackRateArgs(),
...rotationArgs,
...inputArgs,
...mapStreamsArgs,
@ -405,8 +407,6 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, trea
...getExperimentalArgs(ffmpegExperimental),
...rotationArgs,
...getVideoTimescaleArgs(videoTimebase),
'-f', outFormat, '-y', outPath,

Loading…
Cancel
Save