I am using ffmpeg to extract the audio from a video. Below code downlaods the audio from a video file. I'm not sure how efficient this program is but I do know that it downloaods it in 48KHZ.
How do I use this program to extract audio from a video in 8Khz because the file is getting too big.
ffmpeg -i video_link -vn output.wav
				
                        
Use
-aroption to change frequency rateIf you want to try different formats of audio check the available formats in ffmpeg using
ffmpeg -formatsand available codecs usingffmpeg -codecsHere's an example to extract to mp3 file
Edit: as @llogan pointed out,
-foption is not needed, ffmpeg automatically mux mp3 file.