Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
197 stars 9 forks source link

Crackling audio #2053

Open asakleiman opened 3 years ago

asakleiman commented 3 years ago

Audio continiously crackles. Unable to find a workaround; happens on all devices, in all worlds.

H3BO3 commented 3 years ago

Do you have a recording? What hardware are you using? Does this happen in other games or just Neos? What workarounds have you tried?

There is not much info to understand or replicate this issue. You did not use one of the issue templates which asks for several key points of info to help debug, so there is not much that can be done until we have more information.

At this point this seems more like a technical support problem that could be debugged by the community and support staff. Are you a part of the official Discord server, by any chance?

asakleiman commented 3 years ago

A number of people are having the issue so I just put it up there to get them all to start, quite frankly. Yes, I am on the Discord, I am kleinlowe. No, I don't know how to record it cleanly. I use a vive, and it also comes through my bluetooth headphones in desktop mode. I tried setting my audio sources to 44.1khz as was suggested in passing mention a few nights back when Zane was having the same issue. I keep telling people I don't have any good information on this which is why I didn't post on the github but I kept getting pushed to, so there it is. Hopefully someone else has better data points.

On Tue, Apr 20, 2021 at 8:02 AM H3BO3 @.***> wrote:

Do you have a recording? What hardware are you using? Does this happen in other games or just Neos? What workarounds have you tried?

There is not much info to understand or replicate this issue. You did not use one of the issue templates which asks for several key points of info to help debug, so there is not much that can be done until we have more information.

At this point this seems more like a technical support problem that could be debugged by the community and support staff. Are you a part of the official Discord server, by any chance?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Neos-Metaverse/NeosPublic/issues/2053#issuecomment-823347430, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADR6FEQCCFVG2XYYPXE2O63TJWJRPANCNFSM43IHVQYQ .

chemicalcrux commented 3 years ago

I am noticing this quite a bit in my homeworld now. It always crackled occasionally, but I'm hearing way more of it now.

It's a single audio clip playing on loop forever. I can check if the audio being played matters at all (this clip is very low-pitched)

H3BO3 commented 3 years ago

Thanks for more info/context. It'd be handy to have a recording of this, you can do that through OBS or perhaps through Audacity with the right settings, @asakleiman

chemicalcrux commented 3 years ago

Here's a recording with some of the crackling going on. It's most noticeable at 0:09.

https://user-images.githubusercontent.com/8015368/115429655-9bdb2800-a1d1-11eb-9e3d-aa5fc673502f.mp4

I'm using an Index headset with the SteamVR runtime. The crackling occurs with both voice and sound clips.

shiftyscales commented 3 years ago

This may be related to #2050 and I believe is a regression from the changes implemented in 2021.4.17.185.

shadowpanther commented 3 years ago

I've recorded a sample:

https://cdn.discordapp.com/attachments/439422161657135106/834204882691948605/2021-04-21_02-03-59.mp4

Setup: Oculus Rift S, Oculus runtime. I start in VR mode with headset off (get black screen), then switch to Screen with F8. My default audio output for Neos is overridden by the runtime (Neos sees Rift S as the default), then for the desktop mode I have my DP monitor selected.

The world has loud drone sound from the object at spawn and a youtube stream playing in the background (this was the world used for the latest Metaverse Meetup).

I load into the world in screen mode, the crackle is there. I switch to VR (audio output goes back to default), I think there is a bit of crackle once or twice. I select the same Rift S output as a non-default output, crackle is back. I select default output, less crackle, but it doesn't go away completely.

Jaidendude commented 3 years ago

This is the same issue I reported a while ago. #1881

shadowpanther commented 3 years ago

@Jaidendude not the same, this is not degrading, this is fresh launch just seconds before the video

Jaidendude commented 3 years ago

@shadowpanther Note that since the reported patch to fix it went live, the issue is now identical to the video listed above, at least for me

CyberZott commented 3 years ago

