Compare commits
2 Commits
windows-he
...
windows-he
Author | SHA1 | Date | |
---|---|---|---|
|
fa56cba0bd | ||
|
6f2b0ae9ef |
@ -72,14 +72,20 @@ Write-Host "--------------------------------------------------------------------
|
|||||||
|
|
||||||
foreach($video in $videos)
|
foreach($video in $videos)
|
||||||
{
|
{
|
||||||
|
# Check filename for '-HVEC' string and skip filetester if true to make it run faster with lots of files already converted
|
||||||
$video = $video.Replace("`"", "")
|
if(! $video -match "-HVEC")
|
||||||
$inputFile = $videoPath + $video
|
{
|
||||||
|
$video = $video.Replace("`"", "")
|
||||||
|
$inputFile = $videoPath + $video
|
||||||
|
|
||||||
|
# Get and check File info for codec, if it's already HEVC: - JSON query: (['media']['track'][1]['Format'])
|
||||||
|
$fileDetails = cmd /c $fileTester $inputFile --Output=JSON | ConvertFrom-Json
|
||||||
|
$codec = $fileDetails.media.track[1].Format
|
||||||
|
#echo $codec
|
||||||
|
|
||||||
# Get and check File info for codec, if it's already HEVC: - JSON query: (['media']['track'][1]['Format'])
|
} else {}
|
||||||
$fileDetails = cmd /c $fileTester $inputFile --Output=JSON | ConvertFrom-Json
|
$codec = 'HVEC'
|
||||||
$codec = $fileDetails.media.track[1].Format
|
}
|
||||||
#echo $codec
|
|
||||||
|
|
||||||
# If not already HEVC, convert video using NVEncC64:
|
# If not already HEVC, convert video using NVEncC64:
|
||||||
if($codec -ne "HEVC")
|
if($codec -ne "HEVC")
|
||||||
@ -96,7 +102,7 @@ foreach($video in $videos)
|
|||||||
Write-Host
|
Write-Host
|
||||||
|
|
||||||
# If the Subtitles should not be copied, delete the "--sub-copy 1,2" argument.
|
# If the Subtitles should not be copied, delete the "--sub-copy 1,2" argument.
|
||||||
$arguments = "--input `"$inputFile`" --codec hevc --audio-copy 1,2 --sub-copy 1,2 --profile $profile --output `"$outputFile`""
|
$arguments = "--input `"$inputFile`" --codec hevc --audio-copy 1,2,3,4,5,6 --sub-copy 1,2,3,4,5,6 --profile $profile --output `"$outputFile`""
|
||||||
|
|
||||||
Start-Process $NVEncoder -ArgumentList $arguments -WindowStyle Minimized
|
Start-Process $NVEncoder -ArgumentList $arguments -WindowStyle Minimized
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user