MediaPlayer is a fully-customizable plugin that allows you to play and use various medias such as videos with audio, livestreams, pictrues on Minecraft (1.7-1.21).
For better performance, set network-compression-threshold to -1 in server.properties and restart your server. (this will also hurts bad connection players) You can run any video at any resolution and frame-rate the only true limit is the player connection and server bandwidth (if you want no connection limitation use it on a localhost server)
(small computer Windows XP booting up)
(or when its big : 4K Minecraft trailer)
Notes : - This plugin is in its early days and is already very time consuming, consider it to not be perfect as you wished for, thus if you find any problems or suggestions we would be happy to see you on the plugin github issues section in an attempt to make a great plugin. - Very old Minecraft versions such as 1.7 will miss numerous features.
Steps to play a video
You can watch the tutorial here, or follow those instructions below : If you have already loaded the video jump directly to step 6 to play it.
The plugin require the video file : make sure the video format is compatible, here are the compatible formats : mp4, mov, m4v, avi, webm, gif, m3u8, ts, wmv
Browse to your server plugin folder, then go to the plugin folder and drag the video file to the videos folder
Back in game we have to reload the video list with : /videos reload
(if you don't want to wait for loading type /video <video-name> set real-time-rendering true) else enterthe videos menu with /videos : you will be able to see your video appearing in the menu, click on it then select load
Loading time depends on the server hardware, you will receive notification during the process and when its finished
Once finished, you can get back to videos menu : /videos then click on your video and select play
In order to play the video you will need a screen of specific dimensions (can be found when mouse hovering the video in the /videos), if you dont have a screen the plugin suggests to create a screen in direction you are looking at, simply click on the message in the chat to create it.
Once you have your screen ready simply right click on the top left corner of the screen (the screen display should change into the video thumbnail)
Accept the upcoming texture pack request, then type /video start
To stop the video type : /video stop
Steps to play a Twitch livestream
Follow those instructions below :
Go to the stream page just as you were watching it !
Access your browser developper tool (Google Chrome : CTRL + SHIFT +i) then go to the network tab
Once in the network tab, you will see a bunch of links appearing in the tab menu, select one of the m3u8 link and copy its URL
This step is very web engine dependant, I use Google Chrome in the tutorial
Then go in your server console and type the following : /video live copied-url, a video should load in a few seconds
After that in the chat, the livestream UUID should appear, to play it you can now go in the /videos menu and play it as a regular video, no loading needed
Notes : - Stream are not loaded and so high resolution streams may be hard to handle, so before doing the above steps lower the stream resolution. - Unfortunately livestreams audio aren't not supported yet. - Only m3u8 based livestreams are support for the moment (This means Youtube livestreams aren't supported)
Steps to display pictrues
Make sure your image file extension is .png or .jpeg
If your image is not provided by an web-url you can drag it in the images folder of the plugin folder
Then if the file is online you type in chat /image render url, if you have dragged the file in the previous step you type instead /image render file-name, you will receive a map-item
A screen is needed to display the pictrue, you either have one or you can create one by clicking on the message in the chat
Eventually you right-click with the map-item on the top-left corner of the screen, you will see the image
There is a lot of features so only important ones will be covered (there is over 35 commands and every file is a configuration file).
Browe through plugin commands, you type : /video, /screen, /image
Changing video playing distance from a screen in the plugin configuration field : plugin.maximum-distance-to-receive (in blocks)
Disable video loading (good choice if you have good server hardware) : /video <video-name> set real-time-rendering true
Changing video frame-rate : /video <video-name> set frame-rate <integer>
Disabling text showing on action bar while the video is played : /video <video-name> set show-informations <true|false>
Enable looping on a video : /video <video-name> set looping <true|false>
Enable run on startup : /video <video-name> set run-on-startup <true|false>
Download a video from direct url : /video download <url>
Access interactive videos menu : /videos
Access screens menu : /screens
Cancel all plugin tasks : /videos cancel-tasks
All other commands are self explanatory.
API : This plugin is built in API, a full documentation is provided, this means if you want to make a fully functionnal JavaFX web-browser in Minecraft this is possible, or even play Minecraft within Minecraft. I will soon do a tutorial with the MediaPlayer API to show how to make a plugin.
You agree that the software is provided to you entirely for use at your own risk in accordance with Minecraft EULA and your server hosting platerform terms of use.