HomeJavaModsMediaPlayer

MediaPlayer

A decode library for Minecraft based on ffmpeg.

Features:

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));
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more