Skip to content

Commit

Permalink
🔨 add powershell script to split stereo sound files into 2 mono files
Browse files Browse the repository at this point in the history
- see
  • Loading branch information
TheAfroOfDoom committed Oct 17, 2024
1 parent 6b9e50f commit e921247
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package-scripts/dev/split-ogg-stereo-to-mono.ps1
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit e921247

Please sign in to comment.