介绍
中文介绍正在准备中,下面暂时显示原文。
MediaPlayer
A decode library for Minecraft based on ffmpeg.
Features:
- Video and audio decoder
- Hardware acceleration
- Supports many media formats
- Only Windows x64 platform is supported
How to use:
For user
Use the commands
/summon mediaplayer:video
/mediaplayer video
to play video.
Or use
/mediaplayer audio
to play audio.
Use
/mediaplayer clear
stop all video and audio.
For developer
Create decoder
var file = new File("<video file path>");
var decoder = VideoDecoder.create(file);
Decode and render frame
decoder.fetch();
bufferSource.getBuffer(VideoRenderType.create(decoder.frame));
/* Rendering code */
Play companion audio from video
Minecraft.getInstance().getSoundManager().play(new AudioInstance(decoder.audio.decode(false), null));
Play independent audio
Minecraft.getInstance().getSoundManager().play(new AudioInstance(new AudioDecoder.decode(false), null));
常见问题
MediaPlayer 支持哪些 Minecraft 版本?
MediaPlayer 支持 Minecraft Java 版 1.20.1–1.21.1,共 3 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
MediaPlayer 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
hackermdch 的其他作品
查看全部 →
Genshin Craft
by hackermdch
This mod is dedicated to realizing Genshin Impact in Minecraft
6.2万
25 天前
Modrinth
ExParticle
by hackermdch
A particle effect extension
2,389
2 个月前
Modrinth
ExParticle
by hackermdch
A particle effect extension
2,389
2 个月前
Modrinth
[丹] Elixir
by Primogem Studio
This is a mod themed around Chinese-style alchemy.
1,336
12 天前
Modrinth
评论
登录后评论和评分