Conversation
The MP3 file was 5.3 MB: the largest file in the exported project,
almost 2 MB larger than its nearest rival.
The reason it is so large is that it is compressed at 320 kbps.
Unfortunately the author does not provide an uncompressed version, so I
had to use the already-lossily-compressed audio. Converting it with this
command:
ffmpeg -y \
-i scenes/quests/story_quests/eldrune/Musica/Minstrel_Dance.mp3 \
-c:a libvorbis \
-q:a 3 \
scenes/quests/story_quests/eldrune/Musica/Minstrel_Dance.ogg
yields a much more reasonable 1.8 MB file at approximately 112 kbps.
Rename the .license file to match. Update the scene to use a
BackgroundMusic node rather than an AudioStreamPlayer2D node, and in the
process play the music back through the Music bus rather than the Master
bus.
Helps #1707
This was previously one of the larger tracks. Recompressing it to Ogg Vorbis reduces its size a little, from 3.1 MB to 2.4 MB. Rather than converting the MP3 to Ogg Vorbis, I found that the original author publishes a lossless WAV file, so I converted that instead for improved quality. Again, use a BackgroundMusic node in the outro scene.
This only saves a small amount of space, but in the process (in Audacity) I also reduced its amplitude by -10 dB, matching the adjustment previously made to the AudioStreamPlayer2D node that played it. Update the scene to play it with BackgroundMusic rather than AudioStreamPlayer2D. The piece is in G major, so replace the F♮ note on one of the shells with F♯ to match.
1 task
|
Play this branch at https://play.threadbare.game/branches/endlessm/eldrune-reduce-music-size/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
Member
Author
|
This shaves 4.2 MB off the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minstrel_Dance.mp3 is 5.3 MB: the largest file in the exported project, almost 2 MB larger than its nearest rival, and 5% of the total size of the game.
A couple of other tracks in this quest are also large, though not so dramatically.
Convert these to Ogg Vorbis at a slightly lower quality level that to me still sounds good and reduces the size. Use BackgroundMusic nodes, reducing the amplitude of one of the tracks so that it is quieter than the sequence puzzle shells, and adjust the pitch of one of the shells to match the music.