From 7019e0dcfe9f6edddfe8b20f062f8bb94110b3a0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Feb 2018 08:39:07 +0100 Subject: swresample: limit output size of audio frames Similar to the previous commit, and for the same reasons. Unlike with af_scaletempo, resampling does not have a natural frame size, so we set an arbitrary size limit on output frames. We add a new option to control this size, although I'm not sure whether anyone will use it, so mark it for testing only. Note that we go through some effort to avoid buffering data in libswresample itself. One reason is that we might have to reinitialize the resampler completely when changing speed, which drops the buffered data. Another is that I'm not sure whether the resampler will do the right thing when applying dynamic speed changes. --- DOCS/man/options.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e44a69235b..b0e4f8a9a9 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3496,6 +3496,15 @@ It also sets the defaults for the ``lavrresample`` audio filter. (decoder downmixing), or in the audio output (system mixer), this has no effect. +``--audio-resample-max-output-size=`` + Limit maximum size of audio frames filtered at once, in ms (default: 40). + The output size size is limited in order to make resample speed changes + react faster. This is necessary especially if decoders or filters output + very large frame sizes (like some lossless codecs or some DRC filters). + This option does not affect the resampling algorithm in any way. + + For testing/debugging only. Can be removed or changed any time. + ``--audio-swresample-o=`` Set AVOptions on the SwrContext or AVAudioResampleContext. These should be documented by FFmpeg or Libav. -- cgit v1.2.3