ScreenStream icon indicating copy to clipboard operation
ScreenStream copied to clipboard

Stream Lagging

Open SMDIndomitable opened this issue 1 year ago • 25 comments

Hi, this issue has nothing to do with the application, but if possible, can you give me some insights to solve this problem? Basically, I am streaming through Hotspot. I proceed to connect the stream using 3 different ubuntu devices. Previously, the stream had no issue on the ubuntu devices. I also tested both the latest update and the update before. 2 of the ubuntu devices are fine, 1 is running extremely smooth, and 1 is slightly choppy. However, the device that I am most concerned with, has freezes in the stream every now and then. Do you know why this is happening?

Thank you very much for the application, very much appreciated

SMDIndomitable avatar Jan 24 '24 13:01 SMDIndomitable

Hi. What stream mode you use? MJPEG or WebRTC?

dkrivoruchko avatar Jan 24 '24 15:01 dkrivoruchko

Hi. What stream mode you use? MJPEG or WebRTC?

Hi, I am using MJPEG

SMDIndomitable avatar Jan 24 '24 15:01 SMDIndomitable

Ok. Go to "Stream settings" and enable "Notify for slow connections" checkbox. Try to stream and check if there are any slow connections reported. Also check "Connected clients" list for slow connections.

dkrivoruchko avatar Jan 24 '24 15:01 dkrivoruchko

Yep, I have done that. Under the 'Connected client' list, all of them showed slow connection, however 2 of the devices, the stream are still considered smooth. Only 1 of the device have freeze occuring every few seconds.

SMDIndomitable avatar Jan 24 '24 15:01 SMDIndomitable

Ok. For this one freezing device - will it freeze if only it is connected? I'm trying to understand if this is a network bandwidth issue when all three clients connected or it's just one slow-connected client.

dkrivoruchko avatar Jan 24 '24 16:01 dkrivoruchko

Yes, it does freeze as well even if is only one connection.

SMDIndomitable avatar Jan 24 '24 16:01 SMDIndomitable

Well, then this is a network issue - it's too slow for this particular client.

dkrivoruchko avatar Jan 24 '24 16:01 dkrivoruchko

But it used to be working fine, is there anything I can do about it?

SMDIndomitable avatar Jan 24 '24 17:01 SMDIndomitable

Try to open browser dev mode for slow stream. Maybe there are some useful logs.

dkrivoruchko avatar Jan 24 '24 17:01 dkrivoruchko

Understood, thank you for the help. Also, when you meant network, it includes local (LAN) right? because I am using without 4G or Wifi.

SMDIndomitable avatar Jan 24 '24 17:01 SMDIndomitable

Yes. Any type of network. You can even run stream via Network-over-USB.

dkrivoruchko avatar Jan 24 '24 17:01 dkrivoruchko

Hey, I managed it get it working smooth again, but it is rather inconsistent. So I was wondering if you could lend me your expertise on networking because I am rather clueless on it.

Is the local streaming using TCP or UDP? will this actually work if is TCP? https://www.fosslinux.com/135535/how-to-enhance-network-speed-and-reliability-in-ubuntu.htm

SMDIndomitable avatar Jan 25 '24 07:01 SMDIndomitable

MJPEG mode works over HTTP that works over TCP that works over IPv4 or IPv6. In general, there is no need for any additional configuration on client network. In your particular case, to give any reasonable advice, I require some additional information: How client reaches device with streaming application it terms of network connectivity. How it's connected, topology, technology ...

dkrivoruchko avatar Jan 25 '24 07:01 dkrivoruchko

I have a smartphone that's acts as the mobile hotspot with 4G enabled. All the client devices are connected using that mobile hotspot. However, all the client seems to be working fine except that ubuntu device. Hence I am trying the additional configuration.

SMDIndomitable avatar Jan 25 '24 08:01 SMDIndomitable

Well, it's really hard to say in general. Maybe firs check that Ubuntu client connects via fast WiFi. 802.11a and b decently too slow even for one client. It's better to have at least 802.11n with 40MHz channels to got 144MBit wifi link. It should be ok for one client if WiFi environment is not too noisy and not full of other devices talking. To have WiFi5 (ac) or WiFi6 (ax) is preferable, but it has to be in 5 or 6 GHz

dkrivoruchko avatar Jan 25 '24 08:01 dkrivoruchko

I have check the hotspot connection in that Ubuntu device, it was roughly around 5.7GHz

SMDIndomitable avatar Jan 25 '24 08:01 SMDIndomitable

This is good, what about connection speed?

dkrivoruchko avatar Jan 25 '24 09:01 dkrivoruchko

Download: 58.57 Mbit/s Upload: 18.24 Mbit/s

I got this from running speedtest-cli on the ubuntu device

SMDIndomitable avatar Jan 25 '24 09:01 SMDIndomitable

This is wrong. This shows internet speed, but we need WiFI connection speed on Ubuntu

dkrivoruchko avatar Jan 25 '24 09:01 dkrivoruchko

Uhm, how can I check for that? Sorry for the trouble

SMDIndomitable avatar Jan 25 '24 10:01 SMDIndomitable

      Bit Rate:867 Mb/s   Sensitivity:0/0  

Is it this?

SMDIndomitable avatar Jan 25 '24 10:01 SMDIndomitable

Yes. Bit Rate:867 Mb/s. Speed is fine. There must be something else. Hard to say.

dkrivoruchko avatar Jan 25 '24 10:01 dkrivoruchko

Try to open browser dev mode for slow stream. Maybe there are some useful logs.

Also how can I see the log, sorry I am not experience with browser

SMDIndomitable avatar Jan 25 '24 10:01 SMDIndomitable

Press F12 in browser

dkrivoruchko avatar Jan 25 '24 16:01 dkrivoruchko

Thank you! I have pressed F12 and the network tab, but I have no idea what I should look for. When I click analyse, it does not have any error in the log. Also, you mentioned Network-over-USB, does that mean is possible to use the application with wired connection?

SMDIndomitable avatar Jan 26 '24 09:01 SMDIndomitable