$targetFolder = Get-Location
$ffmpegPath = "ffmpeg"
Get-ChildItem -Path $targetFolder -Filter *.mp4 | ForEach-Object {
$sourceFile = $_.FullName
$destinationFile = $_.DirectoryName + "\" + $_.BaseName + "_converted.mp4"
& $ffmpegPath -i $sourceFile -c:v libx265 -crf 19 -c:a copy $destinationFile
}
파이썬이 ㄹㅇ 선녀같음 ㅇㅅㅇ
파이프로 받아서 foreach하는게 힙하다던데
ㄹㅇ ms는 언어쉽게만드는데 소질이 없는듯