From 99cdb275ba8f9c3adf7f0e1210604b64853b6ba5 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Wed, 16 Oct 2024 20:28:01 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20add=20powershell=20script=20to?= =?UTF-8?q?=20split=20stereo=20sound=20files=20into=202=20mono=20files=20-?= =?UTF-8?q?=20see?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-scripts/dev/split-ogg-stereo-to-mono.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 package-scripts/dev/split-ogg-stereo-to-mono.ps1 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 +}