Recommended Ogg Vorbis version and settings

Create music and sound effects for mainline or user-made content.

Moderator: Forum Moderators

Post Reply
CobraPL
Posts: 4
Joined: August 19th, 2010, 8:18 pm
Contact:

Recommended Ogg Vorbis version and settings

Post by CobraPL »

Greetings,

I have few suggestions:
  1. Always store original music/sound files in uncompressed (or losslessy compressed) form. But publish in Ogg Vorbis format. Keeping WAV files is good when new, better version of Vorbis appear. I suggest submitting music/sound in both Ogg Vorbis and WAV (or FLAC) format. Vorbis for release version, WAV for public backup for use in future.
  2. Never transcode files ! Converting lossy files to any lossy format always generate worse quality ! That's why storing original WAVs is so important. If you (we) have some files only in old Vorbis format it is better to leave them alone. So, mp3-->Ogg and Ogg--> Ogg is a bad idea.
  3. For best quality use latest Ogg Vorbis version and encoder. You can find it there: http://xiph.org/downloads/ . For Windows hosts I suggest user-friendly and optimized oggdropXPd. Latest version of Vorbis gives better quality for same bitrate and it is backwards compatible. In other words, latest Vorbis version is simply tuned.
  4. I suggest maintaining same bitrates for each type of data. For example Q=2 (~96kbps) for all sound files and Q=5 (~160kbps) for all music files or 128 for sound, 192 for music.
  5. It is "Ogg", not "OGG" ;) It is a container for Vorbis codec.
  6. You can receive some support on Hydrogenaudio forum.
I wrote above because I see music and sound encoded using very old version of encoder and (sometimes) weird settings like 40kbps for music. I also see, that some sounds are still in WAV format which is waste of space. I am also Ogg Vorbis fan.

Peter
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Recommended Ogg Vorbis version and settings

Post by Iris »

