1

I'm using this command to copy the video & audio streams while also encoding the first audio stream to a stereo AAC track as well:

ffmpeg -y -i in.mkv -map 0:v -c:v copy -map 0:a:0? -c:a:0 copy -map 0:a:0? -c:a:1 aac -b:a:0 192k -ac 2 -map 0:a:1? -c:a:2 copy -map 0:a:2? -c:a:3 copy -map 0:a:3? -c:a:4 copy out.mkv

However, I'm also wanting to filter that stereo track with better channel mapping like so:

-af "pan=stereo|FL=FC+0.25*FL+0.60*LFE|FR=FC+0.20*FR+0.60*LFE"

But when I try that I get the following error:

Filtering and streamcopy cannot be used together.

Is there any way around that error? As I'd like to have the original audio stream in tact, while also encoding another version to a 'nightmode' stereo track.

1 Answer 1

1

Use

ffmpeg -y -i in.mkv -map 0:v -map 0:a:0? -map 0:a:0? -map 0:a:1? -map 0:a:2? -map 0:a:3? -c copy -filter:a:1 "pan=stereo|FL=FC+0.25*FL+0.60*LFE|FR=FC+0.20*FR+0.60*LFE" -c:a:1 aac -b:a:1 192k -ac 2 out.mkv

-af is short for -filter:a which applies to all output audio streams. Add a stream number to qualify the application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .