Mod

FFmpegLib

Quick rating

FFmpegLib

No reviews yet

Adds the FFmpeg library to Minecraft

QoL & Tweaks
Bug Fixes
MCreator
Mod Loaders
NeoForge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
ffmpeglib-0.6.7-neoforge-1.21.1.jar
Authors

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

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

This project has no gallery images yet.

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync