I'm using the following ffmpeg command to convert a multitrack wav to multiple mono tracks:

ffmpeg -i input.wav \
  -map_channel 0.0.0 a.wav \
  -map_channel 0.0.1 b.wav \
  -map_channel 0.0.2 c.wav \
  -map_channel 0.0.3 d.wav \

This works fine but it converts the channels to 16bit PCM:

Stream #0:0 -> #0:0 (pcm_s24le (native) -> pcm_s16le (native))
Stream #0:0 -> #1:0 (pcm_s24le (native) -> pcm_s16le (native))
Stream #0:0 -> #2:0 (pcm_s24le (native) -> pcm_s16le (native))
Stream #0:0 -> #3:0 (pcm_s24le (native) -> pcm_s16le (native))

I've also tried "-sample_fmt pcm_s24le" or "-sample_fmt s32" but both parameters were not recognized.

How can I extract the channels of a multiwav file without changing the bit depth?


The encoder pcm_s16le is being used for your .wav output. This encoder only supports the s16 sample format (see ffmpeg -h encoder=pcm_s16le and ffmpeg -sample_fmts).

You can choose the encoder pcm_s24le:

ffmpeg -i input.wav \
  -map_channel 0.0.0 -c:a pcm_s24le a.wav \
  -map_channel 0.0.1 -c:a pcm_s24le b.wav \
  -map_channel 0.0.2 -c:a pcm_s24le c.wav \
  -map_channel 0.0.3 -c:a pcm_s24le d.wav
|improve this answer|||||
  • Thanks a lot llogan, this works perfectly. I was not aware i could use the -c:a parameter for each map_channel... – rimshot Feb 2 '19 at 12:01

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.