Mod
FFmpegLib
No reviews yet
Adds the FFmpeg library to Minecraft
Includes quality of life improvements and small tweaks to enhance and customize gameplay.
Addresses and fixes known bugs and issues.
A mod made using MCreator, which is a tool for creating custom mods without programming knowledge.
Neoforge is a fork of the Minecraft Forge available for versions 1.20.1+ of Minecraft. Many Forge mods are compatible with Neoforge and vice versa.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
FFmpegLib is a technical library mod for Minecraft NeoForge 1.21.1 that integrates FFmpeg multimedia capabilities directly into the game. It adds no content for players, serving strictly as an API for other mods to handle dynamic media processing in background threads without lagging the main game loop
Please report any errors and/or ask any questions in the comments and/or via private message to me
Features :
— Executable Management: Automatically tracks and manages the ffmpeg.exe file inside config/ffmpeglib/
— Asynchronous Orchestrator: Provides a Java API (FFmpegOrchestrator) to run heavy video/audio processing tasks using CompletableFuture
— Frame Extraction: Converts video files (e.g., mp4) into a sequence of PNG frames at a specified FPS for custom GUI or in-game rendering
— Crash Isolation: Runs all decoding tasks in separate processes to prevent Minecraft from crashing if a media file is corrupted.
API Methods
Video Frame Extraction
Converts a video into sequential images named frame_%04d.png inside the target folder
— Signature
public static CompletableFuture<Void> extractFrames(File ffmpegExe, File videoFile, File targetDir, int fps)
— Parameters
ffmpegExe: The path to the verified FFmpeg executable
videoFile: The source video file to process
targetDir: The destination folder for the output PNG frames
fps: The target frame rate (number of frames extracted per second)
An example from lost in fog (approximate)
@SubscribeEvent
public static void onClientLogin(net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.LoggingIn event) {
if (!ffmpegExe.exists() || !ffmpegExe.isFile()) {
Minecraft.getInstance().execute(() -> {
Minecraft.getInstance().setScreen(new FfmpegMissingScreen(null));
});
return;
}
CompletableFuture.runAsync(() -> {
try {
for (int d = 1; d <= 5; d++) {
File targetDir = new File(cadriDir, "video" + d);
File videoFile = new File(videoDir, "anal" + d + ".mp4");
if (!videoFile.exists()) extractVideoResource(d, videoFile);
if (!targetDir.exists()) targetDir.mkdirs();
File[] existingFrames = targetDir.listFiles();
if (existingFrames == null || existingFrames.length == 0) {
// HERE
FFmpegOrchestrator.extractFrames(ffmpegExe, videoFile, targetDir, 25).join();
}
}
} catch (Exception e) {
e.printStackTrace();
}
});
}
I'm not an expert in programming or creating libraries for mods, so this library turned out to be small. I tried to describe all the methods used, and this mod is mostly intended as a supplement to lost in fog rather than a standalone library
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers