I am new to using ffmpeg and what I am trying to do is combine multiple video and audio files and have them being displayed in a mosaic.
What i currently have:
2 video files and 2 audio files, where 1 audio file belongs to 1 video file while the other audio file belongs to the other video file
input1.mkv
input1.mka
input2.mkv
input2.mka
What i'm trying to accomplish
1. Combine input1.mkv with input1.mka and input2.mkv with input2.mka
2. I want to display input1.mkv and input2.mkv in a horizontal mosaic (https://stackoverflow.com/questions/11552565/vertically-or-horizontally-stack-mosaic-several-videos-using-ffmpeg)
3. Input2.mkv should start 120 seconds after input1.mkv in output.mkv
Way of combining that works via multiple calls
ffmpeg -i input1.mkv -i input1.mka -map 0:0 -map 1:0 input1.mkv
ffmpeg -i input2.mkv -i input2.mka -map 0:0 -map 1:0 input2.mkv
Can the above be done in a single call?
What i currently have in terms of command line argument:
ffmpeg -i input1.mkv -i input1.mka -itsoffset 120 -i input2.mkv -i input2.mka -filter_complex hstack=inputs=2 -map 0:0 -map 1:0 -map 2:0 -map 3:0 -acodec copy -vcodec copy output.mkv
Error i'm getting:
Streamcopy requested for output stream 0:0, which is fed from a complex filtergraph. Filtering and streamcopy cannot be used together.
Am i going about it correctly in the task i'm trying to accomplish? Should i execute multiple ffmpegs call from C# to combine each input's audio and video file separately? Thank you for your help!