AAC encoding from dff files |
AAC encoding from dff files |
Jan 31 2012, 10:51
Post
#1
|
|
![]() Group: Members Posts: 648 Joined: 10-January 06 From: Zagreb Member No.: 27018 |
Hello all.
I have a question; I have a tune in dff (sacd rip) format which I obtained by shady sources, and it is not relevant for this discussion. What I want to know is, how to encode it to aac? I am using foobar2000, and I loaded dff decoder plugin, and the song plays fine. But drum at the beginning peaks far above 0 dB, I guess it goes to +6. When I encode it to AAC, I use sox resampler plugin to convert it to 44100, but then it also peaks far above, but a bit less, I guess something about +3 or +4. I think it is because it is decoded AFAIK to 32bit float, which can handle higher peaks. I don't hear distortion whatsoever in original and encoded file, at least not on my desktop speakers, I haven't done any ABX test. The question is - is this OK? I know mp3 doesn't have bit depth in the normal way wav file has; but I don't know about AAC. Can it handle that high input for encoding and decode it properly, without artifacts, or would I have to use some sort of peak limiting before encoding, or just decode it to wav and then load it up in Audacity and normalize it's peak limits to zero? Thank you. |
|
|
|
![]() |
Jan 31 2012, 13:59
Post
#2
|
|
![]() Group: Developer Posts: 295 Joined: 22-November 10 From: Japan Member No.: 85902 |
In theory it is OK (same as MP3). However, it might depend on implementations.
At least encoder has to be able to eat float PCM. Same for decoder. I tried this before with fb2k + qaac, and it was fine. It had peak of 1.6 or so, and peak was preserved. Of course you have to set the maximum bitdepth to 32 on CLI encoder setting of fb2k. If you want to check the decoded result, just convert to WAV with fb2k (also specify 32bit here). In my case, I quickly looked at the decoded result with some Python scripting like the following: CODE import struct wavdata = open('foo.wav', 'rb').read() wavdata = wavdata[44:] # chop off the header. might be different on your case pcm = struct.unpack('f' * (len(wavdata)/4), wavdata) # parse as float32 sequence pcm = map(abs, pcm) # convert to abs values print 'peak: %g, avg: %g' % (max(pcm), sum(pcm)/len(pcm)) If you want to see just the peak of it, probably scanning with replaygain is enough. This post has been edited by nu774: Jan 31 2012, 14:09 |
|
|
|
hlloyge AAC encoding from dff files Jan 31 2012, 10:51
saratoga Can foobar replaygain scan the file? If so, the e... Jan 31 2012, 21:20
C.R.Helmrich I agree with nu774 and saratoga. Given an encoder ... Jan 31 2012, 22:49
hlloyge Foobar can scan the file, but can't save the r... Feb 1 2012, 10:52
nu774 Alternatively, as long as the encoder can take it ... Feb 1 2012, 11:29
benski One thing I've always been curious about - and... Feb 2 2012, 01:28
saratoga QUOTE (benski @ Feb 1 2012, 19:28) One th... Feb 2 2012, 01:47

benski QUOTE (saratoga @ Feb 1 2012, 20:47) QUOT... Feb 2 2012, 02:27

saratoga QUOTE (benski @ Feb 1 2012, 20:27) So pla... Feb 2 2012, 02:34
C.R.Helmrich QUOTE (benski @ Feb 2 2012, 02:28) ... do... Feb 2 2012, 11:45
.alexander. Haven't read the whole thread, just want to sa... Feb 2 2012, 12:19
hlloyge iPod Touch 2nd gen plays the file fine; I can... Feb 2 2012, 11:20![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 21:38 |