Add NoAudio and CRF parameters to re-encode detection logic and update parameter documentation to clarify when re-encoding is forced

This commit is contained in:
2026-06-07 21:16:06 -04:00
parent fcfa99dddc
commit 9cbe54d8d3
+4 -1
View File
@@ -23,10 +23,13 @@
.PARAMETER Size
Size of the output video. Uses the input video's size if not specified.
Possible values: 480p, 720p, 1080p, HD, 1440p, 2K, 2160p, 4K, or custom size in format "width:height".
Forces a video re-encode, since scaling requires re-encoding.
.PARAMETER FPS
Frames per second for the output video. Uses the input video's FPS if not specified.
Forces a video re-encode, since changing frame rate requires re-encoding.
.PARAMETER NoAudio
When present, excludes audio from the cloned video.
Forces a video re-encode, since removing the audio stream requires re-muxing the output file.
.PARAMETER Audio
Path to an alternate audio file to use for the target video. Can be absolute or relative to current directory. When specified, this audio replaces the source video's audio.
.PARAMETER CRF
@@ -400,7 +403,7 @@ if ($AudioPath) {
$ffmpegArgs += @('-i', $AudioPath)
}
$needsReencode = $scaleWidth -gt 0 -or $FPS -gt 0 -or $videoCodecMismatch -or $Reverse
$needsReencode = $scaleWidth -gt 0 -or $FPS -gt 0 -or $CRF -ge 0 -or $videoCodecMismatch -or $Reverse -or $NoAudio
if ($StartFrame -gt 0 -or $actualEndFrame -lt $maxFrameIndex) {
$filterParts = @('select=between(n\,{0}\,{1})' -f $StartFrame, $actualEndFrame)