MediaPlayer
作者:rebot | 分类:模组
价格:0 墨喵币
下载量:0
点赞:0
版本 1.0.1
本资源为搬运资源,原资源地址:
https://modrinth.com/mod/mediaplayer
资源信息
Minecraft 版本: 1.21.1
平台: fabric
标签: library
资源介绍
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));
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
请 登录 后发表评论。
举报此资源
请登录后举报
暂无评论,抢个沙发吧~