Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Using data forsaken into .mp3 file  (Read 3110 times)

0 Members and 1 Guest are viewing this topic.

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Using data forsaken into .mp3 file
« on: December 05, 2012, 06:27:02 pm »
I was thinking of using some music that is in .mp3 file and using it in SFML but that requires freeing it from the patent prison of mp3 format which is where my question comes in:
What is the most resonable method of converting .mp3 into something useful for audio module while not making it weight a ton or lose a lot in terms of quality?
Back to C++ gamedev with SFML in May 2023

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Using data forsaken into .mp3 file
« Reply #1 on: December 05, 2012, 06:30:57 pm »
Ogg/vorbis (.ogg) is similar to mp3, but free and supported by SFML.

Some will say that ogg/vorbis is even slightly better than mp3.
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Using data forsaken into .mp3 file
« Reply #2 on: December 05, 2012, 06:36:33 pm »
I know, why did you tell me that?
The thing is, almost all I found out when trying to search in google for way to turn mp3 into some free format is "don't convert to ogg or quality will be abysmal", often with people getting ridiculed for saying it won't be.
The .mp3s are quite high quality and I myself don't hear any slight change but I'm on a bit old setup with half broken cheap headphones and I use weird sound settings for myself so I can't just eyeball it like that.
« Last Edit: December 05, 2012, 06:48:15 pm by FRex »
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: Re: Using data forsaken into .mp3 file
« Reply #3 on: December 05, 2012, 08:18:42 pm »
I know, why did you tell me that?
Well you didn't say that you already know something, so we assume you know nothing... ;)

I don't really understand what you want... Are you looking for an application to convert audio files (e.g. Freemake Audio Converter) or are you looking for a lossless format (e.g. WAV, not sure if FLAC is supported) or do you want an equivalent to the MP3 (e.g. OGG as already mentioned and as you know alteady too)?
Give a specific question and you'll get a presiece answer.

Also the discussion about audio quality is quite controversal and you'll nearly always find both positions, so don't search for 'the truth', it doesn't exist and most of it is personal preferences. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Using data forsaken into .mp3 file
« Reply #4 on: December 05, 2012, 08:34:02 pm »
Quote
Well you didn't say that you already know something, so we assume you know nothing... ;)
;D ;D ;D

I am looking for best practice in converting .mp3 to use them with SFML(I have music that is in .mp3, I won't get it in .ogg, .flac, .wav, .exploiter or any other cool free format).
For a try I converted it into .ogg and they're same size and (to my bad ear) almost same quality but apparently it's not the optimal way because what that does is take .mp3 which is lossy, decompress it on the fly and then compress it to .ogg vorbis which is lossy too.
Back to C++ gamedev with SFML in May 2023

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Using data forsaken into .mp3 file
« Reply #5 on: December 05, 2012, 08:51:44 pm »
I don't understand your problem. Take a free audio converter, convert your mp3s to oggs, and that's it. I don't think that the quality loss is noticeable for normal people.  What does "apparently it's not optimal" mean? Do you have a real problem?

And mp3 is lossy, ogg is lossy, so yes the result is lossy. If you want a different result then use a different format. In any case, I don't think that the conversion process has anything to do with the result (as long as you don't use a crappy software), only the chosen format is relevant.
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Using data forsaken into .mp3 file
« Reply #6 on: December 05, 2012, 09:15:59 pm »
Quote
I don't think that the quality loss is noticeable for normal people.
Well ok then.
Quote
Do you have a real problem?
I used to but that was my mistake, now .ogg is optimal.
Back to C++ gamedev with SFML in May 2023

NightCabbage

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Using data forsaken into .mp3 file
« Reply #7 on: December 06, 2012, 02:57:46 am »
If it helps, I use a program called "fre:ac".
When converting from mp3 to ogg, make sure you chose your bitrate settings carefully, and then simply listen to the music to make sure it's fine.

 

anything