IPB

Welcome Guest ( Log In | Register )

ffmpeg vs. SoX for resampling
jkauff
post Feb 5 2013, 11:00
Post #1





Group: Members (Donating)
Posts: 164
Joined: 1-October 01
From: Doylestown, PA
Member No.: 145



I just found out that TAudioConverter, although it has SoX support, uses ffmpeg for bitdepth changes, resampling, and dither. I don't use those functions very much, but I'm curious if anyone has done a quality comparison between the two.
Go to the top of the page
+Quote Post
 
Start new topic
Replies
[JAZ]
post Feb 13 2013, 22:11
Post #2





Group: Members
Posts: 1797
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



@ saratoga:
As I said, my knowledge of this is average, and I might even use the wrong words sometimes.

That said, I'm not sure I agree completely with what you say.
A -> B does not necesarily equal B -> A

A sinc filter (which has a sinc function as its impulse response) is a lowpass filter, but a lowpass filter is not necesarily a sinc filter. I don't have the math knowledge to make filters (or understand fully the poles and zeroes), but I understand that the polynomials generated are not just "sinc aproximations".
Just like the most basic lowpass filter is not a sinc filter: o0 + (i1-o0)*FC


You simplified the two methods I described as to using a lowpass filter. In essence, this is true (we want to get a lowpassed signal to avoid aliasing), but I wanted to differentiate the theory from the result. Example:
A linear interpolation is an intuitive way to find the value between two points, but it is not based on theory that reconstructs the path that a continuous bandlimited signal would take.

