I used ffmpeg to concatenate to videos and it got stuck and produced a huge file. Where is the mistake?
The concat filter uses the frame rate of the first input as the framerate for the output stream. Some MKV/WebM files don't write valid framerates. That can lead ffmpeg to assign a framerate of 1000 (the inverse of default timebase in Matroska), which can lead to huge frame duplication.
Set a sane output framerate for such scenarios.
ffmpeg -i intro.mkv -i part2.mp4 \ -filter_complex &quot;[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa]&quot; \ -map &quot;[outv]&quot; -map &quot;[outa]&quot; -r 30 output.mp4