Audio/Video: Foundry vs Discord vs Jitsi/LiveKit

I received this question recently by email and thought that my answer deserved to be copied here as well for others who might benefit from it.

The question was about how Foundry’s Audio/Video conferencing compares to Discord’s, and with Discord Nitro. As well as whether hosting through The Forge would give any better results than self hosting. (Edit: When I talk here about Discord, the same applies to Jitsi or LiveKit in that case as they work similarly)

First, when it comes to the difference between self hosting and The Forge, with regards to Audio/Video, most people wouldn’t see much of a difference. This is because you will likely connect to each other, so the limiting factor is each player’s CPU and bandwidth limits (more on that later). In the case however where one player is behind a more restrictive NAT, such as behind a mobile network hotspot, a corporate firewall, or an IPv6 bridge (where another player has no IPv6 address) for example, then The Forge does provide a more robust relay service that is pre-configured and ensures that you will always manage to connect to each other.

With regards to the comparison with Discord, the integrated A/V of Foundry works differently from how Discord works. More specifically, with Foundry, you will connect to each other player and send/receive with each of them individually.

If you have for example 5 players total, then you would send your audio/video to the other 4 and you will receive from them as well, this increases the bandwidth usage you would use. It’s not a lot though, I’d say with both audio and video, probably less than 500Kbps per player. With Discord, you connect to the Discord server itself and send only once, but still receive from all the others. This has a small bandwidth usage overall.

Here’s a graphic showing how the connections could be made. In Foundry’s case, it’s a “Mesh” connection, while Discord uses an “SFU” connection (note that the downlink/uplink bandwidths are probably for HD video, whereas foundry streams 320x240 videos, which is why it would be lower than that) :

I personally don’t notice much of a difference in quality between Discord and Foundry’s integrated A/V though I’ve seen most people praising Foundry’s A/V because it’s a much better quality than Discord. I looked up Discord Nitro’s advantages, but I don’t see an actual quality increase for Nitro users (I might be wrong), instead, I see that it’s related to the server itself, You would need to use a server that is Nitro boosted to level 1 or higher for the audio quality to increase, see the Discord FAQ here : https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-

  • Regular server : 96 Kbps (This is radio quality)
  • Level 1 boost : 128 Kbps (This is CD quality)
  • Level 2 boost : 256 Kbps (This is iTunes high quality music)
  • Level 3 boost : 384 Kbps (Probably more of a marketing thing at this point)

Foundry itself does not limit the bitrate that your audio/video will use, instead, it will use adaptive-bitrate and will increase/lower it based on the available bandwidth (yours and the person you are sending to). So if you have a limited upload speed, then the bitrate will decrease, and the more people that join your game, the lower it will be decreased. If you have a good upload speed, usually, you wouldn’t notice any degraded quality as you’d be able to use the full bitrate allowed by the audio and video codecs.

Now to answer the question itself: using The Forge shouldn’t really have much of an impact on your audio/video experience because you would be connecting to each other directly (see the Mesh diagram above). I do have on the Forge a dedicated relay server which would only be used in case you aren’t able to connect directly to another user, in which case, yes, it should make a difference to use The Forge vs a self hosted Foundry.

