Skip to content

Commit

Permalink
⚡️ compress resourcepack images and sounds (#251)
Browse files Browse the repository at this point in the history
* ⚡️ further compress decorative images

* 🔧 add sample rate to sound stats script

* ⚡️ decrease quality of some sound files
- picked ones that played rarely and were harder to tell the difference in quality
- size: 2.33mb

* ⚡️ remove largesidevine elements that are barely visible anyway
  • Loading branch information
TheAfroOfDoom authored Oct 25, 2024
1 parent 7a2377f commit 51bd53f
Show file tree
Hide file tree
Showing 12 changed files with 336 additions and 1,909 deletions.
5 changes: 4 additions & 1 deletion package-scripts/list-sound-stats.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ foreach ($script:file in $files) {
$script:lufs = ffmpeg -i $file -af ebur128=framelog=verbose -f null - 2>&1 | grep -e "Integrated loudness:" -A 8
$script:lufsFormatted = ((($lufs.split('\n').where{$_ -ne ''}) | foreach-object -membername trim) -join [environment]::newline)

$script:statsLine = "# ${relativePath}$([environment]::newline)${channelsVolumeDiffMaxFormatted}$([environment]::newline)${channelsFormatted}$([environment]::newline)${lufsFormatted}$([environment]::newline)"
$script:sampleRate = ffprobe -v 0 -select_streams a:0 -show_entries stream=sample_rate -of compact=p=0:nk=1 $file
$script:sampleRateFormatted = "sampleRate: ${sampleRate}"

$script:statsLine = "# ${relativePath}$([environment]::newline)${channelsVolumeDiffMaxFormatted}$([environment]::newline)${channelsFormatted}$([environment]::newline)${sampleRateFormatted}$([environment]::newline)${lufsFormatted}$([environment]::newline)"
if ($out -ne '') {
$statsLine | out-file -filepath $out -append
} else {
Expand Down
Loading

0 comments on commit 51bd53f

Please sign in to comment.