user21062: I have two videos of different length. I need to create a new video with one video at the left and other at the right. I tried using this. Problem is my videos are of different length. I want to start one video a few seconds after the other started. Also, I want to keep the audio of the longer video only.

user1871: Use
ffmpeg -i shorter.mp4 -i longer.mp4 -filter_complex
 "[0]trim=0:3.5,drawbox=c=black[delay];[delay][0]concat[left];
  [left][1]hstack[v]"
 -map "[v]" -map 1:a -c:a copy out.mp4

where 3.5 should be replaced with the delayed start time (in seconds) of the shorter video.

21062: <p>I have two videos of different length. I need to create a new video with one video at the left and other at the right. I tried using <a href="https://unix.stackexchange.com/a/233833/267627">this</a>. Problem is my videos are of different length. I want to start one video a few seconds after the other started. Also, I want to keep the audio of the longer video only.</p>
 1871: <p>Use</p>

<pre><code>ffmpeg -i shorter.mp4 -i longer.mp4 -filter_complex
 "[0]trim=0:3.5,drawbox=c=black[delay];[delay][0]concat[left];
  [left][1]hstack[v]"
 -map "[v]" -map 1:a -c:a copy out.mp4
</code></pre>

<p>where <code>3.5</code> should be replaced with the delayed start time (in seconds) of the shorter video.</p>
