I've used MakeMKV to rip my library of DVDs to .MKV (mpeg2).
A lot of the MKVs have surround 5.1 / 6.1 (DD / DTS) audio, which I want to convert to 2channel stereo, then convert to libx264 /mp4 with ffmpeg, using a front-end tool
eg. ffmpeg Batch.
What parameters (or tool) should I feed ffmpeg to convert the surround audio > stereo audio ?
Thanks.
+ Reply to Thread
Results 1 to 3 of 3
-
Last edited by Frasier; 30th Jul 2021 at 01:19.
-
Depends on your goal - is your goal is plain downmixing or downmixing with some spatial information coded - for first case conversion is quite trivial and you can rely on ffmpeg embedded automate by specifying "-ac 2" (literally 2 audio channels) within command line, if you wish to have better control over downmixing and perhaps use some non standard mix weights then you can manually specify something like this:
in case where your goal is to keep spatial information you have two options, or try to downmix to Dolby Surround (Pro Logic II) you can try to do (not tested by me on Dolby Surround capable decoder):Code:-af "pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL"
https://gist.github.com/kgriffs/ced13cf4d28938d34e1e3c80778f75a8
Last method mostly suitable for headphone (but i use this as more general way to downmix multichannel to stereo) is to use HRTF funtion (SOFAlizer filter)Code:-af "aresample=matrix_encoding=dplii"
SOFA file (dodeca_and_7channel_3DSL_HRTF.sofa) is available in VLC so before trying you can download VLC (portable one) and use embedded SOFA (HRTF) to verify how it will sounds at the end.Code:-af "aformat=channel_layouts=7.1,aresample=resampler=soxr:osr=48000:cutoff=0.99:dither_method=0,sofalizer=sofa=dodeca_and_7channel_3DSL_HRTF.sofa:gain=11:lfegain=9"
I use SOFA method personally and it work subjectively well with all multichannel sources (resampler is add due modern high sample rate multichannel formats such as DTS HD MA, Dolby TrueHD etc) .
Similar Threads
-
batch convert DTS to Ac3 using ffmpeg
By Mishari in forum Newbie / General discussionsReplies: 7Last Post: 7th Apr 2022, 17:23 -
FFMPEG: 3 stereo sets into one 5.1 mix
By sparktank in forum AudioReplies: 1Last Post: 16th Mar 2019, 10:31 -
How to convert DTS-HD / HDMA With bitrate 1509kbps to DTS 755kbps ?
By PrinceSwaraj in forum AudioReplies: 16Last Post: 17th Apr 2018, 16:21 -
Dolby Surround processor better than computer program stereo-to-5.1
By clashradio in forum AudioReplies: 6Last Post: 24th Jan 2018, 07:35 -
MPV downmix multichannel DTS to stereo
By bazil in forum LinuxReplies: 1Last Post: 11th Jul 2017, 13:25


Quote
