3

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.

1
  • Please define "all audio channels". Do they really need to be overlaid? Or do you just want to mix a stereo source into mono? What's your input video's audio channel layout? Please include the full, uncut command line output, otherwise we're just guessing. – slhck Oct 15 '14 at 14:14
9

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.