Plugin Tutorial#
If you need help with using this plugin, refer to this tutorial to guide you through a step-by-step process to set this plugin up.
Step 1: Install the Plugin
If you haven’t already, follow the installation instructions in the Installation Guide to
install the MCAV plugin on your Minecraft server. Make sure you are using a compatible version of Paper (1.21.10).
Warning
If you are running a Linux headless server, you will need to set the LD_LIBRARY_PATH environment variable to where
the mcav library installs binaries. This would be in the ~/.apt/usr/lib/{platform}/ directory, where platform is
your current operating system platform. You have to either export LD_LIBRARY_PATH to include this before you start
the server, or append it to the java.library.path system property in your server’s startup script.
Step 2: Configure the Plugin
Run the plugin once to generate the default configuration files. You can find the main configuration file in
plugins/MCAV/config.yml. Open this file in your favorite text editor and adjust the settings as needed. If you would
like audio support for videos, follow one or both of the ways to set up audio:
Option 1: HTTP Audio Streaming
Port-forward another port besides your current Minecraft server port.
Go into the
config.ymland set theportunder thehttp-serversection to the port you just forwarded. Make sure to set thehost-hameto your public-ip address too if the server is open to the internet.Change the
enabledoption underhttp-servertotrue.Restart your server to apply the changes.
Option 2: Discord Audio Streaming
Create a new Discord application here.
Open the
Installationtab in your new application. Uncheck theUser Installoption, and set theInstall Linkdropdown menu toNone.Open the
Botsection in your application, and scroll down to thePrivileged Gateway Intentssection. Enable all the intents (PRESENCE, SERVER_MEMBERS, and MESSAGE_CONTENT).Scroll up, and rename your bot to something unique, and then click the
Reset Tokenbutton to generate a new token.Copy and paste that token into the
tokenfield under thediscord-botsection in yourconfig.yml.Enable Developer Mode in Discord by going to
User Settings > Advanced > Developer Mode. Then right-click on your server icon in Discord and selectCopy Server ID. Paste that ID into theguild-idfield under thediscord-bot.In your server, right-click the voice-channel you want to use for audio streaming and click
Copy Channel ID. Paste that ID into thechannel-idfield under thediscord-botsection in yourconfig.yml.Set the
enabledoption underdiscord-bottotrue.Restart your server to apply the changes.
Option 3: Simple Voice Chat
Install the Simple Voice Chat plugin on your server. Make sure that it’s the correct version for your Minecraft server.
Open the
config.ymlfile, and set theenabledoption under thesimple-voice-chatsection totrue.(User Side) Install the Simple Voice Chat mod on your client.
Restart your server to apply the changes.
Step 3: Profit
Now that you have configured the plugin, you can start using it to play videos in your Minecraft server!
Usage Instructions#
The sandbox plugin provides many features. Refer to the Commands Guide for a complete list of all their commands and proper usage. The following guide below will help you get started with the most common commands.
First, run the /mcav screen command with arguments to create a new map screen. For example, running
/mcav screen 5x5 0 OAK_PLANKS ~ ~ ~ will create a 5x5 screen at your current location with oak planks as the frame.
If you would like to play a video, here are the steps to take:#
If you would like to play a video on the screen you just created, run the
/mcav video mapcommand. Otherwise, you can use other commands like/mcav video block.Set the audio type to whatever audio you configured in Step 2 (HTTP or Discord).
Specify the other arguments accordingly to its command usage.
Set the
mrlto either a local file path, or pretty much any valid URL to a website like YouTube, Vimeo, or Twitch. A list of all supported video sites can be found here.
If you would like to create a browser, here are the steps to take:#
Use the
/mcav browser createcommand to create a new browser on that screen. Browsers can only be created on maps. For example, running/mcav browser create @a 640x640 100 1 5x5 0 FILTER_LITE https://www.google.comwill create a new browser that all players can see on the 5x5 screen you just created with a resolution of 640x640 pixels, full quality, and snapshots taken every second with Filter Lite dithering. It will display the Google homepage by default.If you want to interact with the browser, you can use the
/mcav browser interactcommand, which will take all your chat input and send it to the browser as if you were typing in a real web browser. For special keys like enter, type the key in “Enter” to simulate pressing the enter key. Left and right-clicking on the browser will simulate mouse clicks. For more information on possible keys, see theKeyboardEvent.keycolumn here.Once you’re done with the browser, you can close it by running the
/mcav browser releasecommand.
If you would like to stream OBS output, here are the steps to take:#
Follow all the steps to play a video. The only difference is that you must set the player to be
FFMPEGinstead ofVLC.Set the
mrlto bedshow:video=OBS Virtual Cameraon Windows. For other operating systems, please refer to the FFmpeg Documentation. The format MCAV parses isformat:input. In this case, the format isdshowand the input isvideo=OBS Virtual Camera.
If you would like to create a virtual machine, here are the steps to take:#
Use the
/mcav vm createcommand to create a new virtual machine on that screen. Virtual machines can only be created on maps.Follow the command argument usage in the Commands Guide to specify the VM parameters. You are on your own to provide the valid QEMU arguments for the VM to run. For some examples of valid VM arguments, here is one for providing an ISO image with 2 GB of RAM and 2 CPU cores:
/mcav vm create @a 640x640 30 5x5 0 FILTER_LITE X86_64 -cdrom /path/to/your.iso -m 2048 -smp 2
You are not limited by any of these commands! You can combine them in any way you like to create whatever you want on your server!