The swiss army knife of lossless video/audio editing
fix broken rotation
Mikael Finstadaf9fe16bb498
diff --git a/src/renderer/src/hooks/useFfmpegOperations.ts b/src/renderer/src/hooks/useFfmpegOperations.tsindex 1b3ae60b..206d1716 100644--- a/src/renderer/src/hooks/useFfmpegOperations.ts+++ b/src/renderer/src/hooks/useFfmpegOperations.ts@@ -300,7 +300,7 @@ function useFfmpegOperations({ filePath, treatInputFileModifiedTimeAsStart, treaconst 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,