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
# Search through directories for videos and compress t x265 Codec (append x265 to the original file name and possibly rename old file with .orig) also convert sound to aac as well | |
# Create a new file, exclude any existing x265 filename appended files and don't convert WhatsApp videos already compressed or copied from phone (VID*) | |
# Change 'D:\Temp\ffmpeg' to the path where your FFMPEG executable is | |
Get-ChildItem -Recurse -File -Exclude VID-*,*x265* -Include *.mp4,*.mov,*.avi | Foreach { | |
$newname = $_.fullname.subString(0, $_.fullname.Length-4) + "_x265.mp4"; | |
#$oldname = "$($_.basename).orig$($_.extension)"; | |
D:\Temp\ffmpeg -i $_.fullname -c:v libx265 -preset slow -crf 23 -c:a aac -b:a 128k -y $newname; | |
echo "Saving as: $($newname)"; | |
#echo "Renaming original file: $($_.fullname) as $($oldname)"; | |
#rename-item -path $_.fullname -newname "$($_.basename).orig$($_.extension)" |
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
041d4aac86c4629f7392f7ce123ac459432406f143eb343cf1993150aa452b8e0b87a03d7e5d3fab1cc49a37e41964cbc7e62cc20f26b539832e2818077bedaf3d |
NewerOlder