minimizing ffmpeg streaming latency?

Beyond just audio!

Moderators: khz, MattKingUSA

Post Reply
arifd
Established Member
Posts: 61
Joined: Sun Nov 29, 2020 11:09 am

minimizing ffmpeg streaming latency?

Post by arifd »

I have a command for routing audio input to output, it's about as basic as it gets:

Code: Select all

ffmpeg -f alsa -acodec pcm_s32le -i hw:3,0 -f pulse out
And yet it will introduce about 4 seconds of latency.

Do this in Audacity and it is instant.

Let's try from pulse to pulse:

Code: Select all

ffmpeg -f pulse -acodec pcm_s16le -i default -f pulse out
4 seconds delay.

Interestingly, If I use ffplay it is instant!!

Code: Select all

ffplay -f pulse -acodec pcm_s16le -i default
The only difference I can see in PulseAudio Volume Control, is under the Playback tab, with ffplay the application is called ffplay, but with ffmpeg the app is called Lavf58.45.100. Can I change that Lavf for something else?
Post Reply