Created
September 28, 2012 07:47
-
-
Save tiernano/3798509 to your computer and use it in GitHub Desktop.
Convert Files to AppleTV2 format using PowerShell and HandBrake
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
$files = gci "path to your file location" | |
$handbrake = "C:\Program Files\HandBrake\HandBrakeCLI.exe" | |
foreach($file in $files) { | |
$newFileName = "path to where you want the files to be set to..." + [System.IO.Path]::GetFileNameWithoutExtension($file) + ".m4v" | |
& $handbrake -i $file.FullName -o $newFileName --preset "AppleTV 2" | |
if ($LastExitCode -ne 0) | |
{ | |
Write-Warning "Error converting $($file.FullName)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment