A list of issues and temporary solutions for screensharing

The latest update for Teamspeak has been great in a lot of ways and I do want to thank the team behind it very much for the great work. Throughout using it for months now I’ve had my fair share of issues specifically for screen sharing and I want to list all of those here (and temporary fixes for them if you have problems too). As I use Linux, this will be mostly Linux specific. I don’t know which of all these problems also happen on other platforms.

Missing Hardware acceleration for AMD GPUs on Fedora Based systems:

On Fedora based Distros libraries differ from other distros. The /usr/lib folder doesn’t contain both 32bit and 64bit libraries, instead it uses /usr/lib/ for 32bit and /usr/lib64/ for 64bit libraries. Teamspeak only looks for libraries in /usr/lib/ and fails because the 32bit libva driver is incompatible with a 64bit Application (wrong ELF class).

This is temporarily fixable by adding this environment variable:
LIBVA_DRIVERS_PATH=/usr/lib64/dri:$LIBVA_DRIVERS_PATH

Missing VAAPI decoders

I don’t know if this is distro specific (if yes, this is on a Fedora based distro once again), but even with the fix listed above, VAAPI doesn’t show up for decoding. I tested if ffmpeg can decode streams and videos with VAAPI and it was able to.

The (very) temporary fix for me was to install the AMF en/decoder. I want to stress that Teamspeak should support full VAAPI en- and decoding. You can follow the community post here to see how you can install it yourself.

Crash on joining a stream

I tried a bunch of things to get acceptable video quality in streams with someone else. Something we couldn’t do was to join a stream encoded with VAAPI AV1 while using the AMF AV1 decoder. Teamspeak would crash consistently on every try to join the stream. We didn’t save the logs, but we can reproduce it and send them in if you desire.

We worked around the issue by not using the VAAPI AV1 encoder and sticking to the AMF Encoder. I might add that Teamspeak did not crash when decoding a VAAPI AV1 stream with the CUVID AV1 decoder. We also noticed that Teamspeak avoids using VAAPI AV1 when decoding with AMF, falling back back to H.264 (which I streamed using NVENC).

Weird bitrate enforcement behaviours

The default settings for streaming with AMF are problematic. I am not 100% sure what this is related to but I found that changing the rate control mode fixes some things but also introduces other very weird issues.
Tests were done at 1080p60 with a set bitrate of 10 Mbps. None of the rc modes limited themselves to that bitrate setting though, even if I reduced it.

In most rc modes (including the default one) the bitrate doesn’t go over 2 Mbps, which in turn regardless of stream settings just looks bad. It is smooth, but the low quality makes the stream so ugly that it’s unwatchable.
These rc modes include:

  • vbr_latency
  • vbr_peak
  • cbr

As expected, cqp looks very good, but also at times uses up to 320 Mbps and even higher even at 1080p30 with qp set to 63 (My max upload is 50 Mbps, so even I can’t stream this). This rc mode is never recommended for streaming, but I’m mentioning it because it disregards the configured max bitrate by a lot (over 3000% and possibly more).

These following modes also exceeded the set maximum Bitrate up to 40 Mbps:

  • qvbr
  • hqcbr

Only one mode exceeds the max bitrate given in the stream settings, but didn’t overdo it too much compared to the modes above and stayed mostly close to or below 10 Mbps.

  • hqvbr

This mode confidently allows you to stream at higher fps or resolutions, but based on that it will also ramp up the bitrate slightly and over the limit, potentially asking for more bandwidth than you have.

2 Likes

First of all, thanks for the detailed report, really helpful insights.

Missing Hardware acceleration for AMD GPUs

Should be fixed in beta4.

Missing VAAPI decoders

Due to H264 patent encumberement we cannot ship the base software decoder required for H264. VAAPI Decoding in FFmpeg works by attaching a hardware-accelerator to the base software decoder. VAAPI is somewhat of an exception here for decoding only. All other major backends offer a dedicated h264_ (h264_qsv, h264_amf, …) en/decoder — except VAAPI. So, we can’t really offer this for h264. We could for AV1/VP9 but this adds a new complexity right now to maintain the software-decoder + hw-accel attachment path next to the current hw-accel-only path. Will put that on our list, but H264 will be out of luck either way.

Crash on joining a stream

Need more information / logs from AMF (and why it crashes). We adjusted some things which should maybe improve this in beta4, but to be sure, we’d need concrete logs from stderr/stdout from the AMF side where the crash occurs.

Weird bitrate enforcement behaviours

There were some bugs identified in the live rate-limit update code which could resolve this issue, additionally, the default encoder params for AMF have been touched. Let us know if that works better in beta4.

So all in all: Please follow up after beta4 has been released if any problems persist and provide logging if so. Thanks again for the detailed report!

5 Likes

No problem :slight_smile:
I can see if I can gather some logs for the crashes.
I wouldn’t have expected you to include VAAPI decoding (or even encoding) for H.264 at all on Linux for obvious reasons, but I would like to see it for AV1 and VP9.

Thanks for the reply. I’ll be reporting back when the next update rolls out.

2 Likes

Yes, I’ve added VP9/AV1 VAAPI support for future releases (but it won’t make the cut for beta4). Thanks again! Ticket: TS6-2145

5 Likes

Hi. Thanks for the update! I’ve gotten a chance to do some testing with beta4, and I am experiencing new issues.

I am using TeamSpeak on my Linux desktop. Before the beta4 update, when I would screen share with AV1 (VAAPI) hardware encoding, Windows users attempting to watch the stream would crash their clients, while Linux users did not crash. When I would share my screen with Internal (software) encoding, anyone could watch, but they experienced poor stream quality with lots of stuttering when watching.

Now that beta4 is out, I am experiencing different problems. When I screen share with AV1 (VAAPI) hardware encoding, I am able to view the stream on my Windows laptop properly. The laptop is on the same local network as my desktop. I have had two other Windows users on different networks try to watch the stream, but when either of them join the stream, my TeamSpeak client crashes.

I also tested using my own Windows laptop to join the stream while the laptop was using a VPN, and this also crashed my desktop’s client. This leads me to believe the problem partially has to do with LAN vs WAN connections.

I also fed my logs to an LLM and it provided the following summary of what it thinks is happening:

The crashes are caused by a Segmentation Fault (Signal 11) in the bundled FFmpeg library (libavcodec.so.62).

  1. Encoder Failure: Every time a user connects (especially from a VPN or external network), the client attempts to initialize or re-initialize the video encoder to accommodate the
    new viewer’s network conditions.
  2. Hardware Acceleration Conflict: Your system is using high-end AMD hardware (Radeon RX 9070) and attempting to use AV1 or H264 hardware encoding via VA-API.
  3. The Trigger: When users connect from outside your LAN, the WebRTC stack likely requests a different bitrate or profile (to handle lower bandwidth). The bundled FFmpeg library in
    TeamSpeak 6 Beta 4 appears to have a bug that causes a null pointer dereference in the EncoderQueue thread during this specific initialization phase.
  4. LAN vs. Remote: On your LAN, the network conditions are stable and high-bandwidth, likely allowing the encoder to stay in a “safe” default state that doesn’t trigger the bug.
    External/VPN connections force a change in parameters that causes the crash.
  • Faulting Module: libavcodec.so.62 (bundled)
  • Crash Thread: EncoderQueue
  • GPU: AMD Radeon RX 9070 (Navi 48)
  • Error: segfault at 28 ip 00007f2eaa8c2c4f (Null pointer dereference)
  • Context: Triggered during SessionOutbound::ResolveJoinRequest when remote peers connect via WebRTC.

I can’t say for sure what is going wrong, but something IS going wrong. I would be interested to know if anyone else is experiencing this issue or if their cross-platform screen sharing is working as expected now. I hope this imformation is helpful, and please let me know if I can provide any additional information.

Please provide the dump or trace of the crash (with local offsets), then we should be able to fix this easily. We cannot seem to reproduce this in our testing unfortunately.

2 Likes