Note that you can also use the Jitsi module which, once enabled, will use jitsi servers (https://meet.jit.si) for the audio/video calls, which I’ve heard gives better results overall, possibly because it’s also an SFU connection, so uses less bandwidth and CPU for encoding on your own machine. Note that the jitsi connection also doesn’t suffer from one bug in Foundry where the connection between two players may sometimes fail and requires the player to refresh the page.
I know that a lot of videos and tutorials out there explain the long and complicated process of how to set up a jitsi server, but note that it is not necessary and simply enabling the jitsirtc module is enough for it to use the public Jitsi servers with zero configuration from your part, so don’t be intimated in trying the module.

EDIT: LiveKit servers function under the same principle as Jitsi, though LiveKit does not provide a public server, and Jitsi has started limited their public servers to 5 users only. You can however take advantage of our LiveKit servers instead : Livekit Voice and Video Chat - Docs - The Forge

What I personally used in my games (mostly because of some push to talk limitation back then) was integrated video in Foundry as it’s nice to see the video in the VTT itself, but I had kept using Discord for audio, that had worked well for my group.

If you need more clarifications or have more questions with regards to the Audio/Video conferencing feature of Foundry, feel free to comment below.

4 Likes

Thank you for this detailed and informative post. My group of 6 has suffered from a/v issues in the past while using Roll20 and Discord. I’m willing to pay for a Jitsi or whatever it takes in order to have decent in-game a/v with Foundry via Forge.
From what I read I’m guessing that is the best bet for in-game a/v presently (Jitsi, Foundry, Forge).

1 Like

Thanks @cybersanz,
You shouldn’t need to pay anything extra to get Jitsi working with Foundry and the Forge. Simply install and enable the Jitsi module, and that will use the public jitsi servers for the call.
I have no reason to install and configure a jitsi server since there is already a public one that is available and used automatically by the jitsirtc module, without requiring any additional configuration.
If you encounter any issues with that, let me know!

2 Likes

Kakaroto - can you be more clear on how to get Jitsi working. I’ve installed the module, and activated it within the “manage module” settings.

Then in the Configure Setttings/Configure Audio/Video settings under Server, I selected custom server and then entered the public Jitsi Server into the “Signaling Server URL” field: “https://meet.jit.si” and left the user/pass blank. All other settings I left untouched and there is no connection to the server.

What other specific settings need to be made? I left the module settings for Jitsi (allow standalone jitsi users, and Use custom jitsi URLs) unchecked. Am I missing something?

EDIT - I fixed it. In the “Signaling Server URL” field, the proper setting is to OMIT the https:// and instead only have: “meet.jit.si”

I didn’t know that worked. As far as I know, to get jitsi working with the public server, all you’d need is to set the Server to “Foundry VTT” basically, without setting a custom server actually. That works great.

Yeah seemed to work pretty great, after a quick test with myself and two other players it performed remarkably well. I honestly recommend that as a preferred alt to the built in audio/vid solution. Much more performant in our testing. Clearly we need to add in our additional 3 players to understand the full load and how well it holds up over 3.5-4 hours but initial impressions are great!

But you’re sure that not setting the custom server, and leaving the server to Foundry VTT utilizes the jitsi server? Clearly that would be easier, but without actually starting to trace packets I wasn’t confident it was using jitsi over the built in RTC. But if you can confirm, that would be easiest I guess!

Yep, I agree, Jitsi works great, I use it myself for my game :slight_smile:
If the module is enabled, it will consider the “Foundry VTT” setting as “Public Jitsi server”. Setting it to FVTT is actually just the equivalent of setting the URL to null, which means “use the default”. For the core implementation, it means the signalling server inside Foundry, for Jitsi, it means the public meet.jit.si server. Setting a custom server would only be useful if you run your own custom server.
I’ll suggest to the jitsi devs to actually change that line so it’s less confusing to users.

One question maybe Im missing it but what is mcu? I’m limited to 1.5 up and that seems the best option. Or is that just the forge base with no voice /video?

No, the Foundry base audio/video method is Mesh where everyone connects to each other. Jitsi uses SFU where everyone connects to a single server which then redistributes the data.

MCU is where you have a single server where everyone connects to and then it sends back a single stream with everyone’s video camera on it… I don’t know of any MCU off hand, but in an MCU setup, you would not be able to mute an individual person for example because you only receive one audio stream with everyone’s voices mixed into it, and the videos would also all be mixed together into a single image that you would see in a grid or something, and you wouldn’t be able to move them or hide a single person’s video, etc…

Old article, and maybe someone’s noted this already, but the public Jitsi service now has a 5 person limit, so if your game has more than 4 players (gm+4 = 5) then setting up your own Jitsi server may be necessary. I ran Jitsi for a while on my ubuntu server, configuration is hard to troubleshoot if you aren’t comfortable with all that, but once it’s working it’s nice to have your OWN Jitsi server. (Though I wish someone would write an updated how-to for Jitsi setup/troubleshooting. The one online is a little old.)

Yes indeed, Jitsi has recently imposed a 5 user limit. LiveKit seems to be a good alternative replacement and I’ve heard that it’s better, more capable and easier to set up than Jitsi. This was from the developer who wrote both the jitsi module and livekit module for Foundry.
I’ve looked a bit into LiveKit and it’s something we’re considering setting up for WB users, though there are challenges to resolve first, specifically with regards to security and authentication.

1 Like

Tried to deploy LiveKit, but it’s a little above my skill level to configure, but I feel like I was close to figuring it out. Would be nice to have something for folks that just want it to work in Foundry with minimal configuration. I feel like it’s just a matter of waiting a few weeks.

1 Like

I agree! I have a group of 6 people and it seems the standard A/V build-in doesn’t give us a seamless experience. I would need something else… Any news on this LiveKit?

Not sure if this is the place but I’ve have endless problems with the A/V blinking in and out, players losing connection, lag, and poor quality connection over the past 2 months. I’ve tried shrinking my World size and lowering the resolution of my maps, getting rid of modules, deleting chat and actors, using Jitsi module - nothing has helped. When I use Roll20 on the same browser it is seamless. My group has switched to Zoom for A/V for now until something improves. Does Livekit aim to help with this? Anything else I may be missing?

I believe so, but by what I’ve heard it is a little harder to set up.
The A/V has been a little off and on for a while, we’ll see if we can do anything about it.

I got LiveKit working on Foundry this morning. It was a little fiddly, but it wasn’t too bad. I don’t have time to make a detailed HowTo, but below are the steps I needed to take, with links to instructions I found useful. It will be easier if you have some technical knowledge because I’ve probably forgotten a few things I needed to do to get everything working. Hopefully the instructions below are helpful in lieu of something better from someone with more time than me.

What you need:

  • Amazon Web Services Account
  • Domain name you control and can add sub-domains to.
  1. I created an Amazon Web Services account (free tier) and then an instance of an Amazon Linux server (EC2) in my geographic region: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html

  2. I used SSH to log into my newly created virtual server (instance): https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html and then installed Docker following instructions here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html (steps 1-8).

  3. I then set-up two sub-domains using my service-provider’s management console, e.g.: livekit.mydomain.org and livekit-turn.mydomain.com, both of these pointing to the IP address of my EC2 instance.

  4. Back in my SSH terminal, logged into my EC2 instance, I followed the instructions here to install a LiveKit server in a Docker container: https://docs.livekit.io/deploy/vm/ I used the Startup Script method rather than Cloud Init method (the latter didn’t work for me). I had to change the permission of the startup script: sudo chmod 755 init_script.sh to be able to run it. Running the script will output an URL for your Livekit server (e.g. wss://livekit.mydomain.org) API Key and Secret, which you will need for the Foundry LiveKit module.

  5. Instructions on opening the ports on the AWS firewall for LiveKit are here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html

Note: If you stop and start your AWS instance your public IP address will change, and you will need to redirect your domains to the new address. The IP does not change if you restart the instance.

  1. Having installed and enabled the Foundry LiveKit module, I used the configuration option to enter my domain name, API key and API secret.

I’ve only lightly tested this, and it’ll be a couple of weeks before I can try it in a live gaming session, but it so far it appears to work fine. Sorry it’s not more detailed.

1 Like

For anyone interested, we’ve just launched our own LiveKit servers for World Builder users!

This is currently in Beta while we test things out!

1 Like

Still in beta/available only to NA and EU, or is it available to Australian subscribers now?

It’s not in beta anymore and it is available in all regions. :slight_smile:

1 Like