I want to add a watermark logo to a video (uploaded by users) and concat it with an Intro and resulting video must have same format as input video.
The problem starts when uploaded video have more than one audio stream and include subtitle.
I solved audio problem by something like this command.
ffmpeg -i intro.mp4 -i input.mkv -i logo.png -filter_complex "[0:v] scale=480:270,setdar=16/9 [a]; [1:v] scale=480:270,setdar=16/9 [b]; [2:0] scale=480:270 [wm]; [b][wm] overlay[ov]; [a][0:a:0][0:a:0] [ov][1:a:0][1:a:1] concat=n=2:v=1:a=2 [vd] [a0] [a1]" -map "[vd]" -map "[a0]" -map "[a1]" -y output.mkv
but output dose not contain subtitle.
any one can help?