Hi! (First time post on this list.) I'm not a hugely skilled audiophile, and I'm trying to do some audio manipulation with ffmpeg. At times, the result isn't what I'd like it to be, and I'm not always sure why, so the first step right now is to try to understand what on earth it is that I'm actually asking ffmpeg to do :)
Primary references: https://trac.ffmpeg.org/wiki/AudioChannelManipulation https://ffmpeg.org/ffmpeg-filters.html My input file has eight audio channels and is described by ffprobe as "7.1". If I use the channelsplit filter, I can listen to any channel individually: ffmpeg -loglevel error -stats -y -i Original.mkv -filter_complex 'channelsplit=channel_layout=7.1' -map 0:v -map 0:s channel_split.mkv (Without loglevel error, this produces massive spam of "Queue input is backward in time", but the audio is fine. As a side point, I'm curious as to whether there's a better solution than simply silencing those warnings.) The result is a file with video and subtitle streams unchanged, and eight individual audio streams. With judicious use of "-metadata:s:a:%d" these can even be labelled, making them easy to flip through. Well and good. The real challenge is selecting two channels and trying to make them into the left and right channels of a new stereo audio channel. One option is channelmap: ffmpeg -loglevel error -stats -y -i Original.mkv -af 'channelmap=map=BL|BR' channel_split.mkv Another option is pan: ffmpeg -loglevel error -stats -y -i Original.mkv -af 'pan=stereo|c0=BL|c1=BR' channel_split.mkv According to the docs, pan should detect a pure channel mapping and do an optimized lossless remap, which in theory should mean that these two are the same. But my understanding must be wrong, because they sound completely different :) A third option is join: ffmpeg -loglevel error -stats -y -i Original.mkv -af 'join=inputs=1:map=0.BL-FL|0.BR-FR' channel_split.mkv This sounds very similar to the pan result, but quieter. What am I doing wrong with the channelmap, and what is the preferred way to create a stereo output by selecting channels? Chris Angelico _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".