You are not logged in.

#1 2018-02-14 12:43:35

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

[SOLVED] Slow / laggy video streaming

Dear Arch community,

I have searched the internet, this forum and ancient libraries for a solution, however I cannot find one. Whenever I open a video stream, the stream is very laggy as soon as I go to higher video settings. Most noticeably this happens on twitch (which uses h.264), here I can only stream without interruptions in 480p.

Internet and hardware are out of the equation since on the same machine in Windows everything works fine and the hardware is powerful enough (GTX1070 and Ryzen R1600).

Solution attempts so far included:
Installing various codecs (ffmpeg, fmpeg2, x264, x265), no improvement.
Trying to open the stream via terminal with streamlink in vlc (same stutering/buffering issue), no improvement, which means it is a systemwide and not a firefox issue.
Using a different browser (Chrome), no improvement.
Updating nvidia drivers, newer version lead to no improvement either.

I suspect it might either have to do something with codecs or maybe with CPU frequency scaling during streaming (does not increase enough). Right now I am out of ideas.

If you guys need any specific output let me know because I am out of ideas I do not know what output might be needed, therefore for now I won't add any.

All the best,

An arch fan.

Last edited by deafeningsylence (2018-02-15 09:13:25)

Offline

#2 2018-02-14 13:52:10

hendry
Member
From: Singapore
Registered: 2009-09-08
Posts: 157
Website

Re: [SOLVED] Slow / laggy video streaming

Have you got your hardware video decoder acceleration working? https://wiki.archlinux.org/index.php/Ha … celeration

Offline

#3 2018-02-14 14:51:47

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow / laggy video streaming

Thanks for the quick reply, I followed the hardware acceleration wiki page and vainfo and vpauinfo show that my card is capable, also in vlc and in mpv acceleration is enabled but still streaming twitch via these players (and browser anyway) leads to buffering every few seconds.

From the acceleration wiki entry, more specifically the configuration part, I do not get any results for the line to check the currently used acceleration driver

grep -iE 'vdpau | dri driver' ~/.local/share/xorg/Xorg.0.log

though. I still exported

VDPAU_DRIVER=nvidia

and

LIBVA_DRIVER_NAME

, no difference though.
One interesting thing though, in MPV it shows a cache value and that is constantly changing between 0 and 1sec, is that maybe showing that for some reason it does not succeed in caching more of the stream?

In YouTube these problems are way less severe btw, I can stream in 1080p and more without lag, although here the performance in windows is better as well.

I think this means hardware acceleration is working properly.

Offline

#4 2018-02-14 15:01:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,660

Re: [SOLVED] Slow / laggy video streaming

There are currently some general perf problems with the current driver so maybe you are affected by these, see this recent topic as well

Offline

#5 2018-02-14 15:17:24

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow / laggy video streaming

Thanks V1del, I checked the other post and except for some screen freezes and stuttery scrolling the issues seem quite similar, just a generally terrible performance with the new nvidia drivers. Maybe I should switch to nouveau for now, although this will fuck up my whole screen settings again sad

Offline

#6 2018-02-14 15:22:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,660

Re: [SOLVED] Slow / laggy video streaming

I really wouldn't go that route on a card this new (though it might have become usable by now, I don't know). It would be interesting to know if your issue is really related by downgrading the kernel to 4.14.x and the nvidia packages to a pre 390 version. If you still have perf issues your issue lies somewhere else, if not it's likely the same many are already experiencing.

Last edited by V1del (2018-02-14 15:23:03)

Offline

#7 2018-02-14 15:38:23

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow / laggy video streaming

Quick update, changing to nouveau drivers did not solve the issue, it is the same lag/buffering every 2 seconds present as before. I checked via lspci -v if the driver is in use and it is.

Offline

#8 2018-02-15 09:12:45

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow / laggy video streaming

I will mark this as closed since I won't have time to revert back to the old kernel at the moment. For now I'll wait for patches and watch twitch in low res. If I finally find the cause (if it is not the video drivers and kernel) I will post it in the forums.

Thanks to @V1del and @hendry for your suggestions.

Offline

#9 2018-03-09 16:56:58

deafeningsylence
Member
Registered: 2016-09-23
Posts: 52

Re: [SOLVED] Slow / laggy video streaming

Final solution had nothing to do with hardware acceleration or video in general. My network card was running on half duplex mode, while my router ran on full duplex leading to a duplex mismatch and slow network speed in general. Activating full duplex mode via ethtool solved it.

Last edited by deafeningsylence (2018-03-09 16:57:38)

Offline

Board footer

Powered by FluxBB