Replace deprecated -vsync flag with -fps_mode in Clone-Video.ps1 and Get-FramesRange.ps1 frame extraction commands to use current ffmpeg syntax while maintaining vfr (variable frame rate) behavior
This commit is contained in:
1 parent
50c9d831e9
commit
cda0b6a4b8
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -898,7 +898,7 @@ if (-not [string]::IsNullOrWhiteSpace($Sequence)) {
|
|||||||
'-y'
|
'-y'
|
||||||
'-i', $SourcePath
|
'-i', $SourcePath
|
||||||
'-vf', $videoFilter
|
'-vf', $videoFilter
|
||||||
'-vsync', 'vfr'
|
'-fps_mode', 'vfr'
|
||||||
'-frames:v', '1'
|
'-frames:v', '1'
|
||||||
'-q:v', '1'
|
'-q:v', '1'
|
||||||
'--', $SequencePath
|
'--', $SequencePath
|
||||||
@@ -984,7 +984,7 @@ if ($StartFrame -gt 0 -or $actualEndFrame -lt $maxFrameIndex) {
|
|||||||
$videoFilter = $filterParts -join ','
|
$videoFilter = $filterParts -join ','
|
||||||
$ffmpegArgs += @(
|
$ffmpegArgs += @(
|
||||||
'-vf', $videoFilter
|
'-vf', $videoFilter
|
||||||
'-vsync', 'vfr'
|
'-fps_mode', 'vfr'
|
||||||
)
|
)
|
||||||
$ffmpegArgs += $targetVideoEncodeArgs
|
$ffmpegArgs += $targetVideoEncodeArgs
|
||||||
if ($CRF -ge 0) {
|
if ($CRF -ge 0) {
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ for ($frameIndex = $startFrame; $frameIndex -le $endFrame; $frameIndex++) {
|
|||||||
'-y'
|
'-y'
|
||||||
'-i', $VideoPath
|
'-i', $VideoPath
|
||||||
'-vf', $videoFilter
|
'-vf', $videoFilter
|
||||||
'-vsync', 'vfr'
|
'-fps_mode', 'vfr'
|
||||||
'-frames:v', '1'
|
'-frames:v', '1'
|
||||||
'-q:v', '1'
|
'-q:v', '1'
|
||||||
'--', $outputFile
|
'--', $outputFile
|
||||||
|
|||||||
Reference in new issue
Block a user