<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>

CC BY-SA 4.0
2024-08-21T19:29:31.553Z
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"?
v010dya
CC BY-SA 4.0
2024-08-21T22:51:53.817Z
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?"
Toomas
<ffmpeg><video>
FFMPEG replace "no video" part with an image
Toomas
# 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

