Scheme and tool to play video in mlog-lampVideoPlayer
The video is best viewed using the minimap
I created all the animations embedded in the scheme
Video with bad apple: https://youtu.be/ZqajnkdD2ag
The first thing you need to do is launch Mindustry.
Go to Mods.
Navigate to the mods directory.
Navigate to the Mindustry directory.
Create a directory named mlog-data-blocks there.
Create a file named video-blocks-path.txt inside it.
Download the Python script
(After installing Python, ffmpeg, ffprobe, and other script dependencies)
Create a dedicated directory for script (recommended but optional).
Run it like this:
python path/to/script/video-to-mlog-video-blocks.py path/to/video.any_extension --regen-idThe script will automatically generate a config file containing various settings,
such as output frame dimensions and FPS.
After the script completes successfully:
- Navigate to the
outdirectory (created by the script) - Copy the full path to this
outdirectory - Paste it into
video-blocks-path.txt(located inMindustry/mlog-data-blocks/)
You only need to insert the path to the out directory once. This step is not required for subsequent generations.
After generation, launch Mindustry
→ Load any sandbox map (recommended: create a dedicated test map as a precaution)
→ Copy the JavaScript script from build-video-blocks.js
→ Open the Mindustry console (press F8 by default)
→ Paste the script and press Enter
Then paste this command into the console and execute:
buildVideoBlocks(100, 50, 70, Vars.player.unit())100, 50= Starting coordinates (x, y) where logic processor placement begins70= X-axis boundary limit- If placement exceeds this X-coordinate:
→ Y-coordinate increments by +1
→ X resets to the starting X value (100)
- If placement exceeds this X-coordinate:
After executing the command, logic processors will be placed.
They store video data as strings:
→ 1 string = 1 data channel
→ 3 channels = 1 video frame
→ 1 logic processor holds up to 16 frames at 52×39 resolution (player display size)
→ Color Depth of single channel: 92 values
You may then:
- Copy them as a logic schematic, or
- Leave them directly on the map.
This creates a "video file" for the player.
Next, you need the video player:
- Download the schematic file from the repository
- Place/build it on your map
Follow the in-game instructions provided by the schematic itself.
Once complete, you can watch the video on the player’s display built from Illuminators.