TICK-ING / MediaPlayer

This plugin is used to play NBS music on the bedrock dedicated server(BDS).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MediaPlayer

wakatime

CodeFactor

English | 简体中文

Introduction

This plugin is used to play NBS music and map videos in BDS server. This project uses the LittleHooker framework for HOOK.

Use

NBS music playback

NBS music files should be placed in the plugins\MediaPlayer\nbs folder

Use /mpm as the main command in the game The subcommands are list, play and stop.

Subcommands Parameters Examples Explanation
list none /mpm list Get song index
play Song index, Optional: Number of loops /mpm play 1 3 Play song (index 1, loop three times)
stop none /mpm stop stop playing

Note: Before playing music, please use /mpm list to get the music list first. You can also use the /mpm command inside the game to see how to use it If there is a video with the same name as the music in the plugins\MediaPlayer\video folder, then it will be played together (if the player is holding the used map) For example, if the following files and folders exist, then the plugin will try to play both music and video: plugins\MediaPlayer\nbs\test.nbs plugins\MediaPlayer\video\test

Recommended NBS music resources

It's not easy to make original nbs music ~ come and support them!

Original nbs music collection

nbs music "water"

nbs music collection

Video playback

Please place the video folder in the plugins\MediaPlayer\video folder

Use /mpv as the main command in the game The subcommands are list, play and stop.

Subcommands Parameters Examples Explanation
list none /mpv list Get video index
play Video index, Optional: Number of loops /mpv play 1 3 Play video (index 1, loop three times)
stop none /mpv stop stop playing

Note: Please use /mpv list to get the video list before playing the video. And must be holding the used map You can also use the /mpv command in-game to see how to use it

Generate playable video files

Overview: We use ffmpeg to convert the video to 128x128 resolution at 20FPS. Each frame in the video is then extracted as a single image, which is then played by the plugin.

First, download ffmpeg from here Extract it and put ffmpeg.exe from the bin folder into the plugins\MediaPlayer\video folder under the server Rename the video you need to generate as input.mp4 and put it into the plugins\MediaPlayer\video folder on the server side Open convert.bat in the plugins\MediaPlayer\video folder for conversion.

If the conversion is successful, a folder named output should be created, and you can rename it to the same name as the music if there is any music that matches it. The plugin will automatically play the video while the music is playing. Please delete both input.mp4 and output.mp4 files for the next conversion.

Acknowledgements

  • yqs112358 providing technical support at send packet level
  • lgc2333 participated in the development of nbsparser and provided basic technical support.

Without their support, this project would not have been possible

License

Project License
LittleHooker GPL-3.0
nbsparser GPL-3.0
dirent MIT
minhook license
uthash license
microsoft-pdb license
Horion license
libspng BSD-2-Clause
miniz MIT

About

This plugin is used to play NBS music on the bedrock dedicated server(BDS).

License:GNU General Public License v3.0


Languages

Language:C 99.4%Language:Python 0.3%Language:CMake 0.2%Language:Batchfile 0.0%Language:C++ 0.0%