Answers.Body: <p><code>xfade</code> requires two input video streams. You are using only one. It has to fade from a video and into another. Use a black <code>color</code> filter for the other.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-19T17:02:55.793Z
Answers.Text: Yes you are right it requires two inputs but It does not necessarily have to be videos, it can be images too. I came up with an answer here. https://superuser.com/questions/1819911/combine-images-and-draw-text-on-each-image-with-animation-xfade
Answers.UserDisplayName: Imran Khan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-17T03:46:08.383Z
Answers.LastActivityDate: 2023-12-17T03:46:08.383Z
Answers.UserDisplayName: The Somberi
Body: <p>I am using ffmpeg to merge multiple images and an audio to produce a video. I am using drawtext and xfade with dissolve transition. My ffmpeg command is given below.</p>
  <pre><code>ffmpeg -loop 1 -t 5 -i ./img/img0.jpg -loop 1 -t 5 -i ./img/img1.jpg -loop 1 -t 5 -i ./img/img2.jpg -loop 1 -t 5 -i ./img/img3.jpg -t 20 -i audio.mp3 -filter_complex &quot; 
  [0]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v0];
  [1]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v1];
  [2]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v2];
  [3]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v3];
  [v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[vid]&quot; -map &quot;[vid]&quot; -map 4:a -c:v libx264 output.mp4
  </code></pre>
  <p>I am getting below error when executing this command.</p>
  <pre><code>Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_xfade_9
  </code></pre>
  
Tags: <ffmpeg><video><audio><video-production>
Title: Combine images and draw text on each image with animation xfade
UserDisplayName: Imran Khan
ThreadText: # Combine images and draw text on each image with animation xfade
  
  (Asked by: username_0 on 2023-12-08)
  
  I am using ffmpeg to merge multiple images and an audio to produce a video. I am using drawtext and xfade with dissolve transition. My ffmpeg command is given below.
  
  ```
  ffmpeg -loop 1 -t 5 -i ./img/img0.jpg -loop 1 -t 5 -i ./img/img1.jpg -loop 1 -t 5 -i ./img/img2.jpg -loop 1 -t 5 -i ./img/img3.jpg -t 20 -i audio.mp3 -filter_complex " 
  [0]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v0];
  [1]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v1];
  [2]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v2];
  [3]xfade=transition=dissolve:duration=1:offset=4,drawtext=fontfile='./Lato/Lato-Regular.ttf':text='Text1':fontcolor='#666333':fontsize=(h/30):x=50:y=20,setsar=1[v3];
  [v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[vid]" -map "[vid]" -map 4:a -c:v libx264 output.mp4
  
  ```
  
  I am getting below error when executing this command.
  
  ```
  Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_xfade_9
  
  ```
  
  **Tags:** ffmpeg, video, audio, video-production
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-12-17. Score: 1
  
  `xfade` requires two input video streams. You are using only one. It has to fade from a video and into another. Use a black `color` filter for the other.
  
  > **Comments:**
  > **username_0**: Yes you are right it requires two inputs but It does not necessarily have to be videos, it can be images too. I came up with an answer here. https://superuser.com/questions/1819911/combine-images-and-draw-text-on-each-image-with-animation-xfade  
  
  ---
  
  