[FFmpeg-user] How to make ffmpeg keep silence in generated audio files when RTP input is paused

Iñaki Baz Castillo ibc at aliax.net
Wed Sep 20 01:18:27 EEST 2017


On Tue, Sep 19, 2017 at 11:49 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> Complete, uncut console output missing (why are you
> forcing the codec?).

Initially I forced the audio codec but, given that SDP is required in
this case, I added the SDP and forgot to remove the -acodec option.
Removed now.


> Try -async 1

Yes, -async 1 allows "silence" (in the sense that it inserts silence
in the output file while no RTP packets are received). However the
ffmpeg command exists by itself after 10 seconds without receiving RTP
packets, so -async 1 is not enough for me.

Basically I need to run ffmpeg and make it capture the RTP stream
"forever" (until I decide to kill the ffmpeg process) rather than
letting ffmpeg to decide when to exit. And it must run regardless
there is no RTP initially or for long time. Is there any option to
prevent this "auto exit"?

Here the full console output in which I receive RTP for a few seconds,
then stop sending RTP to ffmpeg, and after 8-10 seconds ffmpeg exits:

https://pastebin.com/x7ZCuSWC

Thanks a lot.



-- 
Iñaki Baz Castillo
<ibc at aliax.net>


More information about the ffmpeg-user mailing list