giongto35 / cloud-game

Web-based Cloud Gaming service for Retro Game
https://www.youtube.com/watch?v=GUBrJGAxZZg
Apache License 2.0
2.32k stars 348 forks source link

picture get stuck in some games #334

Closed xxxsen closed 3 years ago

xxxsen commented 3 years ago

In some games, the picture will be stuck for a period of time. At this time, there is only sound. In addition, when the picture is stuck, the CPU utilization is not high.

sergystepanov commented 3 years ago

Without knowing specific steps in order to reproduce this behavior, I'm afraid it's impossible to fix this floating bug.

xxxsen commented 3 years ago

howerver, which data shall i provide, it is easy to reproduce in my pc. I tested three roms (1942.nes/1945kiii.zip/SnowBros.nes), all of them reproduced this problem, and when this problem occurred, all indicators were normal (network/cpu)

xxxsen commented 3 years ago

image

It seems like a stream problem, FrameReceived drop to zero when got stuck

sergystepanov commented 3 years ago

Personally, I've never had such issues on local or cloud servers. One relatively similar issue that I had was when the video stops playing when you switch tabs in chrome and it just disables video rendering until a next keyframe would be received from the server. I could look at your dump if you want, maybe there will be some useful info. Make a dump after some time when this happens and the video is unstuck then upload it here. The dump button should be in Chrome in chrome://webrtc-internals/ at the very top, then it can be imported into https://fippo.github.io/webrtc-dump-importer/. @giongto35, maybe you have something on this subject?

xxxsen commented 3 years ago

webrtc_internals_dump (2).txt

dump file here @sergystepanov

sergystepanov commented 3 years ago

Yeah, this's something on the Go's side. Those 5-second lags are quite strange. Right now, there is no option to gather useful logs on the server side, but I had plans for some metrics, especially related to blocking and waiting.

You could try to run these games with some old cloud-game version (e.g. https://github.com/giongto35/cloud-game/tree/9d17435d7eca09a01bc5d4d7cd54019dfd4a59a7) just to compare lags on old Libretro cores.

изображение

xxxsen commented 3 years ago

even worse when use old version, but i found what the problem is, it would be my network problem, i re-deploy it in the vm of my pc, it works smoothly, but problem occurs when i deploy it in my nuc in the same network of my pc.

xxxsen commented 3 years ago

I test it with wired network, it work too. it got stuck when in wireless network. however, latency in wireless network is about 1-3ms and 0-1ms in wired network.

sergystepanov commented 3 years ago

I wonder how it could affect your video stream... without meaningful server logs, it's just a guessing game (; Maybe, WebRTC congestion control mechanism on the server cuts your video in order to sustain continuous streaming anyhow. OK, thanks, I'll keep this issue in mind in case if I will test the server via wi-fi.