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.

  • Do you know which of the videos is longer? – Gyan Jan 4 '18 at 6:21
  • Yes. I know. The right one. – Nagabhushan S N Jan 4 '18 at 7:36


ffmpeg -i shorter.mp4 -i longer.mp4 -filter_complex
 -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.

  • Awesome! But there was one missing point. Sync was proper. But the right video didn't start until the delay (13s) elapsed. Then both videos started simultaneously. In essence, I lost the first 13s of the right video – Nagabhushan S N Jan 4 '18 at 9:04
  • See edited cmd. – Gyan Jan 4 '18 at 9:15
  • No. The update distorted. Both videos began simultaneously. After few seconds, left video paused for few seconds. Then it resumed in sync with the right video – Nagabhushan S N Jan 4 '18 at 9:30
  • Show full log.. – Gyan Jan 4 '18 at 9:31
  • drive.google.com/open?id=1gaX3d2ccbUcNjS8TqIPBL1kRX-sB4z0y I have put the logs here – Nagabhushan S N Jan 4 '18 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.