Add filter to one audio channel using ffmpeg

Having stereo audio files where sound is only in left channel. (Recorded in stereo with input only on left channel.)

I am sourcing left channel to right by using the pan audio filter.

ffplay -i sample.wav -af "pan=stereo|c0=c0|c1=c0"

which works fine. But there is a lot of noise etc. that I am working on fine-tuning using things like afftdn as well as anequalizer, compressor and so on.

My question is how I can apply filters to one channel only.

Something like:

  • Left channel => noise cancelling filter ++
  • Right channel => untouched source

Reason being I want to easier listen to the “effect of the effects” on left channel compared to the original sound. Optionally outputting two audio tracks, where I then can cycle by using a in ffplay. As in:

  • Audio track 1: filter
  • Audio track 2: raw

But not sure if that is possible with ffplay.


I am listening to this by using ffplay and testing using azmq to tune the filters.


Solution 1:

You would clone the source, apply filters to one copy and then merge.

asplit=2[left][right];[left]filters...[left];[left][right]amerge=inputs=2

In case of complaints by amerge about channel layouts, use

asplit=2[left][right];[left]filters...,channelmap=0[left];[right]channelmap=0[right];[left][right]amerge=inputs=2