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));
📥 下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Create: Wrapped

价格:0 墨喵币
下载量:0

查看详情
ClientCatcher

价格:0 墨喵币
下载量:0

查看详情
Research Station

价格:0 墨喵币
下载量:0

查看详情
Nether Water

价格:0 墨喵币
下载量:0

查看详情