HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: andiandi on 2019-11-25 19:23:08

Title: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-25 19:23:08
Hi.

I've a question regarding high sampling rate encoding. Let's say that I encode the audio track of an old VHS cassette at 96KHz.

That audio is broadcasted at a frequency of 12KHz, so anything above this is irrelevant (white noise, NTSC horizontal frequency...).

Would the encoded lossless audio of that cassette in 96KHz have relevant data in 96KHz ?
I mean, if I convert the FLAC 96KHz to FLAC 48 KHz, would I lose quality ? Because, it might create some echo or other relevant data in more high frequencies.

I don't personally want to convert old material to 96KHz, but some shared materials are only available in 96KHz.

Thank you
Title: Re: Encoding old material at 96KHz question
Post by: DVDdoug on 2019-11-25 19:40:21
"CD quality" (16-bit, 44.1kHz) is better than human hearing.    i.e. If you take a high resolution original and downsample to 16/44, you won't hear a difference in a proper-blind ABX listening test (https://hydrogenaud.io/index.php?topic=16295.0).

Quote
Let's say that I encode the audio track of an old VHS cassette
If you are lucky enough to have VHS Hi-Fi (https://en.wikipedia.org/wiki/VHS#Hi-Fi_audio_system) it was the better than vinyl or cassettes!

Quote
but some shared materials are only available in 96KHz.
If you are talking about digitized vinyl there is a myth that analog has "infinite resolution" but in reality analog resolution is limited by noise.  Vinyl can also extend beyond 20kHz (and beyond the 22,050Hz CD limit) but you can't hear that high, what's on records at those frequencies is mostly noise, digital frequency response is flatter in the audible range (where it really counts), and records "struggle" with very-low frequencies whereas digital can go down to DC (zero Hz).

24-bits/96kHz is the "pro studio standard."
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-25 20:05:48
> "CD quality" (16-bit, 44.1kHz) is better than human hearing.    i.e. If you take a high resolution original and downsample to 16/44, you won't hear a difference in a proper-blind ABX listening test.

I'm prety conviced of that, and I don't like too high quality rips. Human hearing is pretty poor when we think about it.

But that's not really my point. I donwloaded audios from old cassettes, containing recordings of TV Broadcasts with a pretty poor quality (under 15KHz of frequency range). The thing is that those rips are encoded at 96KHz 24-bit.

When I converted those tracks to 48KHz 24-bit and made an audio difference, I still get a relevant track with the all the sound (very low volume and not very audible, but since it's silence, it tends to show that converting from 96KHz to 48KHz; even an old material, will make data dissappear).

I'm not sure though..
Title: Re: Encoding old material at 96KHz question
Post by: DVDdoug on 2019-11-25 21:43:57
Quote
But that's not really my point.
OK.  What is your point?

Quote
When I converted those tracks to 48KHz 24-bit and made an audio difference, I still get a relevant track with the all the sound (very low volume and not very audible
If you get dead silence, yes that proves there is no difference.  

If you don't get silence it proves there is a "data" difference but it does NOT prove there is an audible difference.    Just for example, if you add 10 milliseconds of delay to the copy there is no difference in the sound but subtraction will give you a very "loud" comb-filtered result.    A difference in level will also give a non-silent result. 

Or as a more obvious example, you can invert a copy and it will sound identical.   But, if you then subtract from the original you are now "subtracting a negative" (adding) and you'll double the volume and possibly push the levels into clipping (distortion).

 There can be other differences that you can't hear in an ABX test, or if you listen to the high-resolution original today and the downsampled copy tomorrow.

Quote
it tends to show that converting from 96KHz to 48KHz; even an old material, will make data dissappear).
Of course, you are throwing-away half of the samples so you are throwing-away half of the data (assuming the same bit-depth).   In fact, downsampling requires low-pass filtering to prevent aliasing so you are not simply throwing-away half of the samples.


P.S.
The sound of the difference is not the same as the difference in the sound...

Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-25 22:17:48
Quote
If you don't get silence it proves there is a "data" difference but it does NOT prove there is an audible difference.    Just for example, if you add 10 milliseconds of delay to the copy there is no difference in the sound but subtraction will give you a very "loud" comb-filtered result.    A difference in level will also give a non-silent result. 

Or as a more obvious example, you can invert a copy and it will sound identical.   But, if you then subtract from the original you are now "subtracting a negative" (adding) and you'll double the volume and possibly push the levels into clipping (distortion).

There can be other differences that you can't hear in an ABX test, or if you listen to the high-resolution original today and the downsampled copy tomorrow.

Very interesting.


Quote
Of course, you are throwing-away half of the samples so you are throwing-away half of the data (assuming the same bit-depth).   In fact, downsampling requires low-pass filtering to prevent aliasing so you are not simply throwing-away half of the samples.

It make sense, but I guess low-passing will just decrease quality loss when converting 96KHz -> 48KHz, but it'll still lose something.
e.g. I low pass the 96KHz track frequency to 12KHz (but keep it at 96KHz sampling rate) and then convert it to 48KHz. Would both tracks be the same or not ?

Quote
P.S.
The sound of the difference is not the same as the difference in the sound...

Really ? so is there a better way to tell if two songs are the exact same ? for instance after down sampling.
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-11-25 23:03:55
Quote
Of course, you are throwing-away half of the samples so you are throwing-away half of the data (assuming the same bit-depth).   In fact, downsampling requires low-pass filtering to prevent aliasing so you are not simply throwing-away half of the samples.

It make sense, but I guess low-passing will just decrease quality loss when converting 96KHz -> 48KHz, but it'll still lose something.

Assuming you do it correctly you should lose a bunch of ultrasonic noise but nothing else.

e.g. I low pass the 96KHz track frequency to 12KHz (but keep it at 96KHz sampling rate) and then convert it to 48KHz. Would both tracks be the same or not ?

Assuming you mean 20 or 24 KHz, yes they should be the same. 

Quote
Really ? so is there a better way to tell if two songs are the exact same ? for instance after down sampling.

Upsample them to a common sampling rate, align them in time, and then subtract them. 
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-25 23:35:57
Quote
Assuming you mean 20 or 24 KHz, yes they should be the same.

20 KHz of audio frequency ? but it's already in more than 20KHz, but the track is just 12KHz at its source. From what @DVDdoug said, I understand that you should low pass to the closest frequency to the source and then down sample ?

96KHz is too much in filesize. My goal is to convert a poor quality 96KHz recorded track to 48KHz without any loss at all.

Quote
Upsample them to a common sampling rate, align them in time, and then subtract them.

Alright I'll keep that in mind thanks.
Title: Re: Encoding old material at 96KHz question
Post by: Apesbrain on 2019-11-25 23:52:20
My goal is to convert a poor quality 96KHz recorded track to 48KHz without any loss at all.
Convert the 96k track to 48k using foobar2000.  Then do an ABX comparison also in foobar2000 to see if you can tell them apart.
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-11-25 23:58:32
Quote
Assuming you mean 20 or 24 KHz, yes they should be the same.

20 KHz of audio frequency ? but it's already in more than 20KHz, but the track is just 12KHz at its source. From what @DVDdoug said, I understand that you should low pass to the closest frequency to the source and then down sample ?

I don't understand the question.  However, if you are downsampling to 48KHz, 24 KHz is the highest low pass you could use, and 20kHz would be a more common one.  You should not use 12 KHz. 
Title: Re: Encoding old material at 96KHz question
Post by: DVDdoug on 2019-11-26 00:19:09
Quote
From what @DVDdoug said, I understand that you should low pass to the closest frequency to the source and then down sample ?
That's not exactly what I said...  In this case filtering should make no difference but it will be automatically filtered by the downsampling algorithm.

The Nyquist sampling theory says you can't have audio any higher than half the sample rate.    Or to simplify, you need to sample at least twice per cycle so you can sample the positive half of the waveform at least once and the bottom half at least once per cycle.  If your audio is higher than that you get aliasing (false frequencies somewhere below the Nyquist limit).    So, every ADC (analog-to-digital converter) has a low-pass filter and every downsampling algorithm has a low-pass filter  (i.e. an anti-aliasing filter).

Practically speaking, if our audio only goes to 12kHz you don't need to low-pass filter (when going from 96kHz to 48kHz) but every downsampling algorithm filters and all of the data is "mathematically" altered even if it's not altered significantly enough to alter the sound.

Quote
Really ?
Try the test I suggested.   Delay an exact copy by 10 milliseconds and you of course it will sound exactly the same (when played by itself).  There is no difference in sound.    

Then subtract it from the original.    You'll get a VERY LOUD weird sounding difference file.  That's the sound of the difference.

Quote
so is there a better way to tell if two songs are the exact same ? for instance after down sampling.
An ABX test can help tell you if they sound  the same.   Of course, the data can't be the same if one file has twice the number of samples..
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-26 01:47:37
Quote
Convert the 96k track to 48k using foobar2000.  Then do an ABX comparison also in foobar2000 to see if you can tell them apart.

I tried and can't tell any difference between both tracks. To me they're all the same when I listen to them. But not really (see below)

Quote
I don't understand the question.  However, if you are downsampling to 48KHz, 24 KHz is the highest low pass you could use, and 20kHz would be a more common one.  You should not use 12 KHz.

But is it impossible ? I saw VHS audio rips with a 15KHz cutoff, but in 48KHz and they sound fine.

Quote
Practically speaking, if our audio only goes to 12kHz you don't need to low-pass filter (when going from 96kHz to 48kHz) but every downsampling algorithm filters and all of the data is "mathematically" altered even if it's not altered significantly enough to alter the sound.

In my case, I down sampled using a dsp in foobar, and the difference is pretty clear : I lose "relevant" data (it's basically the full track in low volume and different equalization). It's the same if I upsample again to 96KHz.

(https://i.ibb.co/jH7vrTr/test.jpg) (https://imgbb.com/)

Quote
Try the test I suggested.   Delay an exact copy by 10 milliseconds and you of course it will sound exactly the same (when played by itself).  There is no difference in sound.   

Then subtract it from the original.    You'll get a VERY LOUD weird sounding difference file.  That's the sound of the difference.

You're right. With sox, it gives me an high frequency sound difference.


I think I begin to go off topic so I'll clarify my point.

1. Let's say that I want to archive some rare audio from VHS cassettes, and that the only encoded files that I find online are in 96KHz FLAC, is it "over" ? Is there no way to archive those audio in a lower sampling rate with the exact same quality, meaning that the difference of those files is pure silence ?

2. And also : if I rip the audio of a VHS in 96KHz, and then I rip the exact same audio at 48KHz : would the 48KHz sounds the same since the full audio is captured in 48KHz and it's not a down sample ?

I mean would it be perfectly faithful to the source, contrary to a converted 96KHz -> 48KHz even in both are in 48KHz ?
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-11-26 02:37:34
1. Let's say that I want to archive some rare audio from VHS cassettes, and that the only encoded files that I find online are in 96KHz FLAC, is it "over" ? Is there no way to archive those audio in a lower sampling rate with the exact same quality, meaning that the difference of those files is pure silence ?

You're not going to get pure silence since you're removing all of the ultrasonic noise in the original file.

2. And also : if I rip the audio of a VHS in 96KHz, and then I rip the exact same audio at 48KHz : would the 48KHz sounds the same since the full audio is captured in 48KHz and it's not a down sample ?

These both do exactly the same thing, so you will not hear any difference between them.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-26 02:54:00
Quote
You're not going to get pure silence since you're removing all of the ultrasonic noise in the original file.

You speak about "ultrasonic noise" but if you look at the audacity pic above, it's clearly not ultrasonic. I can hear the full track and voices but in low volume. I'd be OK if it was just white noise or ultrasonic sounds.

Quote
These both do exactly the same thing, so you will not hear any difference between them.

The same thing ? so you're telling that ripping a low quality old muffled track in 96KHz is better than ripping it in 48KHz ? so even in 192KHz it'd be better ? How is that ? The track is very very low quality and I still lose relevant data when down sampling...

So if the VHS track is mono, muffled, buzzy, and from the 80's, it'd still be closer to the source to rip it in 96KHz than 48KHz ?

Title: Re: Encoding old material at 96KHz question
Post by: Apesbrain on 2019-11-26 13:03:22
Not sure what to tell you.  I just took a 24/96 track and used foobar2000 to convert it to 24/48.  You can see the "mix" below; no difference at all.  If you couldn't ABX it, why are you worried?  Certainly 24/48 can faithfully capture everything on a VHS audio track.

(https://i.imgur.com/YpsZA8I.jpg)
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-26 16:10:38
@Apesbrain : Maybe your track is a upsample of a 48KHz track...

Because I don't have the same result with a track captured at 96KHz as you can see on the screenshot above.
Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-26 16:25:29
Perhaps you can provide a sample of each version of the same portion of the track that is no longer than 30 seconds in order to comply with our rules.

I am certain there is an error somewhere in your process.
Title: Re: Encoding old material at 96KHz question
Post by: Wombat on 2019-11-26 16:38:03
You may play around with deltawave https://deltaw.org/
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-26 17:12:31
@greynol Sure. Here is a 96KHz sample attached. You can try converting it 48KHz, there will be quality loss :/

@Wombat I'm not familiar with that software but I'll try thanks.
Title: Re: Encoding old material at 96KHz question
Post by: Chibisteven on 2019-11-26 19:46:58
It's your process.  All I got was noise averaging at less than -130 dB.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-26 21:48:55
@Chibisteven How did you do then ?!

Because I just down sampled with rather fooobar2000 or eac3to, and then make the difference with track invert in Audacity + Mix.
And also with sox difference command.

All the results are the same.

EDIT : I tried with your 48KHz track and the difference is pure silence. How did you down sampled ? is there different way of doing it ?
Title: Re: Encoding old material at 96KHz question
Post by: Chibisteven on 2019-11-26 22:11:06
@Chibisteven How did you do then ?!

Because I just down sampled with rather fooobar2000 or eac3to, and then make the difference with track invert in Audacity + Mix.
And also with sox difference command.

All the results are the same.

EDIT : I tried with your 48KHz track and the difference is pure silence. How did you down sampled ? is there different way of doing it ?

I downsampled using the most recent version of SoX (0.8.7) for foobar2000 which defaults to Best Quality.  Dragged both into the most recent version of Audacity for which I have the resampling set to Best Quality (slowest) and the dither turned off and inverted the 48 KHz one.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 01:13:13
@Chibisteven

Okay I made some test and I came to a strange conclusion to me : the down sample can be "perfect" with a software, and terrible with another.

Look at the difference with z down sample made by DBpoweramp DSP in Foobar :

(https://i.ibb.co/tJnP1bT/DBpoweramp.png) (https://ibb.co/crRXsNS)

And now with TAudioConverter (I get the same results with Sox plugins for foobar or Audacity internal down sample):

(https://i.ibb.co/cvR4dMn/Taudio-Converter.png) (https://imgbb.com/)

What the heck ?

Can you confirm that DBPoweramp plugin do this with the sample I attached before ?

It answer one of my question. I always wondered why sometimes, the differences with two files were pure silence and sometime not. It's just that I don't stick to one software to down sample...

Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-27 02:08:53
With a competent resampler, yes, it is perfectly fine.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 02:26:58
@greynol : I really thought until now that resampling was just a mathematical operation, similar with every software. So is there well known competent resamplers ? On my tests, Audacity, Taudio and SOX gave the same results but who knows, maybe I should stick to best existing resampler to archive my files.
Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-27 02:36:48
Not all filter designs are the same.  I rarely resample and I can’t say I’ve done any extensive testing.  Resampling a signal that is already band-limited to 12k down to 32k shouldn’t be very challenging.  There is plenty of room in the transition band.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 03:07:06
@greynol : That's pretty much what I was asking in my first post, not for down sampling but recording with an ADC. I didn't get a clear answer yet, but it's hard for me to conceive that an old audio, or a phone conversation, would sound better in 96KHz than in 48Khz. For what I understand, you should capture in 24bit for fidelity, and choose the sample rate according to the audio frequency of the signal, and it's enough to be perfect.
Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-27 03:14:25
24 bits for overhead. 16 bits are more than adequate for that material unless you squander them.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 04:03:54
@greynol And what about the digitalized material? It may be safe to change sample rate to 48KHz, but is it safe to change bit depth to 16 bit while it was captured in 24bit ? (It's shitty audio so...).
Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-27 07:09:48
With dither the perceived dynamic range of 16 bits can be as high as 110dB, perhaps more. We’re talking permanent hearing loss.  And I haven’t taken into account the ambient noise in the listening environment which only raises the minimum SPL required in order to hear the softest sound. The quietest possible listening environment that includes the necessary air to breathe is around 30dB SPL. Now add 110 dB.

So you tell me, is 16 bits insufficient for consumer audio, “shitty” or otherwise?
Title: Re: Encoding old material at 96KHz question
Post by: magicgoose on 2019-11-27 10:31:36
it's hard for me to conceive that an old audio, or a phone conversation, would sound better in 96KHz than in 48Khz.
It won't, and a "new" audio won't too. Humans don't hear ultrasound and there won't be any other difference unless there's a huge issue in DAC or in the process of downsampling or recording that was used to create this recording.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 16:06:55
it's hard for me to conceive that an old audio, or a phone conversation, would sound better in 96KHz than in 48Khz.
It won't, and a "new" audio won't too. Humans don't hear ultrasound and there won't be any other difference unless there's a huge issue in DAC or in the process of downsampling or recording that was used to create this recording.

Thanks for your reply. That answers my initial post ! I guess I'll do some comparison tests between many downsampling software to have a wider view about those.
Title: Re: Encoding old material at 96KHz question
Post by: Rollin on 2019-11-27 16:34:42
you should capture in 24bit for fidelity
In theory , recording in 24 bits sometimes can be useful, because it allows you to leave more headroom to avoid clipping and at the same time not  to drown quiet sounds in ADC noise. But when recording and all processing is finished, there is no need in 24 bits.

I guess I'll do some comparison tests between many downsampling software to have a wider view about those.
Here is comparison of different resamplers - http://src.infinitewave.ca/
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-27 18:55:21
Quote
In theory , recording in 24 bits sometimes can be useful, because it allows you to leave more headroom to avoid clipping and at the same time not  to drown quiet sounds in ADC noise. But when recording and all processing is finished, there is no need in 24 bits.

Pretty clear and concise.

Quote
Here is comparison of different resamplers - http://src.infinitewave.ca/

Thanks. Its very helpful.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-28 23:23:29
@Rollin : I don't know if I should believe http://src.infinitewave.ca/...

It says that DBPoweramp resampler is excellent
(http://src.infinitewave.ca/images/Sweep/dBPowerAmp.png)

However, I tried with DBPoweramp 16.2, and it gives me the same result as DBpoweramp resampler DSP in Foobar2k, so much loss

(https://i.ibb.co/tJnP1bT/DBpoweramp.png)


Is this website really comparing resamplers quality or something else ?
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-11-29 00:12:38
@Rollin : I don't know if I should believe http://src.infinitewave.ca/...

It is a good test, you should believe it.

However, I tried with DBPoweramp 16.2, and it gives me the same result as DBpoweramp resampler DSP in Foobar2k, so much loss

Probably some difference in level between them since when you subtract you see an attenuated copy of the original spectrum.  Trying to subtract them is a bad way to test since if you get some difference you then have to rule out all of the different things that could cause it.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-29 00:56:39
Quote
Probably some difference in level between them since when you subtract you see an attenuated copy of the original spectrum.  Trying to subtract them is a bad way to test since if you get some difference you then have to rule out all of the different things that could cause it.

It's a bad way to compare ? Then why with the same tests (inverting and mixing tracks), I get perfect results in the spectrum with Sox (and by the way, Sox is excellent in src.infinitewave.ca) ?

And what is a good way to compare my down sampled 48KHz track and its 96KHz counterpart and be sure that I do not lose anything relevant ?
Title: Re: Encoding old material at 96KHz question
Post by: Wombat on 2019-11-29 01:14:42
You may play around with deltawave https://deltaw.org/
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-29 04:33:34
@Wombat I can see with Deltawave that the waveform is slightly changed/deteriorated between the source 96KHZ and the resampled 48KHz. And in Audacity too btw.

But, is the waveform only changed because of the noise cut above 24KHz ? (after the 96KHz -> 48KHz conversion)

So is inaudible noise (>20KHz) also part of the waveform, so that it can be changed through a resample ?

Because right now, I don't know what to think : is my 96 to 48 resample a success, in that case I could delete source files, or is there a downgrade on my audios...

EDIT : I tested with a upsampling, and it's the same. A 44.1KHz tracks upsampled in 96KHz has its waveform changed. Why is that ? does it means deterioration in a bad way ?
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-11-29 08:34:47
You must decide what you want. Resampling is lossy (except if you multiply the sampling rate by an integer number without interpolation). Is it audible? Down to 32kHz most often not.
In your case I'd downsample everything with SOX or fb2k to 16bit 24kHz, or eventually 16bit 48kHz with dithering, or even use some lossy codec...
Don't look at graphs and don't listen to extracted difference unless you EXACTLY know what you're doing. It is enough to shift one of the files by 1 sample to get huge difference, while in reality there will be none. Graphs may exaggerate things which are inaudible. Don't compare audio with your eyes (you wouldn't compare pictures with your ears would you). If you can't accept a loss that you can't hear, stay lossless.
Title: Re: Encoding old material at 96KHz question
Post by: sTisTi on 2019-11-29 13:06:43
However, I tried with DBPoweramp 16.2, and it gives me the same result as DBpoweramp resampler DSP in Foobar2k, so much loss
IIRC, the dbpoweramp/SSRC resampler causes some kind of sub-sample shift, which makes it impossible to use the difference method. Someone mentioned it on another resampler thread. It does not mean it is worse quality.
Title: Re: Encoding old material at 96KHz question
Post by: Wombat on 2019-11-29 14:15:35
IIRC, the dbpoweramp/SSRC resampler causes some kind of sub-sample shift, which makes it impossible to use the difference method. Someone mentioned it on another resampler thread. It does not mean it is worse quality.
Exactly this should be compensated by the deltawave software. Normaly if you read the results from resampling it shows the difference very well. This is pretty much the noisefloor from dither or/and bit reduction.
Edit: attached 24-96 to 16-44.1, foobar SSRC
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-29 17:08:44
However, I tried with DBPoweramp 16.2, and it gives me the same result as DBpoweramp resampler DSP in Foobar2k, so much loss
IIRC, the dbpoweramp/SSRC resampler causes some kind of sub-sample shift, which makes it impossible to use the difference method. Someone mentioned it on another resampler thread. It does not mean it is worse quality.

Alright I understand better. I'll stick to SOX though, he's good everywhere, with every test.

Quote
Exactly this should be compensated by the deltawave software. Normaly if you read the results from resampling it shows the difference very well. This is pretty much the noisefloor from dither or/and bit reduction.
Edit: attached 24-96 to 16-44.1, foobar SSRC

I see... I think that for my source the difference between 96KHz and 48/32 even 24KHz would be inaudible. But what about 24-Bit to 16-Bit ?. In your case, deltawave shows a clean result. But look what I have with my source (96KHz 24Bit to 96KHz 16-bit, with Sox, Dither and no dither)

(https://i.ibb.co/Px3TxRW/24-16.gif)

First and foremost, do you confirm that a comparison with deltawave is more reliable than inverting in Audacity + Spek ? (in which I get NO difference between 24/16 bit, as if it was not deteriorated)

(https://i.ibb.co/TBRD0bZ/96-KHz-24-Bit-VS-96-KHz-16-Bit-Audacity-diff.png)

Also, are those differences relevant then ?
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-11-29 17:17:20
The way you're doing subtraction is not reliable compared to almost any other test.
Title: Re: Encoding old material at 96KHz question
Post by: Wombat on 2019-11-29 17:18:04
@andiandi
SoX resampler has no intersample drift so is much easier to compare.
Most of all don't expect to find out anything new. Transparency from resampler software is a long solved problem.
Title: Re: Encoding old material at 96KHz question
Post by: greynol on 2019-11-29 17:30:15
24 vs 16:  I already told you.

With that recording you don’t even need to use dither, not that you shouldn’t use dither.

What’s with all the fear uncertainty and doubt?  You will never tell the difference with either of the resamplers you tried. This obsessing really isn’t worth your time.

44.1/16 is what I would recommend, or go lossy. If opus use 48k, 44.1 with the others since they are tuned at that sample rate. 48k is native in opus.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-29 19:30:26
The way you're doing subtraction is not reliable compared to almost any other test.

Ok got it.

@andiandi
SoX resampler has no intersample drift so is much easier to compare.
Most of all don't expect to find out anything new. Transparency from resampler software is a long solved problem.

I'll stick with SoX, I don't want to get on all that tbh.

24 vs 16:  I already told you.

With that recording you don’t even need to use dither, not that you shouldn’t use dither.

What’s with all the fear uncertainty and doubt?  You will never tell the difference with either of the resamplers you tried. This obsessing really isn’t worth your time.

44.1/16 is what I would recommend, or go lossy. If opus use 48k, 44.1 with the others since these are how those lossy codecs are tuned. 48k is native in opus.


It's just that it's rare material, but i'm sick of keeping 800GB files on my hard drive. That's why I wanted to be sure before doing anything.

Btw, I just did some ABX tests, and it proves that what have been said before is true. Hearing is so much better than looking.

I compared the source in 96KHz with resamples; Here are the results :

96KHz 24-bit = 48KHz 24-bit = 48KHz 16-bit = 32KHz 24-bit = 32KHz 16-bit.

However 24KHz 24-bit is downgraded. I got 16/16 right on ABX, while I couldn't tell other tracks apart (I tried hard, but it's impossible, even with a dB gain)

So I'll stick to 32KHz 16-bit.

I have a last question though. I read somewhere that audio frequencies needed some "free space". Since my sources have been broadcasted just below 12KHz (maybe at 11.3KHz, 11.8KHz, idk), does it explain why there is a deterioration when resampling at 24KHz (24KHz rate= 12KHz frequency, so "too" close to the maximum).
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-11-29 21:02:34
So, assuming stereo, you went down from 4608 kbps to 1024 kbps - from 800GB to ~178GB.
Now, ABX your files with Opus@128 kbps and consider shaving off another ~155GB down to ~22GB...
Or maybe 96 kbps? Or...even...95kbps  :D
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-29 21:30:54
So, assuming stereo, you went down from 4608 kbps to 1024 kbps - from 800GB to ~178GB.
Now, ABX your files with Opus@128 kbps and consider shaving off another ~155GB down to ~22GB...
Or maybe 96 kbps? Or...even...95kbps  :D

Yeah, but actually I need those audio for editing so I prefer to keep them lossless :)
But going from 96KHz 24-Bit to 32KHz 16-bit will free so much space.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-30 16:47:47
I ask my question again for those who missed it :

I compared the source in 96KHz with resamples; Here are the results :

96KHz 24-bit = 48KHz 24-bit = 48KHz 16-bit = 32KHz 24-bit = 32KHz 16-bit.

However 24KHz 24-bit is downgraded. I got 16/16 right on ABX, while I couldn't tell other tracks apart (I tried hard, but it's impossible, even with a dB gain)

So I'll stick to 32KHz 16-bit.

I have a last question though. I read somewhere that audio frequencies needed some free space/headroom. Since my sources have been broadcasted just below 12KHz (maybe at 11.3KHz, 11.8KHz, idk), does it explain why there is a deterioration when resampling at 24KHz (24KHz rate= 12KHz frequency, so "too" close to the maximum).
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-11-30 21:19:59
IIRC it was recommended to not go over 20kHz on CDDA because some DACs had problems recreating near Nyquist frequencies.
In case of your PC probably everything gets resampled to something like 48kHz anyway so it shouldn't matter.
I would bet that there's significant amount of noise in your recordings and losing it just above 12kHz could be audible...
Also, at 32kHz you keep the NTSC horizontal refresh frequency which you may hear.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-11-30 22:55:10
Quote
I would bet that there's significant amount of noise in your recordings and losing it just above 12kHz could be audible...

That's right. When I do an ABX compare of just the noise, it's better on 32KHz (same as source) than 24KHz.


Quote
Also, at 32kHz you keep the NTSC horizontal refresh frequency which you may hear.

I don't particularly hear it on the original files tbh (I don't really hear something above 17KHz, so maybe it's just too quiet)

You talked about near nquist frequencies for DAC, and it's interesting. I guess it's the same issue for digital resampling then. You may have to let some headroom.
Title: Re: Encoding old material at 96KHz question
Post by: magicgoose on 2019-11-30 23:20:01
> NTSC horizontal refresh frequency which you may hear
> I don't particularly hear it on the original files tbh (I don't really hear something above 17KHz, so maybe it's just too quiet)

it's between 15kHz and 16kHz IIRC. 15625 Hz or something like that
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-12-01 05:49:40
> NTSC horizontal refresh frequency which you may hear
> I don't particularly hear it on the original files tbh (I don't really hear something above 17KHz, so maybe it's just too quiet)

it's between 15kHz and 16kHz IIRC. 15625 Hz or something like that

Yes I can see that horizontal line above 15KHz in the spectrum. And ther's another one above 30KHz.
But it's not an issue, I guess only animal would be bothered by that :p
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-12-01 10:30:09
No, as a child, near CRTs I definitely could hear PAL H refresh which is just a lil bit lower. You may more like sense it than hear, but it definitely can affect audibility. Do yourselve a test - take your original file and lowpass filter it so there's nothing above 15kHz and ABX it... Or highpass filter it so there's nothing under 15kHz and ABX it with digital silence  :))
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-12-01 20:36:45
No, as a child, near CRTs I definitely could hear PAL H refresh which is just a lil bit lower. You may more like sense it than hear, but it definitely can affect audibility. Do yourselve a test - take your original file and lowpass filter it so there's nothing above 15kHz and ABX it... Or highpass filter it so there's nothing under 15kHz and ABX it with digital silence  :))

I tried what you suggested with adobe audition : I listened to a frequency between 14500 and 15000 (below NTSC line) and I didn't heard anything disturbing apart from some remaining noise of the track.

Then I listened to the frequency of the NTSC line alone (just above 15KHz) with some dB gain and max volume. It's very high-pitched and annoying.

Is there a way convert to 30KHz instead of 32KHz to make that line dissapear ? or is it good to lowpass to 15KHz on a 32KHz track or not ?

I don't wanna make anything wrong.
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-12-01 21:19:39
Lowpass original file so there's nothing above 15kHz and compare it to a file resampled to 24kHz. If you can't ABX them then I'd say that what you ABXed before, was NTSC interference and I would stay with 24kHz files. If you still hear the difference then I'd stay with 32kHz but lowpass filter the NTSC interference. Still there's that noise in 12-16kHz range which, well, is noise - you can hear it in 32kHz files and you may sense lack of it in 24kHz but is it worth keeping when original content is known to end at 12kHz?

And due to masking effects it's not a good idea to judge by listening to extracted noise or NTSC interference alone at insane levels - judge by listening at normal levels with all the lower original content.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-12-02 00:38:08
Lowpass original file so there's nothing above 15kHz and compare it to a file resampled to 24kHz. If you can't ABX them then I'd say that what you ABXed before, was NTSC interference and I would stay with 24kHz files. If you still hear the difference then I'd stay with 32kHz but lowpass filter the NTSC interference. Still there's that noise in 12-16kHz range which, well, is noise - you can hear it in 32kHz files and you may sense lack of it in 24kHz but is it worth keeping when original content is known to end at 12kHz?

And due to masking effects it's not a good idea to judge by listening to extracted noise or NTSC interference alone at insane levels - judge by listening at normal levels with all the lower original content.

Good idea I'll try that.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-12-02 01:50:15
Lowpass original file so there's nothing above 15kHz and compare it to a file resampled to 24kHz. If you can't ABX them then I'd say that what you ABXed before, was NTSC interference and I would stay with 24kHz files. If you still hear the difference then I'd stay with 32kHz but lowpass filter the NTSC interference. Still there's that noise in 12-16kHz range which, well, is noise - you can hear it in 32kHz files and you may sense lack of it in 24kHz but is it worth keeping when original content is known to end at 12kHz?

And due to masking effects it's not a good idea to judge by listening to extracted noise or NTSC interference alone at insane levels - judge by listening at normal levels with all the lower original content.

Ok so I tried what you suggested, and I still can ABX the 96KHz lowpass 15KHz and the 24KHz.
So it's definitely not the NTSC line.

I also think that 32KHz + lowpass 15KHz is a good compromise.

But why when you record in high frequencies, it seems that above the source frequency limit, there is a duplication of the relevant frequencies below ?

For example here, the frequencies squared on the screenshot (>12KHz) are supposed to be TV broadcasting and/or DAC recording noise, but it looks like the source frequencies spread above (the vertical lines). When there's is a voice for example, I can hear some sort of ultrasounds reproducing the pace of that voice. (Here, someone is laughing, and the HA HA HA HA HA is spreading as ultrasounds, I think you understood though)

(https://i.ibb.co/WpgZHj3/AASPCTRM.jpg) (https://imgbb.com/)

It's exactly what I was wondering when creating this topic : does recording with a sample rate above two times the frequencies of the source change it, so that relevant data go in higher frequencies and it's "too late" to lowpass ? Or are they just useless "cloned" frequencies, like chroma shifting with VHS (colors that spread all around), and I can ignore them since it's irrelevant ?
Title: Re: Encoding old material at 96KHz question
Post by: saratoga on 2019-12-02 03:36:19
But why when you record in high frequencies, it seems that above the source frequency limit, there is a duplication of the relevant frequencies below ?

Since the signal doesn't vary much (or really at all with) with frequency, that is probably distortion and not actual signal.   Real audio tends to vary with frequency. 

It's exactly what I was wondering when creating this topic : does recording with a sample rate above two times the frequencies of the source change it, so that relevant data go in higher frequencies and it's "too late" to lowpass ?

Internally your ADC most likely runs at several MHz and then downsamples to whatever rate you pick.  If you pick 96k and then downsample a second time to get to 48k doesn't make any difference. 
Title: Re: Encoding old material at 96KHz question
Post by: rutra80 on 2019-12-02 09:43:21
Such duplication may be due to aliasing, maybe clipping, or other distortion somewhere in playback/recording chain. If you know that the content is up to 12kHz, anything above is noise or some distortion. 96/24 is waaay overshot for VHS.
Title: Re: Encoding old material at 96KHz question
Post by: andiandi on 2019-12-02 15:53:07
Thank you very much to both of you. Now I know what to do.