{
    "content": [
        {
            "type": "text",
            "text": "# ffmpeg-resampler (man)\n\n## NAME\n\nffmpeg-resampler - FFmpeg Resampler\n\n## DESCRIPTION\n\nThe 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\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **RESAMPLER OPTIONS** (5 subsections)\n- **SEE ALSO**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ffmpeg-resampler",
        "section": "",
        "mode": "man",
        "summary": "ffmpeg-resampler - FFmpeg Resampler",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "RESAMPLER OPTIONS",
                "lines": 105,
                "subsections": [
                    {
                        "name": "resampler",
                        "lines": 28
                    },
                    {
                        "name": "cutoff",
                        "lines": 4
                    },
                    {
                        "name": "precision",
                        "lines": 5
                    },
                    {
                        "name": "cheby",
                        "lines": 3
                    },
                    {
                        "name": "async",
                        "lines": 73
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 12,
                "subsections": []
            }
        ],
        "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\nich, inchannelcount\nSet the number of input channels. Default value is 0. Setting this value is not mandatory\nif the corresponding channel layout inchannellayout is set.\n\noch, outchannelcount\nSet the number of output channels. Default value is 0. Setting this value is not\nmandatory if the corresponding channel layout outchannellayout is set.\n\nuch, usedchannelcount\nSet the number of used input channels. Default value is 0. This option is only used for\nspecial remapping.\n\nisr, insamplerate\nSet the input sample rate. Default value is 0.\n\nosr, outsamplerate\nSet the output sample rate. Default value is 0.\n\nisf, insamplefmt\nSpecify the input sample format. It is set by default to \"none\".\n\nosf, outsamplefmt\nSpecify the output sample format. It is set by default to \"none\".\n\ntsf, internalsamplefmt\nSet the internal sample format. Default value is \"none\".  This will automatically be\nchosen when it is not explicitly set.\n\nicl, inchannellayout\nocl, outchannellayout\nSet the input/output channel layout.\n\nSee the Channel Layout section in the ffmpeg-utils(1) manual for the required syntax.\n\nclev, centermixlevel\nSet the center mix level. It is a value expressed in deciBel, and must be in the interval\n[-32,32].\n\nslev, surroundmixlevel\nSet the surround mix level. It is a value expressed in deciBel, and must be in the\ninterval [-32,32].\n\nlfemixlevel\nSet 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\nrmvol, rematrixvolume\nSet rematrix volume. Default value is 1.0.\n\nrematrixmaxval\nSet maximum output value for rematrixing.  This can be used to prevent clipping vs.\npreventing volume reduction.  A value of 1.0 prevents clipping.\n\nflags, swrflags\nSet 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\nditherscale\nSet the dither scale. Default value is 1.\n\ndithermethod\nSet 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",
                "subsections": [
                    {
                        "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\nfiltersize\nFor swr only, set resampling filter size, default value is 32.\n\nphaseshift\nFor swr only, set resampling phase shift, default value is 10, and must be in the\ninterval [0,30].\n\nlinearinterp\nUse linear interpolation when enabled (the default). Disable it if you want to preserve\nspeed instead of quality when exactrational fails.\n\nexactrational\nFor 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\nfirstpts\nFor 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\nmincomp\nFor 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\nminhardcomp\nFor 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\ncompduration\nFor 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\nmaxsoftcomp\nFor 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\nmatrixencoding\nSelect 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\nfiltertype\nFor 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\nkaiserbeta\nFor swr only, set Kaiser window beta value. Must be a double float value in the interval\n[2,16], default value is 9.\n\noutputsamplebits\nFor 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(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in the FFmpeg source\ndirectory, or browsing the online repository at <http://source.ffmpeg.org>.\n\nMaintainers for the specific components are listed in the file MAINTAINERS in the source code\ntree.\n\n\n\nFFMPEG-RESAMPLER(1)",
                "subsections": []
            }
        }
    }
}