Delay/Lag When Streaming
using the latest git clone version, i encounter a rendering issue i think. im using the same setup from the 1.1.5 version. on the latest clone, anything i play is laggy and out of sync. but when i revert to 1.1.5, everything is smooth for me.
I don't have such an issue! Can you provide me with more details?
Whenever im using the latest clone all of the account live stream are out of sync, like the voice are fine but the video are delayed, it is set as superfast/ultrafast, but when i switched back to the 1.1.5 version everything is on sync, both yt link and self host video, but ill try again to see if its the same
But, I can't reproduce this issue. Can you try to remove the fps value and try again?
@myfirstevercode Can you try with latest commit? e.g. run git pull and try again.
Closed as no response.
I'm having this same issue on the latest version with Twitch Streams. Tried lowering bitrate to as low at 750 but it made no difference.
@DMCK96 Does this only happen with Twitch streams?
Yes, youtube appeared to be fine and used much less resources than Twitch with a similar length video.
When running the twitch video it was giving this in the log whilst near maxing out the CPU.
This is a cloud-dedicated server that I use for running ARK and Enshrouded servers (whilst using this bot those servers have not been running) so I wouldn't expect the server spec to be an issue.
WARN stream:audio:send "frame_size": 281,
WARN stream:audio:send "duration": 107.14336600000388,
WARN stream:audio:send "frametime": 20
WARN stream:audio:send } +0ms
WARN stream:audio:send Frame takes too long to send (161.56% frametime) {
WARN stream:audio:send "frame_size": 276,
WARN stream:audio:send "duration": 32.31296100000327,
WARN stream:audio:send "frametime": 20
WARN stream:audio:send } +3s
WARN stream:video:send Frame takes too long to send (167.30% frametime) {
WARN stream:video:send "frame_size": 1963,
WARN stream:video:send "duration": 110.41890899999999,
WARN stream:video:send "frametime": 66
WARN stream:video:send } +0ms
WARN stream:video:send Frame takes too long to send (178.97% frametime) {
WARN stream:video:send "frame_size": 5747,
WARN stream:video:send "duration": 118.1189660000091,
WARN stream:video:send "frametime": 66
WARN stream:video:send } +13s```
Same here. Try change codec to VP8, and lower bitrate. This is helping a little but now i have audio lag
Used on a local computer (Gaming Specs) Starting a local video, Pixel quality sometime, lag spike, delay
WARN stream:audio:send "frame_size": 306,
WARN stream:audio:send "duration": 767.8950499999919,
WARN stream:audio:send "frametime": 20
WARN stream:audio:send } +3s
WARN stream:audio:send Frame takes too long to send (2202.73% frametime) {
WARN stream:audio:send "frame_size": 316,
WARN stream:audio:send "duration": 440.5469709999743,
WARN stream:audio:send "frametime": 20
WARN stream:audio:send } +2s for local video
i have a similar project as of this, i recommend you using a nitro account for better streaming options and then you can use better bitrate. also to host a bot as of this you would need a good and powerful vps!!
Used on a local computer (Gaming Specs) Starting a local video, Pixel quality sometime, lag spike, delay
WARN stream:audio:send "frame_size": 306, WARN stream:audio:send "duration": 767.8950499999919, WARN stream:audio:send "frametime": 20 WARN stream:audio:send } +3s WARN stream:audio:send Frame takes too long to send (2202.73% frametime) { WARN stream:audio:send "frame_size": 316, WARN stream:audio:send "duration": 440.5469709999743, WARN stream:audio:send "frametime": 20 WARN stream:audio:send } +2s for local video
lag spike and pixel quality and delay are supposedly issues from discord bandwidth limits. this project needs optimisations for those, to temporarily fix these issues js use a nitro account(still could lag but would optimise it much better as dicord increases bandwidth for nitro accounts) only if audio is laggin behind and video is playing ; such issues are related to the specs and the machine.
I think this issue is caused by the bun runtime, I'm running this bot at commit 47ed1ae9fb2eb865f372c6f91f187d91140e2f85 and using the nodejs runtime (node dist/index.js) and I don't have any frame or audio drop at all. In opposite when I'm using bun I'm having consistent frame drops ranging from 100ms to ~10s.