Created
April 20, 2020 13:25
-
-
Save JTBrinkmann/7ec0f9039e71a33243890af486ae6251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$inputs = ls -R -F *.mp4 | |
$i = 0 | |
for ($input in $inputs) { | |
Write-Progress -Activity "Converting Videos" -Status "$(++$i / $inputs.Length)% $($input.Name)" -PercentComplete $($i / $inputs.Length) | |
$output = Join-Path "..\compressed" ($_ | Resolve-Path -Relative) | |
if (Test-Path $output) { | |
echo "already exists: $output" | |
} else { | |
mkdir ($output | Split-Path) | |
ffmpeg -hide_banner -i $input -movflags faststart -r 25 -vf scale=-1:720 -tune stillimage $output | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment