I am using Windows Server Edition 2012 and am very new to using Powershell. Basically, I am trying to convert a bunch of video files that are in a directory to .flv. The code I am using is this:
$inProcessPath = "E:\Random Videos\In Process\$env:username\"
$oldVideos = Get-ChildItem -Include @("*.mp4", "*.avi", "*.divx", "*.mov", "*.mpg", "*.wmv", "*.mkv") -Path $inProcessPath -Recurse #gets all of the videos
cd "E:\FFMPEG\bin\"
foreach ($oldVideo in $oldVideos) {
$newVideo = [io.path]::ChangeExtension($oldSong.FullName, '.flv')
.\ffmpeg.exe -i $oldVideo -y -async 1 -b 2000k -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast $newVideo
}
Whenever I run this I don't get any error messages but ffmpeg doesn't run either. I'm sure I'm overlooking something but have no idea what that could be. I've searched the website and compared code to others and still have no idea.