In that way, i made a distinction between the sinc method and the decimate/interpolate method because they do have a theory related to sound behind them, but it is not the same theory. (Or, let's say, one is the theory directly, and the other is a derivate of the theory, as in the second one does not necesarily imply a sinc filter, even though it is the ideal one).
I can accept that the decimate/interpolate method is akin of doing a fixed point implementation of a floating point one, so in essence, they do the same. But as an implementation, they reach the solution differently.


About polynomials, I admit I might have been too quick. I overlooked the math history, but again I was mentioning concrete methods while you mention the concepts on which they are based. Polynomials serve many purposes, and not all of them apply to bandlimited signals.
I mentioned graphics, because the word "spline" does describe that, a line (a visual concept).

Images are indeed made of samples, but.. what is the equivalent shannon theorem for images? I could accept that images are bandlimited (there's a finite spectrum represented by the sampled image colours, but even then, the RGB points are the representation of the image in the time domain?)
Go to the top of the page
+Quote Post
saratoga
post Feb 14 2013, 07:01
Post #3





Group: Members
Posts: 5147
Joined: 2-September 02
Member No.: 3264



QUOTE ([JAZ] @ Feb 13 2013, 16:11) *

@ saratoga:
As I said, my knowledge of this is average, and I might even use the wrong words sometimes.

That said, I'm not sure I agree completely with what you say.
A -> B does not necesarily equal B -> A

A sinc filter (which has a sinc function as its impulse response) is a lowpass filter, but a lowpass filter is not necesarily a sinc filter. I don't have the math knowledge to make filters (or understand fully the poles and zeroes), but I understand that the polynomials generated are not just "sinc aproximations".


I think you misunderstand. My point is that the two methods you suggested (sinc interpolation and decimator/interpolator) are basically the same thing.

I brought up polynomials as an example of a different approach. My point is that there are basically two families of resamplers in widespread use: sinc-based and polynomial-based.

QUOTE ([JAZ] @ Feb 13 2013, 16:11) *

A linear interpolation is an intuitive way to find the value between two points, but it is not based on theory that reconstructs the path that a continuous bandlimited signal would take.

In that way, i made a distinction between the sinc method and the decimate/interpolate method because they do have a theory related to sound behind them, but it is not the same theory.


To be clear, the decimate/interpolate method always uses a sinc filter (or close approximation thereof) in practice. Linear interpolation can be combined with decimation/interpolation (using a sinc filter), but in practice never is because that rather defeats the purpose.

QUOTE ([JAZ] @ Feb 13 2013, 16:11) *

I can accept that the decimate/interpolate method is akin of doing a fixed point implementation of a floating point one, so in essence, they do the same. But as an implementation, they reach the solution differently.


I don't accept that. What does decimation/interpolation have to do with machine precision? You can do it integer, fixed point, floating point, decimal, whatever.

QUOTE ([JAZ] @ Feb 13 2013, 16:11) *
I mentioned graphics, because the word "spline" does describe that, a line (a visual concept).


huh?

QUOTE ([JAZ] @ Feb 13 2013, 16:11) *

Images are indeed made of samples, but.. what is the equivalent shannon theorem for images? I could accept that images are bandlimited


Pixels are samples in 2D spaces, just as voxels are samples in 3D spaces. The sampling theorem is universally applicable to all N-dimensional spaces.

QUOTE ([JAZ] @ Feb 13 2013, 16:11) *

(there's a finite spectrum represented by the sampled image colours, but even then, the RGB points are the representation of the image in the time domain?)


An RGB image is simply 3 independent grayscale images recorded using a color filter.
Go to the top of the page
+Quote Post

Posts in this topic
- jkauff   ffmpeg vs. SoX for resampling   Feb 5 2013, 11:00
- - db1989   Iím no authority, but thereís always good old http...   Feb 5 2013, 11:28
|- - bandpass   QUOTE (db1989 @ Feb 5 2013, 10:28) Letís,...   Feb 5 2013, 12:33
|- - jkauff   QUOTE (db1989 @ Feb 5 2013, 05:28) Iím no...   Feb 5 2013, 12:36
||- - bandpass   QUOTE (jkauff @ Feb 5 2013, 11:36) Well, ...   Feb 5 2013, 13:05
||- - phofman   QUOTE (bandpass @ Feb 5 2013, 14:05) ... ...   Feb 5 2013, 16:32
||- - bandpass   QUOTE (phofman @ Feb 5 2013, 15:32) I am ...   Feb 5 2013, 17:23
||- - phofman   QUOTE (bandpass @ Feb 5 2013, 18:23) The ...   Feb 12 2013, 15:01
||- - bandpass   Audacity are using libsoxr directly (native API). ...   Feb 12 2013, 16:13
||- - 2012   QUOTE (phofman @ Feb 12 2013, 16:01) QUOT...   Feb 13 2013, 15:49
||- - phofman   QUOTE (2012 @ Feb 13 2013, 16:49) I alrea...   Feb 13 2013, 20:29
|- - [JAZ]   QUOTE (db1989 @ Feb 5 2013, 11:28) Letís...   Feb 5 2013, 20:36
- - db1989   I did notice the large disparity in version number...   Feb 5 2013, 12:40
- - lvqcl   Downloaded TAC(0.7.5.938)(portable).7z. It contain...   Feb 5 2013, 15:56
- - db1989   Regardless of different options and builds, someth...   Feb 5 2013, 17:50
- - ozok   I've posted a request for a ffmpeg build with ...   Feb 5 2013, 18:09
- - db1989   QUOTE QUOTE Seems to me that those reflections of...   Feb 5 2013, 20:51
- - lvqcl   QUOTE (Alexey Lukin @ Jul 31 2008, 04:10)...   Feb 5 2013, 21:55
|- - bandpass   QUOTE (lvqcl @ Feb 5 2013, 20:55) + a thr...   Feb 5 2013, 22:39
- - bandpass   FFmpeg native is even worse going the other way (i...   Feb 5 2013, 22:29
- - mavere   QUOTE (db1989 @ Feb 5 2013, 02:28) I...   Feb 6 2013, 02:58
|- - nu774   QUOTE (mavere @ Feb 6 2013, 10:58) Apple ...   Feb 6 2013, 05:06
- - IgorC   http://src.infinitewave.ca/images/Tone/ffmpeg.png ...   Feb 6 2013, 03:43
|- - bandpass   QUOTE (IgorC @ Feb 6 2013, 02:43) ffmpeg...   Feb 6 2013, 07:48
- - Alexey Lukin   These spectral peaks are not bad only for a 1 kHz ...   Feb 6 2013, 04:33
- - LithosZA   QUOTE ve posted a request for a ffmpeg build with ...   Feb 6 2013, 08:17
- - ozok   zeranoe kindly supplied it after my request.   Feb 6 2013, 13:01
- - soulsearchingsun   So, where is TOS#8 when everyone agrees on looking...   Feb 6 2013, 14:34
|- - pdq   QUOTE (soulsearchingsun @ Feb 6 2013, 08...   Feb 6 2013, 14:46
|- - db1989   QUOTE (soulsearchingsun @ Feb 6 2013, 13...   Feb 6 2013, 15:27
|- - bandpass   QUOTE (soulsearchingsun @ Feb 6 2013, 13...   Feb 7 2013, 08:57
- - [JAZ]   As always, there is tradeoff between speed and acc...   Feb 6 2013, 23:36
|- - saratoga   QUOTE ([JAZ] @ Feb 6 2013, 17:36)...   Feb 12 2013, 16:50
|- - halb27   QUOTE ([JAZ] @ Feb 6 2013, 23:36)...   Feb 12 2013, 18:30
|- - bandpass   QUOTE (halb27 @ Feb 12 2013, 17:30) Can y...   Feb 14 2013, 08:04
- - [JAZ]   @ halb27: I haven't checked other software, b...   Feb 12 2013, 20:25
|- - lvqcl   QUOTE ([JAZ] @ Feb 12 2013, 23:25...   Feb 12 2013, 20:39
|- - knutinh   QUOTE ([JAZ] @ Feb 12 2013, 20:25...   Feb 13 2013, 16:04
|- - saratoga   QUOTE ([JAZ] @ Feb 12 2013, 14:25...   Feb 13 2013, 18:32
- - [JAZ]   @ saratoga: As I said, my knowledge of this is av...   Feb 13 2013, 22:11
|- - Rotareneg   QUOTE ([JAZ] @ Feb 13 2013, 15:11...   Feb 14 2013, 05:39
|- - saratoga   QUOTE ([JAZ] @ Feb 13 2013, 16:11...   Feb 14 2013, 07:01
- - halb27   So SSRC high precision is a good approximation to ...   Feb 14 2013, 09:07
- - bandpass   SSRC uses kaiser-windowed sinc.   Feb 14 2013, 13:48
- - halb27   Sorry, I don't know what this means in terms o...   Feb 14 2013, 19:03
|- - saratoga   QUOTE (halb27 @ Feb 14 2013, 13:03) Sorry...   Feb 14 2013, 19:12
- - bandpass   It has some problems upsampling though:   Feb 14 2013, 22:28
|- - saratoga   QUOTE (bandpass @ Feb 14 2013, 16:28) It ...   Feb 15 2013, 01:53
|- - bandpass   QUOTE (saratoga @ Feb 15 2013, 00:53) Are...   Feb 15 2013, 07:00
- - halb27   No problem for me, I'm only interested in down...   Feb 14 2013, 23:05
- - Wombat   QUOTE (bandpass @ Feb 14 2013, 23:28) It ...   Feb 15 2013, 03:42


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: 18th December 2014 - 11:14