Hi, I have made some changes to the center channel (now it's a mono center.wav) , now I would like to swap it back into the 5.1 audio track from a movie.mkv (1 video, 2 audio tracks). It's important to target the audio track with the language:ger tag. Additionally I want to change the volume levels. I don't know the workflow of channelsplit and join=inputs.
I hope this makes sense.
input 1: movie.mkv (1. video/2. audio 5.1 german/ 3. audio 5.1 english)
input 2: center.wav (mono)
This is what the final output should look like.
.MKV
1.video (copy)2. ger 5.1 audio downmixed withCode:-map 0:v:0 -c:v copy3. the same as 2. but with replaced center channel fromCode:-af "pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -map 0:a:m:language:ger -codec:a ac3 -b:a 160k -ar 44100 -sn -dnCode:-i center.wav
+ Reply to Thread
Results 1 to 6 of 6
-
Last edited by geextah_2; 19th Mar 2024 at 20:21.
-
You can use https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a6mono5.1 as general guideline on this - in your case there will be 2 inputs and single output - personally i would split your source as in deesser example - and substitute FC with your second source then merge all channels back (i assume you wish to substitute dialogues from one language to another). Btw instead two inputs you can try to use amovie (it works same as https://ffmpeg.org/ffmpeg-filters.html#movie ) source - perhaps this can eliminate '-filter complex'
-
I tried something like this, but that didn't work
Code:ffmpeg -i deess.mkv -i center.wav -map 0:a:m:language:ger -filter_complex 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][BL][BR],[FL][FR][1:a][LFE][BL][BR]join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR' -vn -sn -dn export.mka
-
okay now I have the code for the center channel stuff. Can someone help me map everything? ^^'
Code:-lavfi "[0]channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR];[FL][FR][FC][LFE][SL][SR][1][1]amerge=8,channelmap=0|1|7|3|4|5:5.1,pan=6c|c0=0.6*c0|c1=0.6*c1|c2=c2|c3=c3|c4=0.6*c4|c5=0.6*c5" -c:a ac3 -b:a 160k -ar 44100 -q:a 4
-
pandy it worked, look at this monstrosity ^^
Code:@echo off :again ffmpeg ^ -i "%~1" ^ -filter_complex "[0:a:m:language:ger]channelsplit=channel_layout=5.1:channels=FC[FC]" -map "[FC]" -ar 44100 ^ "center.wav" mrswatson64 --input center.wav --output out.wav --plugin FabFilterMono --parameter 0,0 --parameter 1,0.35 --parameter 2,0.90 --parameter 3,1 --parameter 4,0.5 --parameter 5,0 --parameter 7,0 --parameter 10,0.45 --parameter 11,1 ffmpeg ^ -i "%~n1.mkv" -i "out.wav" ^ -map 0:v:0 -c:v copy -lavfi "[0:a:m:language:ger]pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -codec:a ac3 -b:a 160k -ar 44100 -lavfi "[0:a:m:language:ger]channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR];[FL][FR][FC][LFE][SL][SR][1][1]amerge=8,channelmap=0|1|7|3|4|5:5.1,pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3[d]" -map "[d]" -c:a ac3 -b:a 160k -ar 44100 -q:a 4 -sn -dn ^ "%~p1%~n1xx.mkv" if NOT ["%errorlevel%"]==["0"] goto:error echo [92m%~n1 Done


Quote