Body: <p>Using FFMPEG, I have merged a video and audio file to WEBM. But the problem is: if there is audio and no video the video file has just some stuck and still images, because there is no video recorded at that timestamp. The video file and audio file have mostly the same duration (In live stream the video track can be switched off and on).</p>
  <p>Is there a way to replace these missing video parts with an image, like some jpg etc. or a placeholder with a black screen?</p>
  <pre><code>ffmpeg -i video2.webm -i audio2.opus -c:v libvpx -c:a libopus -strict experimental test.webm
  </code></pre>
  <p>Could not find any solutions, all day of searching.</p>
  <p>EDIT, added clarity:
  The video is successfully merged to one .webm file, and exist, also plays, the question: &quot;Is there a way to replace these missing &quot;parts in video/gaps with no video only audio&quot; with an image, like some jpg etc. or a placeholder with a black screen?&quot;</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-21T19:29:31.553Z
Comments.Text: Are you asking "if video2.webm does not exist" or "if there is no video in video2.webm" or "if the video is shorter in video2.webm than audio is in opus"?
Comments.UserDisplayName: v010dya
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-21T22:51:53.817Z
Comments.Text: The video is successfully merged to one webm file, and exist, also plays, the question: "Is there a way to replace these missing "parts in video/gaps with no video only audio" with an image, like some jpg etc. or a placeholder with a black screen?"
Comments.UserDisplayName: Toomas
Tags: <ffmpeg><video>
Title: FFMPEG replace "no video" part with an image
UserDisplayName: Toomas
ThreadText: # FFMPEG replace "no video" part with an image
  
  (Asked by: username_0 on 2024-08-21)
  
  Using FFMPEG, I have merged a video and audio file to WEBM. But the problem is: if there is audio and no video the video file has just some stuck and still images, because there is no video recorded at that timestamp. The video file and audio file have mostly the same duration (In live stream the video track can be switched off and on).
  
  Is there a way to replace these missing video parts with an image, like some jpg etc. or a placeholder with a black screen?
  
  ```
  ffmpeg -i video2.webm -i audio2.opus -c:v libvpx -c:a libopus -strict experimental test.webm
  
  ```
  
  Could not find any solutions, all day of searching.
  
  EDIT, added clarity:
  The video is successfully merged to one .webm file, and exist, also plays, the question: "Is there a way to replace these missing "parts in video/gaps with no video only audio" with an image, like some jpg etc. or a placeholder with a black screen?"
  
  **Tags:** ffmpeg, video
  
  > **Comments:**
  > **username_1**: Are you asking "if video2.webm does not exist" or "if there is no video in video2.webm" or "if the video is shorter in video2.webm than audio is in opus"?  
  > **username_0**: The video is successfully merged to one webm file, and exist, also plays, the question: "Is there a way to replace these missing "parts in video/gaps with no video only audio" with an image, like some jpg etc. or a placeholder with a black screen?"  
  
  ---
  
  ## 0 answers
  
  