IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Resample quality of FFMPEG?
FedeFrede
post Mar 1 2010, 23:37
Post #1





Group: Members
Posts: 9
Joined: 23-February 10
Member No.: 78440



I ran across: http://src.infinitewave.ca/ and realized the difference in quality looking across various SRC.
I use FFMPEG to downsample audio usually from 48Kz to 44.1Khz. Does anyone know how well FFMPEG downsamples in relation to aliasing?

Regards,

Frederik
Go to the top of the page
+Quote Post
FedeFrede
post Mar 2 2010, 11:30
Post #2





Group: Members
Posts: 9
Joined: 23-February 10
Member No.: 78440



I made my own little investigation and found that FFMPEG kills alot of the higher frequencies due to a lowpass filter not being steep enough.
FFMPEG does however seem to have a sufficient attenuation before Nyquist and therefore don't seem to introduce aliasing.
SSRC on the other hand is much better and preserve the high frequencies due to the extreme steep low pass filter, so that will be my choice from now on smile.gif

I used a sweep signal taken from http://src.infinitewave.ca/ and did a resample from 96KHz to 44.1 KHz, the result can be seen here:
http://img442.imageshack.us/i/sweep.png/
The first waveform is the original, the second is FFMPEG and the third is SSRC shown in Audacity.

here are the respective spectrum plots:
Original: http://img692.imageshack.us/i/originalh.png/
FFMPEG: http://img202.imageshack.us/i/ffmpeg.png/
SSRC: http://img4.imageshack.us/i/ssrc.png/

/Frederik
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post Mar 2 2010, 20:54
Post #3





Group: Members
Posts: 3962
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (FedeFrede @ Mar 2 2010, 05:30) *
I made my own little investigation and found that FFMPEG kills alot of the higher frequencies due to a lowpass filter not being steep enough.
FFMPEG does however seem to have a sufficient attenuation before Nyquist and therefore don't seem to introduce aliasing.
SSRC on the other hand is much better and preserve the high frequencies due to the extreme steep low pass filter, so that will be my choice from now on smile.gif

I used a sweep signal taken from http://src.infinitewave.ca/ and did a resample from 96KHz to 44.1 KHz, the result can be seen here:
http://img442.imageshack.us/i/sweep.png/
The first waveform is the original, the second is FFMPEG and the third is SSRC shown in Audacity.

here are the respective spectrum plots:
Original: http://img692.imageshack.us/i/originalh.png/
FFMPEG: http://img202.imageshack.us/i/ffmpeg.png/
SSRC: http://img4.imageshack.us/i/ssrc.png/

/Frederik


Your ssrc plot does not make sense to me. The ffmpeg shows the relatively gentle slope you mentioned,
Go to the top of the page
+Quote Post
FedeFrede
post Mar 2 2010, 23:04
Post #4





Group: Members
Posts: 9
Joined: 23-February 10
Member No.: 78440



QUOTE
Your ssrc plot does not make sense to me. The ffmpeg shows the relatively gentle slope you mentioned,

Compare FMPEG with the two others and look at the axis. It shows that FFMPEG is not a good choice when it comes to resampling and
it's indeed audible.

This post has been edited by FedeFrede: Mar 2 2010, 23:06
Go to the top of the page
+Quote Post
FedeFrede
post Aug 6 2012, 21:43
Post #5





Group: Members
Posts: 9
Joined: 23-February 10
Member No.: 78440



For further reading, read my blogpost on the topic:
http://transcoding.wordpress.com/2011/11/1...g-using-ffmpeg/
Go to the top of the page
+Quote Post
bandpass
post Aug 7 2012, 08:59
Post #6





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



Perhaps you could submit the ffmpeg results to infinite-wave (according to their instructions on the web-page) and let them run their analysis; this way, we can be sure we're comparing like with like.

AFAIK, SSRC is not maintained and may be buggy: see the first upsampling graph at http://www.hydrogenaudio.org/forums/index....st&p=803756

Remember that the audio band is 20Hz to 20kHz; 44/48kHz audio is slightly oversampled to allow for transition-band roll-off. And there's little point in preserving audio above 20k in files when your DAC is going to throw it away during playback anyway. Furthermore, steep filters are likely to produce undesirable effects such as more clipping and ringing. So the ideal response (leaving aside the question of aliasing) should probably look something like (the green line):
Go to the top of the page
+Quote Post
FedeFrede
post Aug 7 2012, 09:54
Post #7





Group: Members
Posts: 9
Joined: 23-February 10
Member No.: 78440



Michael Niedermayer made a comment last night on my blogpost stating that you can tweak the filter because of the audio filter options which weren't present when I wrote the original post 2,5 years ago:
http://transcoding.wordpress.com/2011/11/1...g-using-ffmpeg/

This post has been edited by FedeFrede: Aug 7 2012, 09:54
Go to the top of the page
+Quote Post
smok3
post Aug 7 2012, 09:58
Post #8


A/V Moderator


Group: Moderator
Posts: 1737
Joined: 30-April 02
From: Slovenia
Member No.: 1922



any wild guesses why this ffmpeg default is done the way it is?


--------------------
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung
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: 24th October 2014 - 09:46