Answers.Body: <p>concat requires videos to have the same sample aspect ratio as well as the same resolution.</p>
  
  <p>So, in this case,</p>
  
  <pre><code>ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref[wm][base];[wm]setsar=1[wm];[base][wm]concat=2" output.mp4
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref[wm][base];[base][wm]concat=2:unsafe=1" output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T14:59:10.787Z
Answers.Text: I carried out above command, and the terminal was stuck。 @Gyan
Answers.UserDisplayName: gs z
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T15:20:57.857Z
Answers.Text: Run command with -report added and share report. Kill ffmpeg after a minute if it doesn't exit.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T15:26:29.060Z
Answers.Text: I found a error:
  [Parsed_concat_1 @ 0x7f9d74e086c0] Input link in1:v0 parameters (size 212x160, SAR 160:159) do not match the corresponding output link in0:v0 parameters (212x160, SAR 1:1)
Answers.UserDisplayName: gs z
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T15:48:15.113Z
Answers.Text: Use the 2nd command.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T10:52:09.177Z
Answers.LastActivityDate: 2018-10-31T10:52:09.177Z
Answers.UserDisplayName: Gyan
Body: <p>I just want to add black video at the beginning of the video </p>
  
  <p>I have found following commands.</p>
  
  <pre><code>ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref=1*iw/1/sar:ih/1[wm][base];[base][wm]concat=2" output.mp4
  </code></pre>
  
  <p><strong>MainQuestion:</strong>
  <a href="https://i.sstatic.net/WR6RI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WR6RI.png" alt="enter image description here"></a></p>
  
  <p>How can I solve this issue?</p>
  
Tags: <video><ffmpeg>
Title: FFmpeg concat problem
UserDisplayName: gs z
ThreadText: # FFmpeg concat problem
  
  (Asked by: username_0 on 2018-10-31)
  
  I just want to add black video at the beginning of the video
  
  I have found following commands.
  
  ```
  ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref=1*iw/1/sar:ih/1[wm][base];[base][wm]concat=2" output.mp4
  
  ```
  
  **MainQuestion:**
  [![enter image description here](https://i.sstatic.net/WR6RI.png)](https://i.sstatic.net/WR6RI.png)
  
  How can I solve this issue?
  
  **Tags:** video, ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-31. Score: 1 | Accepted answer
  
  concat requires videos to have the same sample aspect ratio as well as the same resolution.
  
  So, in this case,
  
  ```
  ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref[wm][base];[wm]setsar=1[wm];[base][wm]concat=2" output.mp4
  
  ```
  
  or
  
  ```
  ffmpeg -i s1.mp4 -f lavfi -i color=c=black -t 10 -filter_complex "[1:v][0:v]scale2ref[wm][base];[base][wm]concat=2:unsafe=1" output.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: I carried out above command, and the terminal was stuck。 @username_1  
  > **username_1**: Run command with -report added and share report. Kill ffmpeg after a minute if it doesn't exit.  
  > **username_0**: I found a error: [Parsed_concat_1 @ 0x7f9d74e086c0] Input link in1:v0 parameters (size 212x160, SAR 160:159) do not match the corresponding output link in0:v0 parameters (212x160, SAR 1:1)  
  > **username_1**: Use the 2nd command.  
  
  ---
  
  