Delete folder
Browse files- h265/script/轉檔用.txt +0 -20
h265/script/轉檔用.txt
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
$inputFolder = "E:\飛取影片-YT\input_YTVideo" # 替換成你存放原始影片的資料夾路徑
|
| 2 |
-
$outputFolder = "E:\飛取影片-YT\input_YTVideo\h265" # 替換成你想要存放壓縮後影片的資料夾路徑
|
| 3 |
-
|
| 4 |
-
# 確保輸出資料夾存在
|
| 5 |
-
if (!(Test-Path $outputFolder)) {
|
| 6 |
-
New-Item -ItemType Directory -Path $outputFolder
|
| 7 |
-
}
|
| 8 |
-
|
| 9 |
-
# 遍歷資料夾中的每個 .mp4 檔案
|
| 10 |
-
Get-ChildItem -Path $inputFolder -Filter *.mp4 | ForEach-Object {
|
| 11 |
-
$inputFile = $_.FullName
|
| 12 |
-
$outputFile = Join-Path $outputFolder ($_.BaseName + "_720p_h265.mp4")
|
| 13 |
-
|
| 14 |
-
# 壓縮並轉換成 H.265 編碼,解析度調整為 720p
|
| 15 |
-
ffmpeg -i "$inputFile" -c:v libx265 -crf 28 -preset medium -vf "scale=-1:720" -c:a copy "$outputFile"
|
| 16 |
-
|
| 17 |
-
Write-Host "已完成處理檔案: $inputFile"
|
| 18 |
-
}
|
| 19 |
-
|
| 20 |
-
Write-Host "批量處理完成!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|