IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Sox question - going from 192k to 96 and avoid clipping
vinylman
post Feb 19 2014, 13:18
Post #1





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565



Hi.

I'm fairly green about this, so bear with me.

I'm using sox to convert some vinyl rips from 192 to 96, as 192 just takes up too much space. The problem is that I'm getting a lot of clipped samples. Well around 11, depends if that's a lot or not.

Anyway, the cmd I'm using is

d:
cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A -b 24 "converted/%%~nxA" rate -v -L 96000
pause

Is there anything I can put in here to avoid clipping? I tried to edit it myself but the program never started then. Was wondering what I have to add to the cmd line to automate the process, or maybe I have to enter a specific value every time?
So how do I reduce the volume or add -G norm or something to it?

Any help would be greatly appreciated.
Go to the top of the page
+Quote Post
Brazil2
post Feb 19 2014, 13:30
Post #2





Group: Members
Posts: 119
Joined: 9-May 10
Member No.: 80499



QUOTE (vinylman @ Feb 19 2014, 13:18) *
add -G norm

Yes, that's the purpose of the -G switch.
Go to the top of the page
+Quote Post
KozmoNaut
post Feb 19 2014, 13:31
Post #3





Group: Members
Posts: 69
Joined: 25-January 07
Member No.: 39990



QUOTE (vinylman @ Feb 19 2014, 13:18) *
Hi.

I'm fairly green about this, so bear with me.

I'm using sox to convert some vinyl rips from 192 to 96, as 192 just takes up too much space. The problem is that I'm getting a lot of clipped samples. Well around 11, depends if that's a lot or not.

Anyway, the cmd I'm using is

d:
cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A -b 24 "converted/%%~nxA" rate -v -L 96000
pause

Is there anything I can put in here to avoid clipping? I tried to edit it myself but the program never started then. Was wondering what I have to add to the cmd line to automate the process, or maybe I have to enter a specific value every time?
So how do I reduce the volume or add -G norm or something to it?

Any help would be greatly appreciated.


Add "-G" to your SoX command line, and it should prevent it from clipping by reducing gain on any files that would clip.

And honestly, just downsample to 16bit 44.1kHz with "dither -s" to use noise-shaping dither, instead of 24bit 96kHz. If you're really paranoid about losing playback quality, do an ABX test with both versions. I'm sure the results will be surprising.

This post has been edited by KozmoNaut: Feb 19 2014, 13:31
Go to the top of the page
+Quote Post
vinylman
post Feb 19 2014, 13:54
Post #4





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565



Does it matter where I put it? I tried several places, and it just lists a lot of settings then, and options, it doesn't convert. It also says "Sox fail sox: not enough input filenames specified".


And yeah, I can't tell the difference between redbook and "hires", but it doesn't really matter. I got space, but 192 is just too much. But while we're on the subject, if you believe noone can hear the difference between 24 and 16, is clipping easier to hear?

I know it's a lot to ask, but could anyone tell me exactly where to put -G?

And what does the -s do after dithering?

This post has been edited by vinylman: Feb 19 2014, 13:59
Go to the top of the page
+Quote Post
KozmoNaut
post Feb 19 2014, 14:04
Post #5





Group: Members
Posts: 69
Joined: 25-January 07
Member No.: 39990



QUOTE (vinylman @ Feb 19 2014, 13:54) *
But while we're on the subject, if you believe noone can hear the difference between 24 and 16, is clipping easier to hear?

I know it's a lot to ask, but could anyone tell me exactly where to put -G?

And what does the -s do after dithering?


Clipping can be heard if it gets bad enough. A single clipped sample or 10 distributed over a track isn't that bad, I certainly can't pinpoint clipped samples that precisely, and lots of commercial releases have been made containing significantly more clipping than that.

Just put "-G" as the very first parameter to sox, it should work then.

"Dither -s" applies noise-shaping dither to the signal, which pushes quantization noise into frequencies where the human ear is less sensitive. The effect is a subjective reduction of the noise floor and increase of dynamic range from the calculated 96dB of normal CD audio to upwards of 110-120dB, bringing it close to the real world dynamic range of 24-bit audio.

