HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: jamsig2 on 2016-02-07 04:52:07

Title: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-07 04:52:07
I have this source audio with 24-bit depth and 96khz freq as a wav file.
With the resampler, I encoded it to 16 bit 44.1khz.
Settings were:
Passband(I don't know what this is for) - 95% default
Best
Dithering - Always(read somewhere this is needed for depth changes)
16bit 44.1khz

But the result is different from retail version of the same CD album (16bit 44.1khz).
Peaks of my version are clipped at the top and sound somewhat noisy, whereas the retail looks like having compressed and sounds more comfortable.

How do I downsample properly like the studio did?
Can anyone help?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 05:20:51
I was experiencing slightly similar results. Asked here about dither and have been told not to bother with dither algorithms - foobar one works fine.

You can try the sound without dithering or using dbpoweramp/ssrc exampler, the SoX one I think is more audible ....
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 05:23:08
And one more thing: your 24/96 master sounds the same as your CD master?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-07 06:22:43
According to the store, yes it is (Édition Studio Masters).
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-07 06:24:59
I was experiencing slightly similar results. Asked here about dither and have been told not to bother with dither algorithms - foobar one works fine.

You can try the sound without dithering or using dbpoweramp/ssrc exampler, the SoX one I think is more audible ....
Thanks! Do you know what Passband is for?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 06:29:43
Unfortunately not.

Also would like to have optimal combination of "transparent" conversion.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 08:35:52
Also here the resamplers are compared http://audiophilesoft.ru/publ/my/foo_resamplers/11-1-0-34

But the tampering between the resamplers/ditherers is very time consuming and what more, the results are hard to judge.

So it would be beneficial to have some recommended options for the best quality-preserving CD (redbook) conversion.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Rollin on 2016-02-07 10:15:14
And one more thing: your 24/96 master sounds the same as your CD master?
According to the store, yes it is (Édition Studio Masters).

Does it really sounds the same? No matter what store says. I guess not.

Sox with passband 95% and best quality and dithering actually gives transparent conversion.
Sox with passband 95% preserves high frequencies up to ~20047 Hz and passband 99% will preserve frequencies up to ~21829 Hz.

the SoX one I think is more audible ....
Your assumption is wrong.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: KozmoNaut on 2016-02-07 10:22:57
Code: [Select]
sox infile -b 16 outfile rate 44100 dither -s

That is the recommended default setting for downsampling to CD quality. It will give audibly transparent results.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 12:25:34
And one more thing: your 24/96 master sounds the same as your CD master?
According to the store, yes it is (Édition Studio Masters).

Does it really sounds the same? No matter what store says. I guess not.

Sox with passband 95% and best quality and dithering actually gives transparent conversion.
Sox with passband 95% preserves high frequencies up to ~20047 Hz and passband 99% will preserve frequencies up to ~21829 Hz.

the SoX one I think is more audible ....
Your assumption is wrong.

So if i compare dbwpoweramp/ssrc and SOX resampler, which is better for CD conversions and why ?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Rollin on 2016-02-07 12:34:21
So if i compare dbwpoweramp/ssrc and SOX resampler, which is better for CD conversions and why ?
dbwpoweramp/ssrc is more "precise" but there will be no audible differences, believe it or not. So, they are equally good for CD conversion.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 12:35:29
If dbpoweramp/ssrc is more precise, then it makes sense to keep using it for CD resampling.

Jan
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-07 12:48:38
Seems like anyone hearing noise these days by eye.
Make a silent file and use foobar dither use the same file with TPDF. Crank it up and listen. Tell us what you hear, not see.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-07 12:59:36
Just a general remark - what you hear does not have always to correlate with what is correctly encoded. E.g. some common soundcards/dacs could sound better/worse at certain sample rates (or even bits resolution) regardless of the actual FLAC content (rate chosen). Which makes it hard to use only your ears, as not everybody has the reference high quality equipment.

Jan
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-07 14:18:59
So is there nothing else has studio done to the source audio while converting to 44.1khz?
My peaks are clipped at the top...
Just a different source?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Rollin on 2016-02-07 14:36:47
So is there nothing else has studio done to the source audio while converting to 44.1khz?
In studio they could use anyhting they wanted (compressor, limiter etc.) when created final master for CD. And you can't know what exactly they used.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-07 14:50:30
So is there nothing else has studio done to the source audio while converting to 44.1khz?
In studio they could use anyhting they wanted (compressor, limiter etc.) when created final master for CD. And you can't know what exactly they used.
then if I want a clearer(..u know..) 16-bit audio for my portable device I'd better not encoding from 24bit, right?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: mjb2006 on 2016-02-08 02:11:37
Indeed the CD master may be from a different source or just not processed the same way as the 24/96 version. In fact it's pretty typical for the "HD" version to have been remastered so as to ensure it sounds different and thus "better". Otherwise people would be disappointed to find out that they can't actually hear the difference between 24/96 and 16/44.1.

If you don't change the sample rate, and just convert from 24/96 to 16/96, does the clipping still happen?  If not, then you know the issue is in the sample rate conversion, not the bit depth reduction.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: greynol on 2016-02-08 03:37:48
Otherwise people would be disappointed to find out that they can't actually hear the difference between 24/96 and 16/44.1.
Just like they're not disappointed with the sound of flacs compared with the original unprocessed wave files?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: greynol on 2016-02-08 03:42:18
Which makes it hard to use only your ears, as not everybody has the reference high quality equipment.
Oh, yes we must rely on casual sighted evaluations instead of blind testing because you can't otherwise tell unless you have golden-ear approved gear.  What a complete load of horseshit.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 05:29:59
Well, I know that I am probably considered as "trying to see only with eye" on this forum ... I do not want to discuss it deeply, but I think that sometimes the graphs and e.g. pictures in Spek software also say something. I fully agree that ABX testing is very very important but I dont think that it is the single holy grail.

As for this topic, I was trying the available options and can recommend using SoX even without foobar conversion GUI - on command line (and batch processing of multiple files  which works great in by drag and drop Explorer to created batch file ). This way also the dither algorithm can be selected. As discussed already, foobars native dither although excellent for lowering noise at <14-15 KhZ  frequencies is a little bit noisy and having higher amplitude (as already discussed here http://forums.stevehoffman.tv/threads/downsample-convert-hi-res-24-bit-to-16-bit-with-audacity-or-foobar2000.403739/ and here http://forums.stevehoffman.tv/threads/neil-young-on-digital-audio-youre-doing-it-wrong.348996/page-16#post-10411665  ), so I can use either modified-e-weighted filter (my command line lower), or plain TPDF (also was considering low-shibata/gesemann, as the differences are subtle).

sox -V2 test.wav -b 16 "converted/Test.wav" rate -v 44100 dither -f modified-e-weighted

If somebody has further hints on the quality of conversion and/or dithering, I think that it is not against this forum to discuss here, if it is so, then the moderators can recommend another thread where it should - if desired - continue.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: eric.w on 2016-02-08 07:07:18
Sounds like the OP is just clipping the track during resampling/dither. Use sox on the command line, it will warn you when clipping occurs. Here is a 24/48 to 16/44 conversion I just tried of a loud song:

$ sox copyofa_24_48.wav -b 16 copy_of_a_16_44.wav rate -v 44100
sox WARN rate: rate clipped 4886 samples; decrease volume?
sox WARN dither: dither clipped 4255 samples; decrease volume?

Adding the --guard or -G option to sox will make it lower the track volume enough to avoid clipping.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 07:09:17
Another good point for SoX command line.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 14:48:36
Another good point for SoX command line.
It is nothing new. Mentioned often enough here. I still don't see a sample from jamsig2 that shows anything audibly changed from resampling.

If clipping is seen in the resampled file it was mostly there in the source already.
Ever wondered why many recordings have the exact same peak max over several songs? The last step was a level change to hide clipping to Audacity cowboys.
Many times in this forum was asked what to do about this but i have not seen anyone bringing a sample that demonstrates audibility of clipping from going 24/96 to 16/44.1

I really like to have a harder #TOS8 enforcement because many noobs palaver around to much.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 15:50:06
I dont want to dance around TOS 8 and maybe when I have time I will conduct a test, but from the recent experience the various forms of dither (no dither - tpdf - foobars dither) are definitely audible under some conditions. Of course those conditions are debatable.

Some references

https://hydrogenaud.io/index.php/topic,74651.0.html
https://hydrogenaud.io/index.php/topic,81467.0.html

Generally I do not think that is a good philosophy of the forum to force the people to prove everything on all threads by their own ABX tests (when you discuss megapixel count at digital cameras you also do not force the people to take and compare photos of their lcds or paper prints), although I fully agree that they are very very important for telling what can be actually heard or not on specific equipment. Maybe some threads/subforums should be TOS 8 strict and some not.

By the way, it seems to me (just testing now) that SoX resampler can be added as a command line to Foobars converter, making possible to utilize the full command line version for convert operation with more options. But as I have written, the batch conversion by drag and drop to SoX customized batch works also well.

Jan
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Zarggg on 2016-02-08 16:23:37
Small off-topic rant:

We don't force people to prove "everything" with ABX tests. We only ask them to prove when they make claims that an audible difference exists where previous testing already shows it does not or the method has not yet been tested at all.

This forum is at its core a scientific/technology discussion community. Part of the science of hearing is that our ears and brains are very good (bad?) at filtering out "unnecessary" data or filling in the gaps where auditory input may be missing. That's why the psychoacoustic models for lossy encoders and dithering when downsampling have been designed the way they are. If someone is making claims contradictory to the scientific consensus of those methods, we need hard evidence that this is actually the case and that the person making the claim is not just using their own subjective observations that may or may not be placebo effect.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 16:25:08
Some references
https://hydrogenaud.io/index.php/topic,74651.0.html
https://hydrogenaud.io/index.php/topic,81467.0.html
Both references don't prove much. The first could have been something related to the originals that were missing and the second was only speculation what we hear, including me.
I didn't read both threads in depth again.
So please offer your samples with a simple foobar abx and we can restart from there.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: greynol on 2016-02-08 17:10:36
What we have here is a new member who feels the rules of the forum don't apply to him. He has gone ahead and made claims regarding sound quality despite acknowledging that he can't comply with TOS8. He has also essentially said that if you can't demonstrate the ability to discern a difference because of hardware limitations (though I'm betting any other excuse would suffice) then you should be able to say whatever you like. He has also suggested that graphs are an acceptable means of support, in direct opposition to TOS8. Now he's saying TOS8 should simply not apply to certain yet-to-be defined areas of discussion.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 17:29:43
Sorry for disturbing you, old members. Maybe when I have time and proper equipment I will try to conduct ABX tests.

Over all, it really does not makes sense to flood forums with discussions about the rules, so we can either continue about the topics (resampling/dithering/playback quality), or let it be.

Peace,

Jan
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: greynol on 2016-02-08 17:30:53
We wouldn't have to if people didn't falgantly violate them.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: eric.w on 2016-02-08 18:54:47
fwiw, I tried and failed to ABX the clipped samples in "Copy of A" generated during resampling that I mentioned in post #21. (resampled with clipped samples, then lowered 3dB, versus lowered 3dB, then resampled).
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 19:01:30
Thank you for the info.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 19:18:50
Sorry for disturbing you, old members. Maybe when I have time and proper equipment I will try to conduct ABX tests.

Over all, it really does not makes sense to flood forums with discussions about the rules, so we can either continue about the topics (resampling/dithering/playback quality), or let it be.
Do you try to make some kind of joke here i don't understand?
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 19:26:03
Really not. I would appreciate if here or on other thread we could discuss e.g. the effects of various dither forms (none/tpdf/e-weighed/shibata) and/or resampling (SoX) to the sound and file contents obtained, so that the high-fidelity is to the best extent preserved. I know that this forum is mainly about proving the claims by objective methods like ABX, but there are many of you who understand the workings of those tools and could suggest good solutions to proposed problems without the neccessity to prove everythin g ...
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 19:37:30
Judging your former posts i have the feeling you are not really interested what we know until it is the same as you think is right.
The last post suggests you want to discuss things you may hear one sunny day but can't check with your equipment.
Hydrogenaudio is really a complicated place for such tasks. Other forums may be the better place for such an open minded attempt if you won't come over as troll.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 19:43:38
No problem, I will discuss elsewhere. E. g. the approach of SoX developers http://sox.sourceforge.net/SoX/Resampling and following pages/pdfs seems to be adequate for those needs.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 19:55:33
Good luck! With resampling you are touching a territory full of myths, ringing an FUD.
Even knowlegeable people get confused with this regulary.
Some say that optimal resampling is like dbpa SSRC does but the SoX pdf warns for excessive ringing with its similar 99.7% setting...
Go to Computeraudiophile forums and i bet you will find people even knowing everything about how dark matter influences dither on fridays!
Even when you come over a bit trollish i think i understand your dillemma well. Self educating about this topic on the web can drive one crazy.
The Hydrogenaudio approach is luckily a bit different!
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jumpingjackflash5 on 2016-02-08 20:04:24
Yes, I learned it is easy to drown in the various options and techniques, but hope I have not drowned already .... I am using reasonable settings for my CD conversions :)

