Last active
March 5, 2023 07:10
-
-
Save mrcodetastic/66c03d5c41605df8b12283fec8c90a79 to your computer and use it in GitHub Desktop.
ffmpeg Windows Powershell - Copy Video and Re-Encode DTS audio to two channel AAC codec
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
# Change 'F:\ffmpeg' to the path where your FFMPEG executable is | |
# Usefull on a cheap TV with USB that can't handle many audio codec versions. | |
# Pre-requisite: Download ffmpeg.exe (static version) and put it somewhere in your windows PATH variable. | |
Get-ChildItem -Recurse -File -Include *.mkv | Foreach { #*.mp4,*.mov,*.avi,*.mkv | Foreach { | |
$newname = $_.fullname.subString(0, $_.fullname.Length-4) + "_conv.mkv"; | |
ffmpeg.exe -i $_.fullname -c:v copy -c:a mp3 -ac 2 -b:a 256k -y $newname; | |
echo "Saving as: $($newname)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment