1

Hi I have a bunch of recordings in my library that are stereo WAV's but are actually mono. Is there a script or program for mac that would find and convert the WAV's to mono ?

  • 1
    Converting is trivial. Finding, not quite. Are they really mono files stored in stereo format, or just stereo files with very little stereo width? – leftaroundabout Feb 6 '16 at 21:57
  • Yes they are 100% the same signal on both channels. – user16701 Feb 7 '16 at 14:36
2

A procedure that would definitely work: for each file ${f}.wav,

  • Split it up to M/S stereo, i.e. to a file ${f}_M.wav and a file ${f}_S.wav. For instance with

    ffmpeg -i ${f}.wav -filter_complex "[0:0]pan=1c|c0=0.5 * c0 + 0.5 * c1[mid];[0:0]pan=1c|c0 = 0.5 * c0 + -0.5 * c1[side]" -map "[mid]" ${f}_M.wav -map "[side]" ${f}_S.wav
    
  • If f.wav is actually mono, then f_S.wav will contain silence. You can detect this by analysing the volume. This is also possible with ffmpeg

    ffmpeg -i ${f}_S.wav -af "volumedetect" -f null /dev/null
    

    but it's a bit awkward to parse the output; there's probably an easier tool for this.

    • If it is mono, overwrite f.wav with the equivalent mono file f_M.wav.
    • Else delete f_M.wav.
  • Either way, delete f_S.wav.

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.