Last active
March 26, 2024 19:55
-
-
Save mmodrow/e0446dae2dbbd0abbc8e9b05b1b919cd to your computer and use it in GitHub Desktop.
Use FFMpeg to strip (unusable) Audio from video files
This file contains hidden or 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
$videos = @(Get-ChildItem *.avi | Where-Object { -not $_.name.contains("_h264") -and -not $_.name.contains("_noAudio") }) | |
$total = $videos.count | |
$current = 1 | |
foreach ($video in $videos) { | |
$silentVideoName = $video.basename + "_noAudio_h264.mp4" | |
Write-Progress -Status "Stripping Audio and recoding video to h.264." -PercentComplete ($current / $total * 100) -Activity "Writing file $current of $total." | |
if ( -not (Test-Path $silentVideoName )) { | |
Write-Host ("Converting " + $silentVideo.name + " to " + $silentVideoName + ".") | |
ffmpeg -i $video.name -an -c:v libx264 -hide_banner -v warning $silentVideoName | |
} | |
$current++ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment