[FFmpeg-user] Fixing Lag in FFplay After Kept in Background
Ferdi Scholten
ferdi at sttc-nlp.nl
Tue Oct 1 22:08:42 EEST 2024
On 01-10-2024 18:25, Ravi Joshi via ffmpeg-user wrote:
> Hello everyone,
> Good day.
> I'm using FFplay on Ubuntu 20.04 (CPU-only) to watch a livestream. When the FFplay window is put in the background, the stream lags, and the delay persists even after bringing the window to the foreground. On the other hand, if the window stays in the foreground from the start, the stream runs smoothly. Is there a way to prevent this lag when switching between background and foreground?
> Thanks in advance for your help!
> _______________________________________________
>
First things coming to mind are what schedulers are in use for cpu and
network?
Those are hardware dependent, so without knowing anything about your
hardware there can be no specific answer.
One other option is to upgrade to a newer Ubuntu version, there have
been some notable scheduler changes in the newer kernels that improve
performance for this kind of tasks when switching between foreground and
background. From my own experience on older hardware, it can really make
a difference in performance, not by being faster, but by having less
latency.
More information about the ffmpeg-user
mailing list