Hosting Content in VRChat

VR is fun.

It’s a technology that can be more immersive to users and can help bridge the gap between the physical and virtual world. Using it, you can have more immersive experiences with other users than previously possible. What better way to use this tech than to watch something like a movie with your friend?

What Some Smart People Have Done

There is a social VR “game” called VRChat, and in it, you can do many different things with your friends. It uses the Unity game engine, and similar to a platform like Roblox, users can create and upload their own content using a version of the C# programming language called Udon.

Now, some smarter people than me have figured out how to program media players into the game. These can stream YouTube and Twitch links, but also media files like mp4s and mkvs, straight from a server hosting them. Now you can imagine if you have some definitely legally obtained media files of movies you definitely own, you could stream them for your friends and yourself to watch in VR! Well, I’m going to tell you exactly how to do that in this blog post.

What You’re Going to Need

Now it’s not as simple as hosting a web server and accessing your media files. VRChat prevents unencrypted HTTP requests for security reasons, so you’re going to need both a domain and an SSL/TLS cert for that domain. I used a small DigitalOcean cloud VPS for my hosting. The web server I used was Nginx, just because I had it previously set up as a reverse proxy, and it already had HTTPS set up using Let’s Encrypt and certbot. There are plenty of tutorials on how to do this, but in brief:

Things You Need to Know

Now that’s all you need to setup, but there are a couple additional things you need to know so you don’t have to go through the same pain I did while troubleshooting.

ffmpeg -i input.mkv -c:v copy -c:a aac -ac 2 output.mkv

Have fun!