FFMPEG get mono WAV audio 8khz 16 bit out of mp4 video

ffmpeg

I need to extract audio out of MP4 video file using FFMPEG. Just extracting audio is easy enough but I can't figure out the right parameters to get audio in mono 8khz 16 bit.

Basically I need to take all of the audio channels out of the video file and merge them into a mono 8khz 16 bit file. Is it possible to do so with FFMPEG?

I tried running

ffmpeg -i video.mp4 -acodec pcm_s16le -ac 2 audio.wav

Bit it's not giving me the exact result I want.

Best Answer

Use -ac 1 (See the FFmpeg wiki, or the man page with man ffmpeg) to limit the output to one channel.

Then use -ar 8000 for 8kHz and -acodec pcm_s16le for 16 bit.

Related Question