{
    "mode": "man",
    "parameter": "FFMPEG-RESAMPLER",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/FFMPEG-RESAMPLER/json",
    "generated": "2026-10-22T13:07:22Z",
    "sections": {
        "NAME": {
            "content": "ffmpeg-resampler - FFmpeg Resampler\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The FFmpeg resampler provides a high-level interface to the libswresample library audio\nresampling utilities. In particular it allows one to perform audio resampling, audio channel\nlayout rematrixing, and convert audio format and packing layout.\n",
            "subsections": []
        },
        "RESAMPLER OPTIONS": {
            "content": "The audio resampler supports the following named options.\n\nOptions may be set by specifying -option value in the FFmpeg tools, option=value for the\naresample filter, by setting the value explicitly in the \"SwrContext\" options or using the\nlibavutil/opt.h API for programmatic use.\n",
            "subsections": [
                {
                    "name": "uchl, used_chlayout",
                    "content": "Set  used  input  channel  layout. Default is unset. This option is only used for special\nremapping.\n"
                },
                {
                    "name": "isr, in_sample_rate",
                    "content": "Set the input sample rate. Default value is 0.\n"
                },
                {
                    "name": "osr, out_sample_rate",
                    "content": "Set the output sample rate. Default value is 0.\n"
                },
                {
                    "name": "isf, in_sample_fmt",
                    "content": "Specify the input sample format. It is set by default to \"none\".\n"
                },
                {
                    "name": "osf, out_sample_fmt",
                    "content": "Specify the output sample format. It is set by default to \"none\".\n"
                },
                {
                    "name": "tsf, internal_sample_fmt",
                    "content": "Set the internal sample format. Default value is  \"none\".   This  will  automatically  be\nchosen when it is not explicitly set.\n"
                },
                {
                    "name": "ichl, in_chlayout",
                    "content": ""
                },
                {
                    "name": "ochl, out_chlayout",
                    "content": "Set the input/output channel layout.\n\nSee the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax.\n"
                },
                {
                    "name": "clev, center_mix_level",
                    "content": "Set the center mix level. It is a value expressed in deciBel, and must be in the interval\n[-32,32].\n"
                },
                {
                    "name": "slev, surround_mix_level",
                    "content": "Set  the  surround  mix  level.  It  is  a value expressed in deciBel, and must be in the\ninterval [-32,32].\n"
                },
                {
                    "name": "lfe_mix_level",
                    "content": "Set LFE mix into non LFE level. It is used when there is a LFE input but no  LFE  output.\nIt is a value expressed in deciBel, and must be in the interval [-32,32].\n"
                },
                {
                    "name": "rmvol, rematrix_volume",
                    "content": "Set rematrix volume. Default value is 1.0.\n"
                },
                {
                    "name": "rematrix_maxval",
                    "content": "Set  maximum  output  value  for  rematrixing.   This can be used to prevent clipping vs.\npreventing volume reduction.  A value of 1.0 prevents clipping.\n"
                },
                {
                    "name": "flags, swr_flags",
                    "content": "Set flags used by the converter. Default value is 0.\n\nIt supports the following individual flags:\n\nres force resampling, this flag forces resampling to be used  even  when  the  input  and\noutput sample rates match.\n"
                },
                {
                    "name": "dither_scale",
                    "content": "Set the dither scale. Default value is 1.\n"
                },
                {
                    "name": "dither_method",
                    "content": "Set dither method. Default value is 0.\n\nSupported values:\n\nrectangular\nselect rectangular dither\n\ntriangular\nselect triangular dither\n\ntriangularhp\nselect triangular dither with high pass\n\nlipshitz\nselect Lipshitz noise shaping dither.\n\nshibata\nselect Shibata noise shaping dither.\n\nlowshibata\nselect low Shibata noise shaping dither.\n\nhighshibata\nselect high Shibata noise shaping dither.\n\nfweighted\nselect f-weighted noise shaping dither\n\nmodifiedeweighted\nselect modified-e-weighted noise shaping dither\n\nimprovedeweighted\nselect improved-e-weighted noise shaping dither\n"
                },
                {
                    "name": "resampler",
                    "content": "Set resampling engine. Default value is swr.\n\nSupported values:\n\nswr select the native SW Resampler; filter options precision and cheby are not applicable\nin this case.\n\nsoxr\nselect  the  SoX  Resampler  (where  available);  compensation,  and  filter  options\nfiltersize,  phaseshift,  exactrational,  filtertype  &  kaiserbeta,   are   not\napplicable in this case.\n"
                },
                {
                    "name": "filter_size",
                    "content": "For swr only, set resampling filter size, default value is 32.\n"
                },
                {
                    "name": "phase_shift",
                    "content": "For  swr  only,  set  resampling  phase  shift,  default  value is 10, and must be in the\ninterval [0,30].\n"
                },
                {
                    "name": "linear_interp",
                    "content": "Use linear interpolation when enabled (the default). Disable it if you want  to  preserve\nspeed instead of quality when exactrational fails.\n"
                },
                {
                    "name": "exact_rational",
                    "content": "For swr only, when enabled, try to use exact phasecount based on input and output sample\nrate.  However,  if  it  is larger than \"1 << phaseshift\", the phasecount will be \"1 <<\nphaseshift\" as fallback. Default is enabled.\n"
                },
                {
                    "name": "cutoff",
                    "content": "Set cutoff frequency (swr: 6dB point; soxr: 0dB point)  ratio;  must  be  a  float  value\nbetween  0  and  1.   Default  value  is 0.97 with swr, and 0.91 with soxr (which, with a\nsample-rate of 44100, preserves the entire audio band to 20kHz).\n"
                },
                {
                    "name": "precision",
                    "content": "For soxr only, the precision in bits to which the resampled signal  will  be  calculated.\nThe default value of 20 (which, with suitable dithering, is appropriate for a destination\nbit-depth  of  16)  gives  SoX's  'High  Quality';  a  value of 28 gives SoX's 'Very High\nQuality'.\n"
                },
                {
                    "name": "cheby",
                    "content": "For soxr only, selects passband rolloff none (Chebyshev) & higher-precision approximation\nfor 'irrational' ratios. Default value is 0.\n"
                },
                {
                    "name": "async",
                    "content": "For swr only, simple 1 parameter audio sync to timestamps  using  stretching,  squeezing,\nfilling  and  trimming. Setting this to 1 will enable filling and trimming, larger values\nrepresent the maximum amount in samples that the data may be stretched  or  squeezed  for\neach  second.   Default  value  is 0, thus no compensation is applied to make the samples\nmatch the audio timestamps.\n"
                },
                {
                    "name": "first_pts",
                    "content": "For swr only, assume the first pts should be this value. The time  unit  is  1  /  sample\nrate.  This allows for padding/trimming at the start of stream. By default, no assumption\nis  made  about  the  first  frame's expected pts, so no padding or trimming is done. For\nexample, this could be set to 0 to pad the beginning with  silence  if  an  audio  stream\nstarts  after  the video stream or to trim any samples with a negative pts due to encoder\ndelay.\n"
                },
                {
                    "name": "min_comp",
                    "content": "For swr only, set the minimum difference between timestamps and audio data  (in  seconds)\nto  trigger  stretching/squeezing/filling  or  trimming  of the data to make it match the\ntimestamps. The default is that stretching/squeezing/filling  and  trimming  is  disabled\n(mincomp = \"FLTMAX\").\n"
                },
                {
                    "name": "min_hard_comp",
                    "content": "For  swr  only, set the minimum difference between timestamps and audio data (in seconds)\nto trigger adding/dropping  samples  to  make  it  match  the  timestamps.   This  option\neffectively  is a threshold to select between hard (trim/fill) and soft (squeeze/stretch)\ncompensation. Note that all compensation is by default disabled  through  mincomp.   The\ndefault is 0.1.\n"
                },
                {
                    "name": "comp_duration",
                    "content": "For  swr only, set duration (in seconds) over which data is stretched/squeezed to make it\nmatch the timestamps. Must be a non-negative double float value, default value is 1.0.\n"
                },
                {
                    "name": "max_soft_comp",
                    "content": "For swr only, set maximum factor by which data is stretched/squeezed to make it match the\ntimestamps. Must be a non-negative double float value, default value is 0.\n"
                },
                {
                    "name": "matrix_encoding",
                    "content": "Select matrixed stereo encoding.\n\nIt accepts the following values:\n\nnone\nselect none\n\ndolby\nselect Dolby\n\ndplii\nselect Dolby Pro Logic II\n\nDefault value is \"none\".\n"
                },
                {
                    "name": "filter_type",
                    "content": "For swr only, select resampling filter type. This only affects resampling operations.\n\nIt accepts the following values:\n\ncubic\nselect cubic\n\nblackmannuttall\nselect Blackman Nuttall windowed sinc\n\nkaiser\nselect Kaiser windowed sinc\n"
                },
                {
                    "name": "kaiser_beta",
                    "content": "For swr only, set Kaiser window beta value. Must be a double float value in the  interval\n[2,16], default value is 9.\n"
                },
                {
                    "name": "output_sample_bits",
                    "content": "For  swr only, set number of used output sample bits for dithering. Must be an integer in\nthe interval [0,64], default value is 0, which means it's not used.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "ffmpeg(1), ffplay(1), ffprobe(1), libswresample(3)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "The FFmpeg developers.\n\nFor   details   about   the   authorship,   see   the   Git   history    of    the    project\n(https://git.ffmpeg.org/ffmpeg),  e.g.  by  typing  the  command git log in the FFmpeg source\ndirectory, or browsing the online repository at <https://git.ffmpeg.org/ffmpeg>.\n\nMaintainers for the specific components are listed in the file MAINTAINERS in the source code\ntree.\n\nFFMPEG-RESAMPLER(1)",
            "subsections": []
        }
    },
    "summary": "ffmpeg-resampler - FFmpeg Resampler",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ffmpeg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ffmpeg/1/json"
        },
        {
            "name": "ffplay",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ffplay/1/json"
        },
        {
            "name": "ffprobe",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ffprobe/1/json"
        },
        {
            "name": "libswresample",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/libswresample/3/json"
        }
    ]
}