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


Group: Members (Donating) Posts: 171 Joined: 1October 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.



Feb 13 2013, 22:11
Post
#2


Group: Members Posts: 1844 Joined: 24June 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 + (i1o0)*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?) 


Feb 14 2013, 07:01
Post
#3


Group: Members Posts: 5562 Joined: 2September 02 Member No.: 3264 
@ 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: sincbased and polynomialbased. 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. 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. I mentioned graphics, because the word "spline" does describe that, a line (a visual concept). huh? 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 Ndimensional spaces. (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. 


LoFi Version  Time is now: 2nd September 2015  20:33 