[FFmpeg-user] How to generate sine-wave mp3 test tone files in one-step?

jasonsu at mail-central.com jasonsu at mail-central.com
Sun Mar 27 23:30:37 CEST 2016


Hi.

I want to generate mp3 files containing sine-wave test tones.

They need to be

	44.1KHz sampled
	192Kbps bitrate
	30sec duration
	normalized to 0Db

I'd like to do it in one cmd line step.

I've been having a heck of a time putting it together properly.

I _think_ this works

	ffmpeg -f lavfi \
	 -i "sine=frequency=1000:sample_rate=44100:duration=30" \
	 -acodec mp3 \
	 -b:a 192k \
	test.mp3

	ffmpeg-normalize -v -f -u \
	 --dir \
	 --acodec mp3 \
	 --extra-options "-b:a 192k" \
	 --level 0 --max \
	test.mp3

I end up with 2 files

	test.mp3
	normalized/test.mp3

Is there a simpler/correct single cmd line to do this? and only generate/keep one file?

Thanks.


More information about the ffmpeg-user mailing list