<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Fri, Feb 12, 2021, at 7:58 PM, Gustav González wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi,<br></div><div>I have been looking for an example or piece of code showing how to fill an audio stream with silence frames/packets using the ffmpeg API. My goal is to merge it with a video stream.<br></div><div>The best hint I found until now was this:<br></div><div><a href="https://stackoverflow.com/questions/32006821/write-silence-audio-data-into-file-ffmpeg-c">https://stackoverflow.com/questions/32006821/write-silence-audio-data-into-file-ffmpeg-c</a><br></div><div><br></div></div></blockquote><div><br></div><div>If you want to fill in missing timestamp with silence, you might want to use the `aresample=async=1` filter. This does exactly that.<br></div><div><br></div><div>I use it to synchronize audio from RTP streams, which frequently have dropped frames.</div></body></html>