← 返回命令列表

Linux command

spa-resample 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Resample

spa-resample -r [48000] [input.wav] [output.wav]

Resample

spa-resample -r [48000] -f [s32] [input.wav] [output.wav]

Resample

spa-resample -q 14 -r [48000] [input.wav] [output.wav]

Resample

spa-resample -v -r [44100] -f [f32] [input.wav] [output.wav]

说明

spa-resample is a command-line utility that uses the PipeWire SPA resampler to convert audio files from one sample rate and format to another. It reads a WAV input file, applies resampling with the specified parameters, and writes the result to a WAV output file. The tool is primarily intended for testing and debugging the PipeWire resampler implementation rather than as a general-purpose audio conversion tool. It provides direct access to the same resampling algorithm that PipeWire uses internally for audio stream processing, making it useful for verifying resampler behavior and quality.

参数

-r _RATE_, --rate=_RATE_
Output sample rate.
-f _FORMAT_, --format=_FORMAT_
Output sample format (s8 | s16 | s32 | f32 | f64).
-q _QUALITY_, --quality=_QUALITY_
Resampler output quality (0-14). Higher values produce better quality at the cost of more CPU usage.
-c _FLAGS_, --cpuflags=_FLAGS_
CPU feature flags for SIMD optimization selection. See spa/support/cpu.h for details.
-v
Verbose operation.
-h
Show help.

FAQ

What is the spa-resample command used for?

spa-resample is a command-line utility that uses the PipeWire SPA resampler to convert audio files from one sample rate and format to another. It reads a WAV input file, applies resampling with the specified parameters, and writes the result to a WAV output file. The tool is primarily intended for testing and debugging the PipeWire resampler implementation rather than as a general-purpose audio conversion tool. It provides direct access to the same resampling algorithm that PipeWire uses internally for audio stream processing, making it useful for verifying resampler behavior and quality.

How do I run a basic spa-resample example?

Run `spa-resample -r [48000] [input.wav] [output.wav]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r _RATE_, --rate=_RATE_ do in spa-resample?

Output sample rate.