CobraPL wrote:Always store original music/sound files in uncompressed (or losslessy compressed) form. But publish in Ogg Vorbis format. Keeping WAV files is good when new, better version of Vorbis appear. I suggest submitting music/sound in both Ogg Vorbis and WAV (or FLAC) format. Vorbis for release version, WAV for public backup for use in future.
Many sound files are already stored in .wav format in the mainline repository under a separate branch:
http://svn.gna.org/viewcvs/wesnoth/bran ... ounds-wav/
Never transcode files ! Converting lossy files to any lossy format always generate worse quality !
This is why musicians provide .wav or .ogg versions prior to mainlining. This is usually done by private messaging, probably to avoid publishing links to gigantic files for the unwary.
It is "Ogg", not "OGG" ;) It is a container for Vorbis codec.
I'm one of the people who insists on the Ogg and Vorbis distinction around here — but being too insistent tends to annoy people more than help them to learn new things, so beware.
I also see, that some sounds are still in WAV format which is waste of space.
Those sounds are provided in .wav format in cases where converting them to Ogg Vorbis would involve a worthless decrease in quality while not reducing the file size significantly. Note that those sounds also tend to be rather small files:
File sizes listing
shadowm@bluecore:~/src/wesnoth$ du -h sounds/*.wav data/core/sounds/*.wav
36K sounds/arrive.wav
108K sounds/bell.wav
4.0K sounds/button.wav
4.0K sounds/checkbox.wav
4.0K sounds/contract.wav
8.0K sounds/expand.wav
100K sounds/join.wav
36K sounds/leave.wav
8.0K sounds/receive.wav
4.0K sounds/select-unit.wav
4.0K sounds/select.wav
8.0K sounds/slider.wav
76K sounds/timer.wav
56K data/core/sounds/bat-flapping.wav
4.0K data/core/sounds/dagger-swish.wav
48K data/core/sounds/dart.wav
236K data/core/sounds/dwarf-laugh.wav
108K data/core/sounds/entangle.wav
92K data/core/sounds/fanfare-short.wav
20K data/core/sounds/fire.wav
12K data/core/sounds/ghoul-hit.wav
8.0K data/core/sounds/groan.wav
12K data/core/sounds/gunshot.wav
44K data/core/sounds/hatchet-miss.wav
48K data/core/sounds/hatchet.wav
72K data/core/sounds/heal.wav
44K data/core/sounds/hiss-big.wav
128K data/core/sounds/hiss-die.wav
76K data/core/sounds/hiss-hit.wav
48K data/core/sounds/hiss.wav
12K data/core/sounds/horse-canter.wav
20K data/core/sounds/horse-elf-canter.wav
40K data/core/sounds/mace.wav
8.0K data/core/sounds/magicmissile.wav
20K data/core/sounds/mermen-hit.wav
72K data/core/sounds/net.wav
8.0K data/core/sounds/open-chest.wav
152K data/core/sounds/slowed.wav
80K data/core/sounds/spear.wav
28K data/core/sounds/squishy-hit.wav
28K data/core/sounds/squishy-miss.wav
24K data/core/sounds/squishy-strike.wav
24K data/core/sounds/staff.wav
20K data/core/sounds/throw-1.wav
20K data/core/sounds/throw-2.wav
20K data/core/sounds/throw-3.wav
20K data/core/sounds/throw-4.wav
24K data/core/sounds/ugg.wav
348K data/core/sounds/wail-long.wav
152K data/core/sounds/wail-sml.wav
220K data/core/sounds/wail.wav
116K data/core/sounds/water-blast.wav
16K data/core/sounds/zombie-attack.wav
Directory size comparison
shadowm@bluecore:~/src/wesnoth$ du -sh sounds data/core/sounds/ data/core/music/
532K sounds
7.7M data/core/sounds/
138M data/core/music/
shadowm@bluecore:~/src/wesnoth$ du -sh images/ data/core/images/
4.2M images/
92M data/core/images/
So...yeah. :|

I'm wondering exactly what people are the intended audience for your lecture here. UMC maintainers who occasionally handle music and sound files for their add-ons, mainline musicians, or mainline developers?
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
CobraPL
Posts: 4
Joined: August 19th, 2010, 8:18 pm
Contact:

Re: Recommended Ogg Vorbis version and settings

Post by CobraPL »

Thank You for your answer,
shadowmaster wrote:
CobraPL wrote:Always store original music/sound files in uncompressed (or losslessy compressed) form. But publish in Ogg Vorbis format. Keeping WAV files is good when new, better version of Vorbis appear. I suggest submitting music/sound in both Ogg Vorbis and WAV (or FLAC) format. Vorbis for release version, WAV for public backup for use in future.
Many sound files are already stored in .wav format in the mainline repository under a separate branch:
http://svn.gna.org/viewcvs/wesnoth/bran ... ounds-wav/
It is very good of course. But I see few files only (yet).
shadowmaster wrote:
CobraPL wrote:Never transcode files ! Converting lossy files to any lossy format always generate worse quality !
This is why musicians provide .wav or .ogg versions prior to mainlining. This is usually done by private messaging, probably to avoid publishing links to gigantic files for the unwary.
IMO they should always provide WAVs. WAVs should be IMO stored somewhere in public, of course not in releases - for use later. The question is, who will make Ogg Vorbis files. I don't care how this part is/will be made, just use latest Vorbis version and encoder and good kbps value (quality value).
shadowmaster wrote:
CobraPL wrote:It is "Ogg", not "OGG" ;) It is a container for Vorbis codec.
I'm one of the people who insists on the Ogg and Vorbis distinction around here — but being too insistent tends to annoy people more than help them to learn new things, so beware.
Well, I wrote that just for people information. It is indeed not important ;)
shadowmaster wrote:
CobraPL wrote:I also see, that some sounds are still in WAV format which is waste of space.
Those sounds are provided in .wav format in cases where converting them to Ogg Vorbis would involve a worthless decrease in quality while not reducing the file size significantly. Note that those sounds also tend to be rather small files:
shadowmaster wrote:
File sizes listing
Directory size comparison
So...yeah. :|

I'm wondering exactly what people are the intended audience for your lecture here. UMC maintainers who occasionally handle music and sound files for their add-ons, mainline musicians, or mainline developers?
Well, not converted sounds in WAVs take only 2,77MB indeed. Still, size reduction will be quite big in %, tiny in KB. So, encoding those WAVs is mostly about maintaining order. About quality - well, Vorbis is transparent for most people at 128kbps. There are guys with "killer samples", top quality hardware, who train in hearing loss of quality using lossy codecs. Thay probably will find difference.

For who is my post ?
1. People who submit music and sound. To do this in WAV format, eventually also in Ogg Vorbis (if so, then use latest encoder with good settings). Last thing depends on how we (you) resolve encoding work. I see ideal solution, probably impossible in 100% of cases:
All music and sound is in WAV (but not transcoded from mp3, Ogg Vorbis or other lossy format) stored somewhere. Devs encode Oggs from time to time (new version of Ogg Vorbis, other cases) and provide complete set of Oggs for BfS builds - but with correct Vorbis version and settings. BTW. there will be Vorbis 2 perhaps, in some years, then BfW project could switch swiftly.
2. Devs, who make rules and/or advices about music submitting and storig. If they agree with me, they could change rules/advices.
3. All visitors who encode to Ogg Vorbis for any purpose - information about codec version and settings could be handy for them.

EDIT: I just realised, that most of sound files are at 22050Hz. Someone though it will be sufficent. It is, but Vorbis encoded 44100Hz has better quality than downsampled WAVs.
EDIT2: There are indeed very few files, which are VERY small in WAV - encoding them to Ogg Vorbis will cause free space loss.

Peter
User avatar
West
Retired Lord of Music
Posts: 1173
Joined: October 30th, 2006, 7:24 am
Location: In the philotic connections between ansibles.
Contact:

Re: Recommended Ogg Vorbis version and settings

Post by West »

CobraPL,

I can only speak for the music submissions. But the thing is, Wesnoth's not exaclty a new project. It's been going on for years and for a long time the only *technical* requirement for submitting music was that it was in ogg format. Thus various contributors have been using whatever versions of the vorbis codec they had access to at the time. I know perfectly well that not all material is of the same quality, but it's not a trivial thing to fix as many music contributors aren't around anymore.

Things are changing though. For more recent submissions I've asked the musicians for lossless files and handled the ogg conversion myself. But I still doubt that we will be able to get hold of uncompressed or lossless versions of each and every tune in the game. Even if a contributor is willing to provide it, there's no guarantee that s/he can even open a project file that is five years old or more. All we can do is keep the classic tunes as is and make sure the quality of future submissions is up to us.

Hopefully that clears things up. I understand that your post is well-meaning but it does feel a bit presumptuous. Yeah, we did think of all that, thank you very much.
Post Reply