diff --git a/package-scripts/dev/split-ogg-stereo-to-mono.ps1 b/package-scripts/dev/split-ogg-stereo-to-mono.ps1 new file mode 100644 index 000000000..0f7be8897 --- /dev/null +++ b/package-scripts/dev/split-ogg-stereo-to-mono.ps1 @@ -0,0 +1,7 @@ +# https://stackoverflow.com/a/47905308/13789724 +$files = Get-ChildItem ".\resourcepack\assets\omega-flowey\sounds\" +foreach ($f in $files) { + if ($(ffprobe -i $f.fullname -show_entries stream=channels -select_streams a:0 -of compact=p=0:nk=1 -v 0) -ne 2) { continue } + ffmpeg -i $f.fullname -map_channel 0.0.0 "$($f.directoryname)$($f.basename)_channel_0.ogg" -map_channel 0.0.1 "$($f.directoryname)$($f.basename)_channel_1.ogg" + remove-item $f.fullname +}