[FFmpeg-user] Piped processes result in glitches/dropouts

Moritz Barsnick barsnick at gmx.net
Sat Sep 14 14:49:55 EEST 2024


Hej Anders,

On Sat, Sep 14, 2024 at 13:32:01 +0200, Anders Bjerkén wrote:
> ffmpeg -f alsa -i hw:2 -filter:a "volume=1.5" -ab 192k -acodec mp3 -f mp3 -
> | ffmpeg -f mp3 -i - -c copy -f mpegts udp://<external_ip>:1685 -c copy -f
> mp3 udp://0.0.0.0:1685

It's usually expected to also post the complete, uncut console
output(s) here.

> Conceptually, it works. However, every now and then I get synchronized 1-2
> second long glitches in the outcoming data stream for both outputs.

This sounds like a buffering issue.

What happens if you stream directly from the first ffmpeg process to
one of the outputs? Does it also glitch?

You could consider using one ffmpeg process and the "tee" muxer. I'm
not sure it will solve your problem, but could be an alternative and a
more lightweight command line.

> have used all suggested versions of this command mentioned
> on https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs, but with the
> same result in the end.

Ah, I forgot that the "tee" muxer is mentioned there as well.

Moritz


More information about the ffmpeg-user mailing list