-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio playback stutter #23
Comments
What hardware are you running this on? What is the servers max bitrate? If it's every 20-30 seconds I'm wondering if the ping/pong is somehow to blame.. |
I'm running both the bot and the server on my own machine. Not sure which hardware is relevant but assuming my cpu: AMD Ryzen 5 3600. My mumble-server.ini says Built myself from source, I'm on arch. |
Thank you. Cool. I have a similar setup as you. I'll have a few ideas on what may be the cause. |
Beginnings of 1.4 and 1.5 client support. Fixed mumble.client:transmit always sending data through TCP tunnel. Added mumble.channel:set/getVolumeAdjustment. Client will now authorize to the server as a bot. Set priority on timers to try and help with issue #23. Update OCB library to latest. Break out of mumble.loop on SIGINT. Added new mumble.buffer metatable.
Mind trying my async-connect branch? I added some changes which I think helped with the audio stuttering. Plus it uses the new audio packet format that was introduced in mumble 1.5. To use this branch, mumble.connect is no longer blocking, which means you have to use auth in a OnConnect hook. client:hook("OnConnect", function(client)
print("OnConnect", client)
client:auth("TestBot")
end) |
Tested a bit and it got worse, It depends on the bitrate of the song I think, some high bitrate sections completely destroys the quality and stutters a lot, and the audio quality is much degraded, although I noticed the quality was not that great in the previous version either. |
I really don't get it.. Here's a recording I made of the bot playing a 48000hz, 2 channel, ogg file. To me, it sounds perfect. Mumble-2024-05-09-13-01-14-192.168.1.205-TestBot.zip Try messing around with this... client:setAudioQuality(mumble.quality.LOW) -- LOW, MEDIUM, HIGH, BEST are all valid options
client:getEncoder():setBitRate(10000) -- Manually set the bitrate to whatever you want. 10k bitrate sounds AFWUL. I need to rename setAudioQuality, since it's what the "audio per packet" setting in the mumble client does. It basically sets how many audio frames we send per packet. More = higher latency and less chances for stutter. However, it can quickly cause it to overflow the packet buffer, making it stutter. I think in your case, you would actually want it LOW. Still, setAudioQuality will try to automatically adjust the bitrate of the encoder to work for the servers settings. You should be seeing a message like this in the console when running the bot.
|
I've been fiddling with the values and setting audio to BEST seems to make it much better (both quality and stutter-wise). Sometimes when I change a song (via client:play()), the beggining of the new song stutters a lot but after 1 or 2 seconds it stabilizes, I'll do a more extensive test eventually, it's much better now |
Very very strange.. But good to know. |
I'm starting to think the audio issues is a bug with mumble itself. I've had my bot playing a song on loop for a few hours now. It's been totally fine. I reconnected myself (not the bot) to the server and suddenly the audio was stuttering like crazy. Reconnecting again fixed it. Not sure what's going on there. |
Related: mumble-voip/mumble#6415 |
Thanks for making lua-mumble!
Same as #5, audio playback via
stutters from time to time (every 10~20 seconds), tested with a 48000Hz 2ch ogg file.
The text was updated successfully, but these errors were encountered: