Adding feature to override and review all corrupted files
This commit is contained in:
parent
f7768b4a68
commit
24a6f024b1
@ -4,12 +4,13 @@
|
||||
#-----------------------------------------------------------------------
|
||||
# Edit the $videoPath variable to point to your video-files folder:
|
||||
|
||||
#$videoPath = 'M:\1_movies\_main.movies\'
|
||||
$videoPath = 'M:\2_serien\_main.series\'
|
||||
$videoPath = 'M:\1_movies\_main.movies\'
|
||||
#$videoPath = 'M:\2_serien\_main.series\'
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# HEVC profiles: main, main10, main444
|
||||
$profile = 'main10'
|
||||
$forceReviewAll = $false # If set to $true all failed conversions are reviewed even those that are obviously corrupt.
|
||||
|
||||
$NVEncoder = "$PSScriptRoot\encoder\NVEncC64.exe"
|
||||
$fileTester = "$PSScriptRoot\mediainfo.exe"
|
||||
@ -152,7 +153,7 @@ foreach($video in $videos)
|
||||
{
|
||||
if (($StreamSize_new -eq $($StreamSize_old - 1)) -or ($($StreamSize_new - 1) -eq $StreamSize_old))
|
||||
{
|
||||
# Delete old video File!
|
||||
# Newly converted file does not match exactly the old duration!
|
||||
Write-Host "Conversion Done! - But streamsize is not exactly the same. - Please review!"
|
||||
Write-Host
|
||||
Write-Host "------------------------------------------------------------------------------------------------"
|
||||
@ -162,7 +163,19 @@ foreach($video in $videos)
|
||||
LogWrite "$inputFile,$outputFile"
|
||||
} else
|
||||
{
|
||||
# Delete corrupt File!
|
||||
if ($forceReviewAll)
|
||||
{
|
||||
# Mark probably corrupted file for review
|
||||
Write-Host "Conversion Failed! - Marked for review! because it is desired."
|
||||
Write-Host
|
||||
Write-Host "------------------------------------------------------------------------------------------------"
|
||||
$review = $true
|
||||
$convertedVideos = $convertedVideos + 1
|
||||
$Logfile = "$PSScriptRoot\logs\$logFolderName\review_needed.log"
|
||||
LogWrite "$inputFile,$outputFile"
|
||||
} else
|
||||
{
|
||||
# Delete obviously corrupt File!
|
||||
Write-Host "Conversion Failded! - Deleting new converted file.." -ForegroundColor Red
|
||||
Write-Host
|
||||
Write-Host "------------------------------------------------------------------------------------------------"
|
||||
@ -174,6 +187,7 @@ foreach($video in $videos)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
# Alert if video doesn't need conversion:
|
||||
|
Loading…
Reference in New Issue
Block a user