Add a test-tone sine wave
A pure sine wave at a known frequency is the simplest possible audio test signal. You use it to verify a speaker is wired correctly (left vs right), to calibrate a room's response, or to confirm an audio interface is passing signal at all. FFmpeg can generate one without an input file.
The command
ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -c:a pcm_s16le test.wavWhat it does
The `sine` source filter generates a sine wave at the specified frequency for the specified duration. The default is a 440 Hz wave (concert A) at 0 dBFS; pass `frequency=1000` for a 1 kHz test tone, `sample_rate=48000` to set the sample rate explicitly. The output is a raw audio file you can play in any audio player or pipe into a measurement tool.
Requirements
No input file. The `lavfi` virtual input lets you use a source filter as the only input. The output codec `pcm_s16le` is the standard 16-bit signed little-endian PCM, which is what every audio editor and player reads. No hardware, no special build.
Things to avoid
- Forgetting `-f lavfi` before the `-i`. Without it, FFmpeg tries to interpret `sine=frequency=...` as a filename and errors out.
- Generating a tone at a frequency that is inaudible on your speakers. Below 20 Hz or above 20 kHz, the tone will be silent on consumer hardware.
- Using a single-frequency tone to test stereo balance. The test only confirms that the speaker is wired to the correct channel; for balance, use a pink noise source.
- Relying on the default duration. The default is 10 seconds; pass `duration=5` or `duration=0.1` to keep the file small for a quick test.