I've also started to experience this issue again recently. I have an I7 7700, 16GB RAM 2400MHz, GeForce GTX 1660 super, Oculus Rift CV1 (Native Oculus SDK mode)/no SteamVR. Doesn't seem linked to performance as I have had this issue with only 2-3 people in a world and frames above 60.

Frooxius commented 3 years ago

Should be fixed in 2021.4.24.620, thanks!

CyberZott commented 3 years ago

After the new update I'm having the issue again.

Frooxius commented 3 years ago

I'll need more information on this:

Readun commented 3 years ago

Having it aswell, it isnt bound what is going on in a world, as I have a close to fresh created starting world. It does come and go. The sad part about it is, when it happend in a world, it can come and go, but can also never happen sometimes. Hard to find the cause.

Does it affect all audio? Need to pay more attention on that. It definatly affected Voice, youtube Video and Streamed Audio. What exactly does it sound like? Like the example from ChemicalCrux from above. Sometimes even heavier. Made a small Video of my home world, neos freshly started.

What is the Audio Output Device in Settings set to? Undependent. On both, the actual device and system Defaults will appear crackling.

https://www.youtube.com/watch?v=_DD7TsB5vGQ

Frooxius commented 3 years ago

@Readun What if you play a Neos native audio clip? The fact that it happens even with system default seems like this is a different issue, possibly system related, since when you use system default audio system it doesn't get handled by Neos directly at all.

Readun commented 3 years ago

They are there aswell, but way harder to make out. Voice is also Crackling from different users. What is repeatable is when switching from Stereo to broadcast and back, a crack will be heard. It also apears to be more often with something else then default audio. (In Desktop I need to select speakers)

A little longer video to capture it: https://www.youtube.com/watch?v=epxzKvP23BM

It .... feels like light weigth / High performance sessions have more audio crackling then heavier worlds. But could also be imagination.

shadowpanther commented 3 years ago

The audio crackling is still here on the latest release https://cdn.discordapp.com/attachments/439422161657135106/853286505098117120/2021-06-12_17-53-52.mp4 Switched to desktop from VR, non-default (for Neos, all desktop apps use this same monitor by default) audio device selected image

Frooxius commented 3 years ago

@shadowpanther

shadowpanther commented 3 years ago

@Frooxius

I tried replicating it with just spawning several sound players all playing in parallel, and wasn't able to catch the crackle reliably. The same sound in the MTC plays without crackles when I reset the tutorial and play it again after being in the session for a while. I tried playing music in a loop and spawning different avatars. The audio crackled for a bit when the mesh/textures appeared on the avatar. Also, while browsing the inventory and changing folders, audio stuttered/crackled each time item icons loaded.

So, the perceived crackle might be because the playback stutters when different events happen in the main thread.

kazu0617 commented 3 years ago

I'll report that I was able to reproduce the problem outside of MTC.

To sum up, I found this problem when I was setting the audio device to something else as Shadow Panther did. It sounded jerky, like the sampling rate setting was missing, but I haven't been able to confirm it.

(I discovered this just yesterday when I was doing audio conversion.) When I imported the mp3 audio as is, I could not import it as a StaticAudioClip, so I used ffmpeg to convert it to wave, flac, and ogg vorbis.

