XMA Quality with Towav by Mygoshi at 1:12 PM EDT on March 21, 2016
why the quality of XMA is always bad with Towav?? I mean, the XMA converted sounds like 128 kbps MP3 tracks...
by AnonRunzes at 2:42 PM EDT on March 21, 2016
Because XMA was based on the lossy WMA format.
Microsoft shilled this lame format(not XMA) as something that would surpass most audio formats(even MP3), and the result was nothing but disaster out of boasting the format(resulting in many WMA variants being developed, including the format itself) - and thus, XMA was born when Microsoft thought it was a good idea to make a WMA variant on their game console. Therefore it's lossy and compressed.
You can also decode XMA files with ffmpeg as well.

edited 2:46 PM EDT March 21, 2016
by kode54 at 3:09 PM EDT on March 21, 2016
For instance, the Windows version of Terraria uses 48kbps WMAv2 audio for its music.

The only way to get decent music from the Windows version is to steal the music package from the Mac version, which uses MS ADPCM for the audio, which is considerably higher quality.

The Linux version uses high quality audio as well, but the audio pack isn't compatible with XNA. Possibly because they may be using Ogg Vorbis there?
by Mygoshi at 1:50 PM EDT on March 22, 2016
https://www.youtube.com/watch?v=bwyYl8jEKyc

You know, this little noise or ... bad quality with saxophone instrument.. I don't know how to explain...
by Mygoshi at 9:28 AM EDT on May 28, 2016
How can I use ffmpeg? (with Foobar2000) because I have just the source.
by AnonRunzes at 3:01 PM EDT on May 28, 2016
@Mygoshi - If you just have the source, then compile it.
Otherwise, get the lastest build from here.

But if you want to know how exactly you are going to convert that .xma, then here are the exact parameters:

"ffmpeg -i [input file].[input format] [output file].wav"

See?
by Mygoshi at 9:38 AM EDT on May 29, 2016
Ok, it works, but how to improve the quality to remove the artifact ?
by AnonRunzes at 12:23 PM EDT on May 29, 2016
@Mygoshi - I don't know, just use some audio editing program or something.
Otherwise you can check out the ffmpeg documentation pages.
by kode54 at 7:22 PM EDT on May 29, 2016
You can't remove the artifacts. They're a permanent result of the compression. It's like trying to recover the original CD from a low quality MP3 rip.
by Mygoshi at 1:03 AM EDT on May 30, 2016
But I found how to remove the noise of XMA, you just have to use ffmpeg to convert into 320k WMA, and it works.
by hcs at 2:49 AM EDT on May 30, 2016
> But I found how to remove the noise of XMA, you just have to use ffmpeg to convert into 320k WMA, and it works

That seems odd, does converting to uncompressed 16-bit PCM WAV sound different than converting to 320k WMA?

I'd think that purely decoding to PCM with ffmpeg (vs with toWav) might produce better audio, whereas converting to WMA would involve another lossy encoding step. (unless ffmpeg has some way to losslessly rebuild XMA as WMA, which I doubt)

edited 2:53 AM EDT May 30, 2016
by Mygoshi at 7:36 AM EDT on May 30, 2016
I forgot to add -ar 48000 (it's better). But I mean, when I convert into wav with towav, there's artifact (don't know how to explain) but with saxopohne instrument or guitar instrument there's a problem of artifact, like in this video :
Hear the beginning, there's clearly a problem : https://www.youtube.com/watch?v=bwyYl8jEKyc

compared to this : https://www.youtube.com/watch?v=C1oVL0GDIKA

AND CONVERT INTO WMA is like the second video, and normal towav is the first. The second is not produced by ffmpeg through, I foudn it on the composer's website, but it's an example, the WMA conversion looks like the composr's website quality (and remove the artifact)



edited 7:39 AM EDT May 30, 2016
by hcs at 4:09 PM EDT on May 30, 2016
But what about converting to WAV with ffmpeg?
by Mygoshi at 4:25 PM EDT on May 30, 2016
It gives the same quality as towav
by AnonRunzes at 5:13 PM EDT on May 30, 2016
So you think that decoding .xma to .wma is going to give better quality reuslts than .wav? Cool story, gotta try that out.
by Mygoshi at 5:39 PM EDT on May 30, 2016
What? I didn't say that convert to wma give better quality, I said WMA remove the artifact compared to other formats. It's all about artifact, not quality.
by AnonRunzes at 5:40 PM EDT on May 30, 2016
@Mygoshi - Ahh, I see what you were trying to do now. So that means...
by Mygoshi at 6:00 PM EDT on May 30, 2016
That means what ? Listen to the two youtube videos, you can clearly see the difference with saxophone
by hcs at 10:50 PM EDT on May 30, 2016
Very strange, can you post the source XMA file for that track?
by kode54 at 12:16 AM EDT on May 31, 2016
But XMA _already is WMA_, just _lower quality WMA_. So when you're converting WMA to WMA, you're transcoding lossy to lossy, with another step of degradation.

I suppose if you think converting to higher bitrate WMA masks the artifacts of the lower bitrate WMA, you're welcome to do it. Just don't try to distribute the results to anyone.
by Mygoshi at 1:39 AM EDT on May 31, 2016
Why? I want to explain to others who want to know how to remove artifact also...
by Infernus Animositas at 9:41 AM EDT on May 31, 2016
Upload the XMA file used in the video you posted before so I can do a comparison.
by Mygoshi at 10:32 AM EDT on May 31, 2016
I don't understand. You want the original XMA or the XMA converted for the video ?
by hcs at 11:09 AM EDT on May 31, 2016
Mygoshi, we're glad you were able to figure out a way to fix the files, but we suspect that something odd is going on that you aren't explaining correctly. We want the original XMA so we can do the conversion ourselves.

We're trying to understand what is going on, as converting to WMA instead of PCM WAV shouldn't result in any quality improvement. ffmpeg is almost certainly doing an internal XMA->PCM->WMA conversion. It might be that something else is playing back WMA and WAV differently on your system (or on Youtube?). Or maybe you're playing the old ToWav WAVs instead of the new ffmpeg WAVs?

It would be most helpful if you also include the exact command line you used with ffmpeg, both with converting to WMA and to WAV.


Thanks for putting up with us trying to understand this.

edited 11:09 AM EDT May 31, 2016
by Mygoshi at 11:39 AM EDT on May 31, 2016
Ok, so the XMA i'm giving is not from the same game, but it's exactly same artifact problem with guitar instrument or saxophone for example. This one is not XMA 32khz through, (like the video), but this XMA i'm giving is a 44.1kHz.
Here's the XMA : https://mega.nz/#!j5VzETII!2GY1Rg-_wHfxU-ZJWQc7bdqOzuMVioVC4QAJ1h_-DVQ

And here's the command I used to convert into wma : ffmpeg -i airport_race_4.xma -ar 48000 -b:a 320k airport_race_4.wma

and to test to wav or other I simply did : ffmpeg -i airport_race_4.xma airport_race_4.wav (that ToWav do automatically) or ffmpeg -i airport_race_4.xma -b:a 320k airport_race_4.wav (not sure if I have to put 320k or 4096)

You will hear that WMA remove the artifact (not totally) on guitar instrument, and WAV or MP3 don't remove it. (but I think WAV is better if you don't think about artifact, just quality)


edited 11:42 AM EDT May 31, 2016
by Infernus Animositas at 1:55 PM EDT on May 31, 2016
Why are you changing the sample rate from 44100Hz to 48000Hz?
by Mygoshi at 1:57 PM EDT on May 31, 2016
Isn't better?
by hcs at 2:37 PM EDT on May 31, 2016
It's better to have audio sampled at 48000 than 44100, but you can't make 44100 better by resampling to 48000; resampling can't recreate frequencies that are missing from the input signal.
by Mygoshi at 2:55 PM EDT on May 31, 2016
Did you test my solution for artifact ?
by Mygoshi at 10:41 AM EDT on June 7, 2016
??
by AnonRunzes at 10:46 AM EDT on June 7, 2016
Honestly, I'd rather decode .xma files to .wma than to .wav if that's how you're putting it.

Besides, I lack some .xma files with me at this point so maybe I'll consider your "solution".

edited 10:52 AM EDT June 7, 2016
by kode54 at 1:15 AM EDT on June 9, 2016
You're not "fixing" anything, you're masking it by running it through another lossy codec.

It's like trying to fix your low bitrate "DivX ;-)" DVD rips by smearing Vaseline on your monitor, then filming the results with an HD camcorder.
by nobody1089 at 2:11 AM EDT on June 9, 2016
Here's one (unlikely) possibility Mygoshi could be correct:

* When FFmpeg decodes XMA, it introduces artifacts
* FFmpeg translates XMA to WMA without reencoding the content
* Playing the resulting WMA file (in a non-FFMPEG player) does not introduce artifacts

The third bullet is probably true. The first two, less likely.
by Mygoshi at 6:06 AM EDT on June 9, 2016
I don't know guys, if it's not a good info for you, it's not my problem. Personnally I prefer when XMA has better quality.

edited 9:19 AM EDT June 9, 2016
by kode54 at 11:15 PM EDT on June 9, 2016
Then you'll have to ask the original game developers to waste more bits on higher quality audio, because FFMPEG decodes it with the "full" quality that is available.

XMA is essentially WMAv2. It is also usually encoded at really terrible bitrates. Encoding to higher bitrates to the same format again *may* mask the original artifacts with all new artifacts, while any other encoder/format would actually try to reproduce those artifacts in an effort to reproduce the "original" (decoded from XMA) signal.
by Mygoshi at 6:12 AM EDT on June 10, 2016
But the problem is that I can't hear any bad quality/artifacts when playing Xbox 360 games you know. There's no solution to get a converted file that sounds in game? You will say that games uses filter or some tools to increase the quality but no, not of all games use this, and they even don't have any artifacts.
by hcs at 11:32 AM EDT on June 10, 2016
Can't argue with what you hear, glad you found a solution you're happy with. Let's not continue this discussion, everyone.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source