-V2 %s -b 16 %d rate -v 44100 dither -f modified-e-weighted,

or sometimes let the default dither that SoX performs.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Nystagmus on 2016-02-08 20:20:12
Why wouldn't somebody want a 100% passband if they are doing a straight transfer?  Or can the filter be disabled entirely? 
Anyways, if anybody is looking for an alternative to use, r8brain freeware typically gets good specs for low aliasing.  It has a batch mode too. 
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: Wombat on 2016-02-08 20:22:50
See what i mean :D
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: greynol on 2016-02-08 20:23:31
Almost as if on cue.
Title: Re: 24bit 96khz to 44.1khz using foobar and SoX resampler
Post by: jamsig2 on 2016-02-09 06:34:14
In studio they could use anything they wanted (compressor, limiter etc.) when created final master for CD. And you can't know what exactly they used.
Indeed the CD master may be from a different source or just not processed the same way as the 24/96 version. In fact it's pretty typical for the "HD" version to have been remastered so as to ensure it sounds different and thus "better". Otherwise people would be disappointed to find out that they can't actually hear the difference between 24/96 and 16/44.1.
If you don't change the sample rate, and just convert from 24/96 to 16/96, does the clipping still happen?  If not, then you know the issue is in the sample rate conversion, not the bit depth reduction.
I already got the answer from Rollin and mjb2006, but I really don't understand what else is going on here.