Add Create-Clip.ps1 and Create-Clip.cmd wrapper scripts for automated clip creation with -Source and -Frames parameters, auto-generating target filenames with "-Clip" suffix before extension, and add 1920x1076 resolution support to Crop-ClipsKling.ps1 while removing verbose input logging
This commit is contained in:
+2
-6
@@ -108,20 +108,16 @@ foreach ($video in $videos) {
|
||||
}
|
||||
|
||||
$inRes = "{0}x{1}" -f $inInfo.Width, $inInfo.Height
|
||||
$inFpsText = if ($inInfo.Fps) { "{0:0.###}" -f $inInfo.Fps } else { 'unknown' }
|
||||
$inQuality = Format-Quality -BitRate $inInfo.BitRate
|
||||
$inAudioText = if ($inInfo.HasAudio) { 'yes' } else { 'no' }
|
||||
|
||||
$is1072 = ($inInfo.Height -eq 1072 -and ($inInfo.Width -eq 1920 -or $inInfo.Width -eq 1928))
|
||||
$is1916x1080 = ($inInfo.Width -eq 1916 -and $inInfo.Height -eq 1080)
|
||||
$is1920x1076 = ($inInfo.Width -eq 1920 -and $inInfo.Height -eq 1076)
|
||||
|
||||
if (-not $is1072 -and -not $is1916x1080) {
|
||||
if (-not $is1072 -and -not $is1916x1080 -and -not $is1920x1076) {
|
||||
Write-Host "Skipping: $($inInfo.FileName) (resolution $inRes)"
|
||||
continue
|
||||
}
|
||||
|
||||
Write-Host "Input : Filename=$($inInfo.FileName) Resolution=$inRes FPS=$inFpsText Quality=$inQuality Audio=$inAudioText"
|
||||
|
||||
if ($BackupRequired) {
|
||||
$backupPath = Join-Path $video.DirectoryName ($video.BaseName + '.bak' + $video.Extension)
|
||||
if ($PSCmdlet.ShouldProcess($backupPath, 'Create backup of original video')) {
|
||||
|
||||
Reference in New Issue
Block a user