Download MapEngine Media Extension — Minecraft Mods — MetaMods
MapEngine Media Extension

MapEngine Media Extension

Active

Downloads

0

Last update

1 year ago

Versions

1.19.3 — 1.20.6
Server
Libraries
Utils

MapEngine Media Extension

logo

MapEngine Media Extension serves as an additional extension library for the MapEngine platform. This module enhances the system's capabilities by providing application programming interfaces for video playback and streaming content broadcasting.

Core Features

The extension's technological foundation is built upon JavaCV from bytedeco utilizing FFmpeg for multimedia data decoding. During server startup, the required JavaCV, JavaCPP and FFmpeg libraries are automatically downloaded and added to the classpath. The intelligent download system determines necessary components based on the operating system and processor architecture.

Key functional characteristics:

  • Runtime dependency auto-download
  • Media content decoding using FFmpeg

Native Library Loading

The following GIF animation demonstrates the native library loading process during server startup:

RuntimeDependencyLoading

Live Streaming on Maps

Example of live streaming via RTMP protocol on a 7×4 map array. The stream source features 1920×1080 resolution at 20 frames per second, broadcast through OBS Studio.

Usage Instructions

The MapMediaExt module must be added as a dependency in the plugin.yml file, regardless of the project's build system.

Maven Configuration

<repositories>
    <repository>
        <id>tjcserver</id>
        <url>https://repo.thejocraft.net/releases/&lt;/url&gt;
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupid>de.pianoman911</groupid>
        <artifactid>mapengine-mediaext</artifactid>
        <version>1.1.2</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Gradle Configuration (Groovy)

repositories {
    maven {
        url = 'https://repo.thejocraft.net/releases/'
        name = 'tjcserver'
    }
}

dependencies {
    compileOnly 'de.pianoman911:mapengine-mediaext:1.1.2'
}

Gradle Configuration (Kotlin)

repositories {
    maven("https://repo.thejocraft.net/releases/") {
        name = "tjcserver"
    }
}

dependencies {
    compileOnly("de.pianoman911:mapengine-mediaext:1.1.2")
}

Practical Example

public class Bar {

    public void foo(IMapDisplay display, URI streamUri) {
        // create a drawing area for the display
        IDrawingSpace space = plugin.mapEngine().pipeline().drawingSpace(display);

        // add all online players as receivers
        space.ctx().receivers().addAll(Bukkit.getOnlinePlayers());

        // create a new frame source with 10-frame buffer and scaling enabled
        FFmpegFrameSource source = new FFmpegFrameSource(streamUri, 10, space, true);

        // start the decoding process
        source.start(); 
    }
}

More detailed usage examples can be found in the MapEngine examples repository.

Project Building

To build the project independently, follow these steps:

  1. Clone the repository (git clone https://github.com/TheJoCraftNET/MapEngine-MediaExtension.git)
  2. Navigate to the created directory (cd MapEngine-MediaExtension)
  3. Build the JAR file (./gradlew build for Linux/MacOS, gradlew build for Windows)

The compiled plugin file will be located in the buildlibs directory.

Project members
booky10

booky10

Developer

pianoman911

pianoman911

Developer

Created: 7 Apr 2023

ID: 11037