ffmpeg -i "Sample.mp3" -c:a libvorbis "Sample libvorbis.ogg"
ffmpeg -i "Sample.mp3" -c:a flac -f flac "Sample flac.flac"
ffmpeg -i "Sample.mp3" -c:a pcm_s16le -f flac "Sample pcm_s16le.wav"`

Tries to re-format 48000 whitch recoding sampling late, but same issue. 
-> ffmpeg -i "Sample.mp3" -ar 48000 -ac 2 -c:a libvorbis "Sample libvorbis48000.ogg"
Doesn't support in Neos.
-> ffmpeg -i "Sample.mp3" -c:a pcm_s32le -f wav "Sample pcm_s32le.wav"

https://user-images.githubusercontent.com/6259214/122170426-83c61300-ceb9-11eb-84dd-7dd1d99339a2.mp4

Attribution text:
Song: Cartoon - Don't Be A Stranger (Ft. Jason Diaz) [NCS Release]
Music provided by NoCopyrightSounds
Free Download/Stream: http://NCS.io/DontBeAStranger
Watch: http://youtu.be/82FyrLo5N4Y

When I imported the audio into Neos and played it back, it worked fine if the Audio Output Device was set to Use System Default, but if it was set to some kind of Audio, jagged sounds came in. (This may be related to the audio format set on the Windows side, so I will describe it as well.


2 channel, 24 bits, 44100 Hz

Zyzyl commented 3 years ago

The user amcomma#3044 on Discord provided a recording of this issue as it affects them. See https://discord.com/channels/402159838827905024/439421735474036738/851122136676302869

According to them the problems occurred in Desktop mode and only in Desktop mode. (ref https://discord.com/channels/402159838827905024/439421735474036738/851122136676302869)

They said "What fixed issue for me was passing audio through VoiceMeter, outputing it directly thorough audio interface was causing it. It was only in dekstop mode, not in VR mode." (ref https://discord.com/channels/402159838827905024/439421735474036738/864810565024874516)

Enverex commented 3 years ago

I seem to be experiencing the same issue:

https://youtu.be/oOhDHN05Cwc

Most obvious at 15, 22-24, 38, 44 and 48 seconds. Then later again at 1:17. Plays perfectly in VLC outside of Neos.

Enverex commented 3 years ago

There's an issue that may or may not be associated so I don't want to log a new bug for it. It happens often around the same time as the crackling issues, hence why I think they may be related. Here's a recording (in desktop mode) that shows both the earlier reported crackling and what appears to be some sort of weird location shifting.

The audio source ISN'T spatialised so it should be 2D and completely static, but as you'll notice, the acoustic profile of the audio keeps changing as if it's moving around somehow. It will often also flip the L-R channels entirely (though it's not that obvious if it's happening here due to the lack of visual to audio feedback on sound location).

Here are some timestamps from the first minute and a half of the following video showing both problems (again, this video file plays absolutely fine, without any quirks in every media player outside of Neos, so the source itself is fine):

https://neos.xnode.org/tmp/2021-07-26_20-37-32.mp4

C = Crackle. S = Sound shift.

9 C 10 S 16 S 19 C 25 S 30 S 35 C 36 C 55 S 62 C 66 S 76 C S 79 C 90 S 97 S

Mefdeti commented 3 years ago

I had audio corruption issues recently for voice, and was able to resolve it.

For me it was due to voice packets arriving out of order. In game, this manifested as audio corruption and the in game network monitor showed ~1% packet loss. In this case was no actual packet loss, but instead the packets that were out of order were being dropped by the voice system.

I was able to identify the out of order packets using Wireshark. I saw what appeared to be a sequence number in some of the UDP packets that appeared to be voice data. These were occasionally out of order.

For me, it was caused by link aggregation on my router. I would like to turn that back on, but for now I have it disabled as a work around. Anyone with multiple network paths can end up with this same issue. In some cases, their ISP infrastructure may be built in a way that has multiple paths. It is unlikely they would be able to convince an ISP to change it and would instead rely on Neos to be a bit more resilient towards this issue.

On Neos side, this can be solved by buffering a few packets and reordering them instead of dropping them. Keep in mind this is different from the buffering that occurs for actual audio playback. Instead, this would take place closer to network deserialization. I don't know if Neos already has something to handle a small amount of reordering, but it was not enough to compensate for the amount I had.

If the voice system already has a system for this, allowing users to configure it would be helpful. People unable to resolve this issue would likely be willing to have a few extra packets worth of latency in order to avoid audio corruption. Considering that it appears there are sequence numbers, you could automatically detect packet order issues and increase this buffering to compensate.

Frooxius commented 2 years ago

I've updated the logic in 2021.10.5.1054, plus we updated CSCore. Can you check if this made any improvements to the issue?

MasterPizzaCow commented 2 years ago

Still have this problem, sounds like occasional static and its only neos