This post has been edited by KozmoNaut: Feb 19 2014, 14:17
Go to the top of the page
+Quote Post
Porcus
post Feb 19 2014, 14:36
Post #6





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (KozmoNaut @ Feb 19 2014, 13:31) *
And honestly, just downsample to 16bit 44.1kHz


Maybe one would want to choose 48 kHz instead, although there shouldn't be many soundcards around anymore that have to resample to 48 and make issues out of it ... or?

Myself I have a DAC that makes a scratch sound every time it has to switch back and forth between 44.1 and 48, so I could have considered 48 if I were sufficiently annoyed over it (naaah) AND my collection were vastly 48 files (which it certainly ain't).

This post has been edited by Porcus: Feb 19 2014, 14:38


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
vinylman
post Feb 19 2014, 15:07
Post #7





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565



Well, the reason I went for 24/96 is that some of these rips are hard to come by, and thought what the hell, might as well keep it hires.

I can't hear the difference, and I'm quite sure 99% of the population can't either, even the ones who call you idiot and buy cables for big bucks. But I was also thinking it could help with listening fatigueness. That's how I started with vinyl in the first place. The wallbricked crap they release seriously hurts if you use headphones over long periods. And it sounds bad. I did try with an ABX plug-in in foobar, couldn't tell at all.

Thanks, adding that line fixed it. Did -G just do adjustments to the volume or? Is this a cmd I should keep permanent or only when I get clipping?

About dither -s. I used dither but I never had that -s at the end of it, no difference?

This post has been edited by vinylman: Feb 19 2014, 15:08
Go to the top of the page
+Quote Post
2Bdecided
post Feb 19 2014, 15:22
Post #8


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



It's interesting that a vinyl rip would end up with 10 clipped samples just by resampling from 192kHz to 96kHz.

1. You wouldn't expect a vinyl rip to get very close to digital full scale - except on one single digital sample, and only if it was peak normalised to 0dB FS.
2. You wouldn't expect that removing all the energy above 48kHz would make any difference to a vinyl rip.

10 clipped samples? I bet the source is already clipped.

Cheers,
David.
Go to the top of the page
+Quote Post
vinylman
post Feb 19 2014, 15:27
Post #9





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565





Some ripper go for 24/192. most do 24/96, and I see some have started with 24/48. 24/48 doesn't take THAT much more space than 16/48, so maybe that should be my goal..

This post has been edited by vinylman: Feb 19 2014, 16:03
Go to the top of the page
+Quote Post
Apesbrain
post Feb 19 2014, 15:55
Post #10





Group: Members
Posts: 452
Joined: 3-January 04
Member No.: 10915



QUOTE (vinylman @ Feb 19 2014, 10:27) *
I could PM you a link to the rip if you want. His rips sound very good though, in most cases.

Careful: TOS#9.
Go to the top of the page
+Quote Post
ktf
post Feb 19 2014, 16:05
Post #11





Group: Members
Posts: 303
Joined: 22-March 09
Member No.: 68263



QUOTE (vinylman @ Feb 19 2014, 15:27) *
24/48 doesn't take THAT much more space than 16/48, so maybe that should be my goal..

Maybe it doesn't, but it is still a waste. I doubt there are much vinyl recordings exceeding 12 bits of dynamic range.

FWIW, I'd store my vinyl rips as 44.1kHz, 14-bit FLAC files (or 16-bit with 2 empty bits). Currently I have some recordings with a rather high noisefloor (-60dB), storing them as 16-bit FLAC with 3 empty bits (so effectively 13-bits) halves the filesize while I can be certain there will be no audible difference at all.

This post has been edited by ktf: Feb 19 2014, 16:05


--------------------
Music: sounds arranged such that they construct feelings.
Go to the top of the page
+Quote Post
2Bdecided
post Feb 19 2014, 16:19
Post #12


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



Lossless coding of 24-bits is surprisingly inefficient when/because the bottom 8 bits are noise.

You should see what lossyWAV makes of it, if you're interested in ignoring the parts below the noise floor. I'm not telling you to archive in lossyWAV (though you can if you want) - but it's amazing what a difference simply zero-ing the noisy LSBs makes to FLAC coding efficiency.


I don't want the rips, thanks, but you can upload 30 seconds here if you want. But by the time you've found the clipped part, you'll have answered the question for yourself anyway.

Cheers,
David.
Go to the top of the page
+Quote Post
vinylman
post Feb 19 2014, 16:22
Post #13





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565



Jesus. For so long I've been nagged by others because I only store music as redbook. OK, you guys have convinced me, I'm back on the RB boat.

Thanks for all the help though. i got a lot of converting ahead of me.
Go to the top of the page
+Quote Post
2Bdecided
post Feb 19 2014, 17:35
Post #14


ReplayGain developer


Group: Developer
Posts: 4945
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



FWIW, though I know I can't hear a difference, the very few things I've bought in hi-res I do keep in hi-res (Why? Well, why not?), though it's 44.1/16 2.0 FLAC downconversions I have in my regular library.

Cheers,
David.
Go to the top of the page
+Quote Post
mjb2006
post Feb 19 2014, 17:54
Post #15





Group: Members
Posts: 706
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



The dither is only if you are converting the bit depth; if you're only changing the sample rate, you don't need it, right?

But is it really necessary to dither when converting from 24 to 16? For a vinyl rip?!

This post has been edited by mjb2006: Feb 19 2014, 17:54
Go to the top of the page
+Quote Post
pdq
post Feb 19 2014, 18:18
Post #16





Group: Members
Posts: 3304
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (mjb2006 @ Feb 19 2014, 11:54) *
The dither is only if you are converting the bit depth; if you're only changing the sample rate, you don't need it, right?

Sample rate conversion is performed at higher bit depth, after which the bit depth is probably restored to that of the source. Dither should be used at this point unless a further reduction in bit depth will be performed later.
Go to the top of the page
+Quote Post
DVDdoug
post Feb 19 2014, 18:56
Post #17





Group: Members
Posts: 2441
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



I don't see how adding dither (noise) at around -90dB can possibly make any measurable or audible difference to digitized vinyl, which already has a noise floor much higher than that.
Go to the top of the page
+Quote Post
KozmoNaut
post Feb 19 2014, 21:55
Post #18





Group: Members
Posts: 69
Joined: 25-January 07
Member No.: 39990



QUOTE (DVDdoug @ Feb 19 2014, 18:56) *
I don't see how adding dither (noise) at around -90dB can possibly make any measurable or audible difference to digitized vinyl, which already has a noise floor much higher than that.


My point with the bit about dither was that 24bit audio for playback is pointless, since even the best DACs only reach maybe 20-22 bits of resolution in reality, due to thermal noise in the circuits among other factors.

Properly dithered 16 bit with noise shaping can reach pretty much the same resolution subjectively to the human ear, by pushing the quantization noise to less apparent frequencies.

It doesn't really matter with vinyl rips, you are perfectly right about that :-)

This post has been edited by KozmoNaut: Feb 19 2014, 21:56
Go to the top of the page
+Quote Post
vinylman
post Mar 18 2014, 14:24
Post #19





Group: Members
Posts: 6
Joined: 19-February 14
Member No.: 114565



QUOTE (KozmoNaut @ Feb 19 2014, 21:55) *
QUOTE (DVDdoug @ Feb 19 2014, 18:56) *
I don't see how adding dither (noise) at around -90dB can possibly make any measurable or audible difference to digitized vinyl, which already has a noise floor much higher than that.


My point with the bit about dither was that 24bit audio for playback is pointless, since even the best DACs only reach maybe 20-22 bits of resolution in reality, due to thermal noise in the circuits among other factors.

Properly dithered 16 bit with noise shaping can reach pretty much the same resolution subjectively to the human ear, by pushing the quantization noise to less apparent frequencies.

It doesn't really matter with vinyl rips, you are perfectly right about that :-)


So it doesn't really matter at all if you dither with vinyl? So the audible differences are so subtle, if any, that it doesn't really matter what settigns I use?

Guess it's pretty easy to believe all the people who say the can hear the difference in everything..

Go to the top of the page
+Quote Post
bandpass
post Mar 18 2014, 15:18
Post #20





Group: Members
Posts: 321
Joined: 3-August 08
From: UK
Member No.: 56644



Certainly for vinyl, just let it use the default TPDF.

Only use shaped dither if you're really sure you need it, which (unless you go 8-bit or something) is probably never.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th April 2014 - 05:13