[FFmpeg-user] In case of future deprecation, a backup of audio routing script shared for public servicing.

Ted Park kumowoon1025 at gmail.com
Tue Feb 12 05:30:22 EET 2019

> On Feb 11, 2019, at 6:42 PM, Sound Yuan <soundyuanofficial at gmail.com> wrote:
> ffmpeg -f dshow -rtbufsize 4 -i audio="Line 1 (Virtual Audio Cable)" -f dshow -rtbufsize 4 -i audio="Line 2 (Virtual Audio Cable)" -f dshow -rtbufsize 4 -i audio="Line 2 (Virtual Audio Cable)" -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[a]" -map "[a]" -ar 48000 -vn -f wav - | ffmpeg -i - -filter_complex "channelmap=map=FL-BL|FR-BR|FC-FC|LFE-LFE|BL-FL|BR-FR:channel_layout=5.1” -vn -f wav -vol 1024 - | "C:\vlc-3.0.6\vlc.exe" - --prefetch-buffer-size=400

Since you don’t intend to up mix 2 channels to 5.1, I think you could just use amerge to mix the two inputs to one quad stream. This mapping seems like it would result in a very strange channel arrangement, I wonder if you have not noticed any distortion? 

Also, I am not familiar with directshow, what does rtbufsize 4 mean in this context? If it’s 4 bytes, that seems small. Checking that option and not reading the same input twice might improve performance.

ffmpeg -f dshow -i audio=“Line 1 (Virtual Audio Cable)” -f dshow -i audio=“Line 2 (Virtual Audio Cable)” -lavfi “join=inputs=2:channel_layout=quad” ...

More information about the ffmpeg-user mailing list