A powerful tool that converts video files into Minecraft Datapacks and Resourcepacks, allowing you to play high-quality videos directly in Minecraft Java Edition using text_display entities.
- High-Quality Video Playback: Uses
text_displayentities with custom bitmap fonts to render video frames with high performance. - Audio Support: Automatically segments and synchronizes audio with the video.
- Subtitle Support: Can extract subtitles from the video file or load external
.srt,.ass, etc... files. - Efficient Processing: Multithreaded processing for fast generation.
- Customizable: Options for subtitle scaling, output naming, and more.
- No Mods Required: Works with vanilla Minecraft (Datapack + Resourcepack).
- Python 3.8+
- FFmpeg (Not strictly required but strongly recommended for best performance and audio/subtitle extraction)
- Minecraft Java Edition 1.20.2+ (Required for
text_displayand macro support)
-
Clone the repository
git clone https://github.com/yourusername/minecraft_video_player.git cd minecraft_video_player -
Install Python dependencies
-
If you have ffmpeg installed:
pip install -r requirements.txt
-
If you do not have ffmpeg installed:
pip install -r requirements_audio.txt
-
Run the generator module with your video file:
python -m generator "path/to/video.mp4" [options]-
-o,--output <name>: Base name for the output files (e.g.,-o myvideocreatesmyvideo_datapack.zipandmyvideo_resourcepack.zip). -
-s,--subtitle <file>: Path to an external subtitle file. -
-ss,--subtitle-scale <float>: Scale for subtitle text (default: 2.0). -
-w,--workers <int>: Number of worker threads (default: 16). -
-nz,--no-zip: Generate folders instead of zip files.Use
-hor--helpto see all available options.
Example:
python -m generator "bad_apple.mp4" -o bad_apple -s "bad_apple.srt"-
Install the Packs:
- Place the generated
*_datapack.zipinto your world'sdatapacksfolder. - Place the generated
*_resourcepack.zipinto yourresourcepacksfolder and enable it in-game.
- Place the generated
-
Initialize the Player: Run the initialization function to spawn the screen and set up scoreboards.
/function video_player:init
Note: The screen will spawn at your current location.
-
Control Playback:
-
Start:
/function video_player:start
-
Pause/Stop:
/function video_player:stop
(This pauses playback; run
startto resume.Note: Because audio are segmented with 10 seconds chunks, pausing and resuming may not have immediate effect.)
-
Remove/Reset:
/function video_player:reset
(This removes the screen entities. Run
initagain to respawn.)
-
-
FPS Adjustment: If your video is not 20 FPS, the generator will suggest a
/tick ratecommand during initialization. Run it to ensure correct playback speed./tick rate <fps>
- Video: Frames are split into tiles (max 256x256) and saved as font textures.
text_displayentities cycle through these characters to display the video. - Audio: Audio is segmented into small chunks and played using the
playsoundcommand, synchronized with the video frames. - Subtitles: Subtitles are displayed using a separate
text_displayentity, updated based on the current frame.