user14592: Let's say that I have a file1.avi and a file2.avi. Each one of these files is the same size, for instance 300x100.
How could I join them, so that both of them would play the first 10 seconds of each video at the same time, one on top of the other, in a 300x200 video?

user1871: Use
ffmpeg -i file1.avi -i file2.avi -filter_complex "[0][1]vstack" -t 10 joined.avi

This will stack the videos vertically and play the first 10 seconds of each. Remove the -t option if the videos are longer and you wish to extend the output. This command also uses the default parameters to encode the video i.e. codec will be MPEG4 Part 2 (Xvid..). If there's any audio, the track from the first video will be used and encoded as MP3.

14592: <p>Let's say that I have a <code>file1.avi</code> and a <code>file2.avi</code>. Each one of these files is the same size, for instance 300x100.</p>

<p>How could I join them, so that both of them would play the first 10 seconds of each video at the same time, one on top of the other, in a 300x200 video?</p>
 1871: <p>Use</p>

<pre><code>ffmpeg -i file1.avi -i file2.avi -filter_complex "[0][1]vstack" -t 10 joined.avi
</code></pre>

<p>This will stack the videos vertically and play the first 10 seconds of each. Remove the <code>-t</code> option if the videos are longer and you wish to extend the output. This command also uses the default parameters to encode the video i.e. codec will be MPEG4 Part 2 (Xvid..). If there's any audio, the track from the first video will be used and encoded as MP3.</p>
