我必须在我的项目中使用ffmpeg-normalize(https://github.com/slhck/ffmpeg-normalize)。
除了编码在Windows上遇到问题外,一切正常:
$OutputEncoding = [System.Text.Encoding]::Unicode
$OutputEncoding
Get-WinSystemLocale
pause
Get-ChildItem -path "./" -recurse | foreach ($_) {
if ($_.Extension -eq ".wav") {
write $_.FullName
ffmpeg-normalize $_.FullName -nt peak -t -20 -o $_.FullName -f
pause
}
if ($_.Extension -eq ".mp4") {
ffmpeg-normalize $_.FullName -c:a aac -nt peak -t -20 -o $_.FullName -f
}
if ($_.Extension -eq ".mp3") {
ffmpeg-normalize $_.FullName -c:a libmp3lame -nt peak -t -20 -o $_.FullName -f
}
}
这是显示器
BodyName : utf-16
EncodingName : Unicode
HeaderName : utf-16
WebName : utf-16
WindowsCodePage : 1200
IsBrowserDisplay : False
IsBrowserSave : True
IsMailNewsDisplay : False
IsMailNewsSave : False
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 1200
Parent : en
LCID : 1033
KeyboardLayoutId : 1033
Name : en-US
IetfLanguageTag : en-US
DisplayName : English (United States)
NativeName : English (United States)
EnglishName : English (United States)
TwoLetterISOLanguageName : en
ThreeLetterISOLanguageName : eng
ThreeLetterWindowsLanguageName : ENU
CompareInfo : CompareInfo - en-US
TextInfo : TextInfo - en-US
IsNeutralCulture : False
CultureTypes : SpecificCultures, InstalledWin32Cultures, FrameworkCultures
NumberFormat : System.Globalization.NumberFormatInfo
DateTimeFormat : System.Globalization.DateTimeFormatInfo
Calendar : System.Globalization.GregorianCalendar
OptionalCalendars : {System.Globalization.GregorianCalendar, System.Globalization.GregorianCalendar}
UseUserOverride : True
IsReadOnly : False
Press Enter to continue...:
C:\Users\user\Desktop\a\b\d\e\audio - Copy.wav
WARNING: Output file only supports one stream. Keeping only first audio stream.
Press Enter to continue...:
C:\Users\user\Desktop\a\b\d\不\audio - Copy.wav
ERROR: file C:\Users\user\Desktop\a\b\d\?\audio - Copy.wav does not exist
Press Enter to continue...:
C:\Users\user\Desktop\a\c\audio - Copy.wav
WARNING: Output file only supports one stream. Keeping only first audio stream.
Press Enter to continue...:
该程序在MacOS上运行良好,所以我认为这不是软件问题。看起来PowerShell没有正确地将参数发送到程序。
你有什么想法吗?
由于