Building off the solution provided in this thread, I'd like to know how to make simple modifications to a complex command argument which uses ffmpeg to interweave two videos by dissolving them into each other every 2 seconds, with a 0.5 second transition. It looks like this:
ffmpeg -i input1.mkv -i input2.mkv -filter_complex \
"[0][1]blend=all_expr='if(mod(trunc(T/2),2),min(1,2*(T-2*trunc(T/2))),max(0,1-2*(T-2*trunc(T/2))))*A+if(mod(trunc(T/2),2),max(0,1-2*(T-2*trunc(T/2))),min(1,2*(T-2*trunc(T/2))))*B';\
[0]volume='if(mod(trunc(t/2),2),min(1,2*(t-2*trunc(t/2))),max(0,1-2*(t-2*trunc(t/2))))':eval=frame[a]; [1]volume='if(mod(trunc(t/2),2),max(0,1-2*(t-2*trunc(t/2))),min(1,2*(t-2*trunc(t/2))))':eval=frame[b];\
[a][b]amix" output.mkv
It works beautifully for its intended purpose, however this is some serious command line magic and I can't understand how to change the cut up duration or transition duration.
Suppose I want a 3 sec cut up w/ a 1 sec transition, or a 1 sec cut-up w/ a 0.25 sec transition, what parts of this command would I alter to achieve that? What specific variables do I change?
filter_complex
argument into multiple lines so it's more readable. – Panki Feb 28 '19 at 13:27