Jump to content


Which sound format is better?


16 replies to this topic

#1 yuceltas

    New Member

  • Members
  • Pip
  • 3 posts

Posted 09 April 2008 - 11:11 AM

We are going to develop a train simulator for the education of machinist candidates. The simulator will be realistic like the real train, with all of its features. Hence, we need the sounds to be heard by the machinist like driving the real train. We are planning to collect the real train sounds on the train and use FMOD library to provide the sounds.
But we don’t know in which format to collect the sounds. When choosing the sound format to use in our project, we should take into some considerations (such as quality, size, loading time, etc.).
Which format is suitable for this purpose (.wav, .mp3, etc.)? What are the advantages and disadvantages of the sound formats?
I will be appreciated if you help me…

Thanks

#2 TheNut

    Senior Member

  • Moderators
  • 1718 posts
  • LocationCyberspace

Posted 09 April 2008 - 12:19 PM

You should keep all original samples in a lossless format like WAV. It's also the most widely supported. Now if you want, you can make compressed versions of those wavs in either mp3 or ogg format for your simulator. These are the two most popular formats. The quality loss is negligible at bitrates of 128kb or higher and will be better to stream from if you have music or long audio streams playing.
http://www.nutty.ca - Being a nut has its advantages.

#3 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 09 April 2008 - 02:54 PM

Isn't mp3 patented? IIRC, you could face lawsuits if you use it without paying/permission...
"Stupid bug! You go squish now!!" - Homer Simpson

#4 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 09 April 2008 - 03:01 PM

Kenneth Gorking said:

Isn't mp3 patented? IIRC, you could face lawsuits if you use it without paying/permission...
IIRC the decoder is free, but the encoder isn't. But this is definitely something worth looking into, so don't blindly trust my words on this :). Or, you could avoid all the hassle and simply use Ogg, which is public domain.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#5 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 09 April 2008 - 03:43 PM

I'm not sure exactly what patent restrictions there are on MP3, but I'm pretty sure they don't even prevent you from encoding to it, otherwise projects like LAME couldn't exist...
reedbeta.com - developer blog, OpenGL demos, and other projects

#6 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 09 April 2008 - 04:08 PM

Projects like LAME are merely source code for educational purposes. Why do you think there are no binaries to be found on the website? :)

From the LAME website:

Quote

LAME is an educational tool to be used for learning about MP3 encoding. The goal of the LAME project is to use the open source model to improve the psycho acoustics, noise shaping and speed of MP3. LAME is not for everyone - it is distributed as source code only and requires the ability to use a C compiler. However, many popular ripping and encoding programs include the LAME encoding engine, see: Software which uses LAME.

Using the LAME encoding engine (or other mp3 encoding technology) in your software may require a patent license in some countries.

This is also an interesting read
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#7 martinsm

    Member

  • Members
  • PipPip
  • 88 posts

Posted 09 April 2008 - 06:18 PM

http://www.mp3licens...help/index.html

Quote

5) Do I need a license to distribute mp3, mp3PRO or mp3surround encoded content?

Yes. A license is needed for commercial (i.e., revenue-generating) use of mp3/mp3PRO in broadcast systems ...

However, no license is needed for private, non-commercial activities (e.g., home-entertainment, receiving broadcasts and creating a personal music library), not generating revenue or other consideration of any kind or for entities with associated annual gross revenue less than US$ 100 000.00.


#8 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 09 April 2008 - 07:54 PM

Kenneth Gorking said:

Isn't mp3 patented? IIRC, you could face lawsuits if you use it without paying/permission...

There are patents, but if you use the operation systems function to decompress the mp3 files you're out of the loop (at least that's what I've been told last time I checked the issue).

Otoh decoding ogg-files is much simpler and it's a self-contained library that you can link to your progream. You will never run into the problem that the someone dickhead runs your application on a system where the mp3 decoder has been deinstalled or stuff like that.

Nils
My music: http://myspace.com/planetarchh <-- my music

My stuff: torus.untergrund.net <-- some diy electronic stuff and more.

#9 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 09 April 2008 - 07:57 PM

I knew I had read something concerning mp3 patent infringement; it was Microsoft who barely dodged a $1.5 billion lawsuit from Alcatel :)
"Stupid bug! You go squish now!!" - Homer Simpson

#10 SamuraiCrow

    Senior Member

  • Members
  • PipPipPipPip
  • 459 posts

Posted 09 April 2008 - 08:32 PM

I'm surprised nobody mentioned FLAC which has the same quality as a 16-bit .wav but has better compression. The files may be somewhat larger than .MP3 or .OGG since both of those formats are lossy. It seems to be the best of both worlds for what you are looking for: authentic lossless sound format but with compression.

#11 onyxthedog

    Senior Member

  • Members
  • PipPipPipPip
  • 467 posts

Posted 09 April 2008 - 10:16 PM

Again you could pretty easily make your own file compression with the Python standard library. That way you could get exactly what you want and you don't have to worry about lawsuits.

#12 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 09 April 2008 - 11:28 PM

I'd recommend against that; the compressors built into Python's standard library are just for standard generic formats like gzip and bz2. These aren't specialized for audio and so wouldn't achieve compression ratios or performance as good as the specialized ones like FLAC. They are also lossless and therefore can't compress as much as a lossy format like Ogg or MP3.
reedbeta.com - developer blog, OpenGL demos, and other projects

#13 onyxthedog

    Senior Member

  • Members
  • PipPipPipPip
  • 467 posts

Posted 10 April 2008 - 01:11 AM

I was actually refering to audioop.py, but I didn't really think of the compression files.

#14 Reedbeta

    DevMaster Staff

  • Administrators
  • 5340 posts
  • LocationSanta Clara, CA

Posted 10 April 2008 - 01:31 AM

That module doesn't have any compression support except for very simple delta encoding. And I don't think you'd really want to roll your own audio compressor from scratch. :)
reedbeta.com - developer blog, OpenGL demos, and other projects

#15 onyxthedog

    Senior Member

  • Members
  • PipPipPipPip
  • 467 posts

Posted 10 April 2008 - 02:41 AM

True, but I bet some person out there will take that as a challenge and create the new and improved MP-Gogol.

#16 yuceltas

    New Member

  • Members
  • Pip
  • 3 posts

Posted 25 April 2008 - 06:58 AM

Thanks for your advices; they were very useful:)

#17 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 28 April 2008 - 07:10 PM

onyxthedog said:

True, but I bet some person out there will take that as a challenge and create the new and improved MP-Gogol.
What do you have against Ogg Vorbis?
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users