Minecraft 原版视频播放器
English 简体中文
by WindWaves_Sea
本文也发布在作者的 博客、Bilibili 专栏、项目的 GitHub 仓库,以及 Modrinth 或 Curseforge。
简介
本项目基于一个 数据包,通过在原版 Minecraft 中显示图像序列来实现伪视频播放。
该数据包的主要目的:
- 自动计算帧率并批量处理帧文件。
- 提供自适应帧率以提升性能。
- 提供快速配置的接口。
- 播放存储在资源包中的图像序列。
它还提供了几个变量,以便通过资源包快速添加图像序列视频。
警告
此 数据包 默认使用头部装备槽来触发相机叠加层。
如果您不想使用头部槽位,可以在数据包内部手动修改(目前 V2.0 版本需要此操作)。
资源包中包含一个透明模型,用作已装备的叠加物品,从而创建伪“无物品装备”播放效果。
图像序列 指的是将视频或动画的每一帧保存为独立的静态图像文件,并按帧号顺序排列。由于具有高兼容性和无损画质,它在后期制作、3D 动画、视觉效果和其他领域中被广泛使用。
下载
您可以从以下位置下载此软件包:
视频要求
视频必须转换为 PNG 图像序列。
以增强的刻度率播放 60 FPS 视频
推荐使用 20 FPS 视频。
如果使用 60 FPS 视频,请将刻度率设置为 60:
/tick rate 60
这将设置目标游戏刻度速度。
使用帧插值播放 60 FPS 视频
在配置中设置原始帧率:
frame_rate:60
对话框菜单
您可以通过按 G 键或通过命令打开菜单:
/dialog show @s animations:open_menu
玩家需要选择视频分辨率。
- 1920×1080 = 16:9
- 2560×1080 = 16:10
如果要使用播放页面,请先在设置中选择一种语言。
参数说明
frame_zero
帧号前面的前导零的数量。
示例:
video0000.png
然后:
{frame_zero:"000"}
frame
当前帧号。
{frame:1}
path
输出文件路径。
{path:"animation:school/"}
name
视频前缀名称。
示例:
video0000.png
然后:
{name:"video"}
建议使用较短的名称以获得更好的宏性能。
blender
如果序列是从 Blender 导出的,则启用此项。
{blender:true}
blender_name
使用 Blender 时留空。
{blender_name:""}
frame_rate
视频的原始帧率。
用于自适应帧率。
对于服务器:
function-permission-level=3
sound
在 sounds.json 中定义的音频事件名称。
sound_switch
启用或禁用声音播放。
{sound_switch:true}
max_frame
最大帧数。
slot
用于叠加层的装备槽位。
支持的值:
- head (头部)
- body (躯干)
- chest (胸甲)
- feet (靴子)
- legs (护腿)
- mainhand (主手)
- offhand (副手)
- saddle (鞍)
dialog
video_list_show
视频是否在菜单中显示。
{video_list_show:true}
resolution
用于支持多种宽高比。
路径格式:
path/resolution/frame.png
示例:
animation:school/16:9/0001.png
switch
启用多分辨率模式。
true / false
default_size
默认比例键。
default_size:1
size_list
- 1 = 16:9
- 2 = 16:10
- 3 = 3:2
- 4 = 4:3
language
用于对话框菜单中的翻译名称。
default_language
1: en-us
2: zh-cn
3: zh-hk
4: zh-mo
5: zh-sg
6: zh-tw
7: en-au
8: en-ca
9: en-in
10: en-gb
11: fr-fr
12: de-de
13: ja
14: kn
15: es-es
16: ar
17: ko
18: in-in
翻译文本
格式:
language_code:"Translated Text"
示例:
en-us:"School"
示例
视频配置
data merge storage video:school \
{video:\
{\
frame_zero:"000",\
frame:"0",\
path:"animation:school/",\
name:"school",\
blender_name:"",\
frame_rate:"60",\
sound:"",\
sound_switch:false,\
max_frame:740,\
blender:true,\
slot:"head",\
dialog:{\
video_list_show:true\
},\
resolution:{\
switch:false,\
default_size:1,\
size_list:{\
1:true,\
2:false,\
3:false,\
4:false\
}\
},\
language:{\
default_language:"en-us",\
en-us:"School",\
zh-cn:"学校"\
}\
}\
}
function animations:video_add/main with storage video:school video
最后的
function行必须放在配置文件末尾,且video:后的名称必须与name值匹配。
sounds.json
{
"video_text": {
"sounds": [
{
"name": "animation:video/video_text",
"stream": true,
"volume": 0.8,
"weight": 1
}
]
}
}
然后使用:
{sound:"video_text"}
工作原理
基于 Minecraft 的 camera_overlay 装备组件。
命令
开始播放
/function animations:start {video_name:"video_name"}
停止播放
/function animations:stop
暂停播放
/function animations:pause
恢复播放
/function animations:continue_play
删除单个玩家的播放数据
/function animations:player_video_play/storages/delete/delete_player {name:"player"}
删除所有玩家数据
/function animations:player_video_play/storages/delete/all_storages/run
删除单个视频配置
/function animations:video_list/delete_only {name:"video"}
删除所有视频配置
/function animations:video_list/delete_all
关于图像序列
你可以使用以下软件导出图像序列:
- Adobe Animate
- Premiere Pro
- Apple Motion
- Processing
- Aseprite
请将其导出为 PNG 序列。
推荐分辨率
Minecraft 支持自适应纹理。
推荐尺寸:
960 × 540
这有助于减少存储占用和资源包体积。
注意事项
由于 Mojang 的一个问题,已播放的纹理可能会残留在内存中,无法完全清除。
这可能会导致低内存系统出现内存溢出。
错误报告:
调试模式
使用以下命令启用调试模式:
/scoreboard players set #debug video_setting 1
仅在排查数据包问题或与此数据包一起开发时才使用调试模式。
Minecraft Vanilla Video Player
English 简体中文
by WindWaves_Sea
This article is also published on the author's Blog, Bilibili Column, the project's GitHub repository, and Modrinth or Curseforge.
Introduction
This project is based on a datapack and provides pseudo-video playback in vanilla Minecraft by displaying image sequences.
Main purposes of this datapack:
- Automatically calculate frame rates and batch process frame files.
- Provide adaptive frame rate to improve performance.
- Provide interfaces for quick configuration.
- Play image sequences stored in resource packs.
It also provides several variables for quickly adding image-sequence videos through resource packs.
Warning
This datapack uses the head equipment slot by default to trigger the camera overlay.
If you do not want to use the head slot, you can modify it inside the datapack manually (currently required in V2.0).
The resource pack includes a transparent model used as the equipped overlay item, creating a pseudo "no item equipped" playback effect.
Image Sequence means saving every frame of a video or animation as an independent static image file, arranged in order by frame number. It is widely used in post-production, 3D animation, visual effects, and other fields due to high compatibility and lossless quality.
Download
You can download this package from:
Video Requirements
Videos must be converted into PNG image sequences.
Play 60 FPS Video with Increased Tick Rate
20 FPS videos are recommended.
If using a 60 FPS video, set the tick rate to 60:
/tick rate 60
This sets the target game tick speed.
Play 60 FPS Video with Frame Interpolation
Set the original frame rate in the config:
frame_rate:60
Dialog Menu
You can open the menu by pressing G or through command:
/dialog show @s animations:open_menu
Players need to choose the video resolution.
- 1920×1080 = 16:9
- 2560×1080 = 16:10
If you want to use the playback page, please select a language first in settings.
Parameter Explanation
frame_zero
Number of leading zeros before the frame number.
Example:
video0000.png
Then:
{frame_zero:"000"}
frame
Current frame number.
{frame:1}
path
Output file path.
{path:"animation:school/"}
name
Video prefix name.
Example:
video0000.png
Then:
{name:"video"}
Shorter names are recommended for better macro performance.
blender
Enable if the sequence was exported from Blender.
{blender:true}
blender_name
Leave empty when using Blender.
{blender_name:""}
frame_rate
Original frame rate of the video.
Used for adaptive frame rate.
For servers:
function-permission-level=3
sound
Audio event name defined in sounds.json.
sound_switch
Enable or disable sound playback.
{sound_switch:true}
max_frame
Maximum frame count.
slot
Equipment slot used for overlay.
Supported values:
- head
- body
- chest
- feet
- legs
- mainhand
- offhand
- saddle
dialog
video_list_show
Whether the video is shown in the menu.
{video_list_show:true}
resolution
Used for multiple aspect ratio support.
Path format:
path/resolution/frame.png
Example:
animation:school/16:9/0001.png
switch
Enable multi-resolution mode.
true / false
default_size
Default ratio key.
default_size:1
size_list
- 1 = 16:9
- 2 = 16:10
- 3 = 3:2
- 4 = 4:3
language
Used for translated names in the dialog menu.
default_language
1: en-us
2: zh-cn
3: zh-hk
4: zh-mo
5: zh-sg
6: zh-tw
7: en-au
8: en-ca
9: en-in
10: en-gb
11: fr-fr
12: de-de
13: ja
14: kn
15: es-es
16: ar
17: ko
18: in-in
Translation Text
Format:
language_code:"Translated Text"
Example:
en-us:"School"
Example
Video Configuration
data merge storage video:school \
{video:\
{\
frame_zero:"000",\
frame:"0",\
path:"animation:school/",\
name:"school",\
blender_name:"",\
frame_rate:"60",\
sound:"",\
sound_switch:false,\
max_frame:740,\
blender:true,\
slot:"head",\
dialog:{\
video_list_show:true\
},\
resolution:{\
switch:false,\
default_size:1,\
size_list:{\
1:true,\
2:false,\
3:false,\
4:false\
}\
},\
language:{\
default_language:"en-us",\
en-us:"School",\
zh-cn:"学校"\
}\
}\
}
function animations:video_add/main with storage video:school video
The last
functionline must be placed at the end of the config file, and the name aftervideo:must match thenamevalue.
sounds.json
{
"video_text": {
"sounds": [
{
"name": "animation:video/video_text",
"stream": true,
"volume": 0.8,
"weight": 1
}
]
}
}
Then use:
{sound:"video_text"}
How It Works
Based on Minecraft's camera_overlay equipment component.
Commands
Start Playback
/function animations:start {video_name:"video_name"}
Stop Playback
/function animations:stop
Pause Playback
/function animations:pause
Resume Playback
/function animations:continue_play
Delete One Player's Playback Data
/function animations:player_video_play/storages/delete/delete_player {name:"player"}
Delete All Player Data
/function animations:player_video_play/storages/delete/all_storages/run
Delete One Video Config
/function animations:video_list/delete_only {name:"video"}
Delete All Video Configs
/function animations:video_list/delete_all
About Image Sequences
You can export image sequences with:
- Adobe Animate
- Premiere Pro
- Apple Motion
- Processing
- Aseprite
Export them as PNG sequences.
Recommended Resolution
Minecraft supports adaptive textures.
Recommended size:
960 × 540
This reduces storage usage and resource pack size.
Notes
Due to a Mojang issue, played textures may remain in memory and cannot be fully cleared.
This may cause memory overflow on low-memory systems.
Bug Report:
Debug Mode
Enable Debug Mode with:
/scoreboard players set #debug video_setting 1
Only use Debug Mode when troubleshooting datapack issues or developing with this datapack.
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
下载 Vanilla Video Player
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Vanilla Video Player
下载 Vanilla Video Player
修复了启用调试模式后重新加载会禁用 send_command_feedback 的问题,以及播放动画可能导致音画不同步的问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
此数据包添加了属于阿瓦里海盗的独特结构,将他们的独特风格带入你的 Minecraft 世界!兼容性:1.20 至 26.3
数据包
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
数据包
此数据包添加了新的“祝福模式”难度。
数据包
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
数据包
手持潜影盒时可直接打开,无需将其放置在地面上。只需按住 Shift 并右键点击即可访问你的潜影盒。
数据包
为你的 Minecraft 世界添加了超过 900 个新的进度
评论 0
登录后参与评分
还没有评论,来抢沙发吧