Talked about reencoding in chat earlier with Fris0uman.
I've attached a python script below that converts the audio files (put in repository root, edit in the paths to your ffmpeg/ffprobe executables).
I'm not normally using python but I seen it used in repo so I thought it'd be more convenient, there might be blunders there :)
All files get converted to quality "3" (default for libvorbis), 48 khz sampling rate and target 128kbps bitrate
Sounds get downmixed to mono
Music gets downmixed to stereo (currently no music over stereo anyway)
The results for reencoding are in bytes
Folder |
Original |
Re-encoded |
% difference |
music/ |
177,323,829 |
129,014,538 |
73% |
Everything but music/ |
15,541,168 |
8,005,006 |
52% |
Using Logitech G533 and ~35 year old ears I couldn't hear a significant difference
I chose 48khz for sampling rate because a large bunch of android phones and bluetooth stacks have internal mixer running at 48khz, while a pc that can play cata with sounds shouldn't have issues downsampling if it uses 44.1(even though plenty of PC hardware is also using 48khz DACs, for example the G533, my laptop's realtek onboard sound, intel HDA soundcards etc).
This can be changed to 44.1 if it's a problem or more filesize is needed to be cut, lower than that would significantly hurt quality as next "notch" supported by hardware is 22.05 which cuts pretty deep into mid frequencies due to Nyquist.
Target bitrate of 128kbps and libvorbis quality "3" are competitors - the bitrate setting is only a hint of the wanted bitrate, libvorbis might go over it if it needs to maintain the quality. For example setting it to 96kbps still outputs files that have higher bitrate and running the script twice will try to re-encode these files again. So if lower bitrate is wanted the quality setting also needs to go down.
If that sounds (i mean literally, as my 35 year old ears might not perceive the difference) acceptable I can do a pr with reencoded files, or you can do it yourself, i'm not too certain how github works with submodules
reencode.txt