Skip to content

Commit

Permalink
update videos
Browse files Browse the repository at this point in the history
  • Loading branch information
TianxingChen committed Jun 7, 2024
1 parent 0293116 commit eb7d793
Show file tree
Hide file tree
Showing 36 changed files with 162 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
31 changes: 31 additions & 0 deletions 1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from PIL import Image
import numpy as np
import imageio

# 图片路径
image_path = './files/icon.jpg'
# 输出视频路径
video_path = './videos/32.mp4'

# 打开图片
image = Image.open(image_path)

# 将图片转换为所需的模式,例如"RGB"
if image.mode != 'RGB':
image = image.convert('RGB')

# 定义帧率
fps = 24

# 创建一个Writer对象,用于写入视频
writer = imageio.get_writer(video_path, fps=fps)

# 假设我们想创建10秒的视频
for i in range(fps * 10):
# 将图片写入视频
writer.append_data(np.array(image))

# 完成视频写入
writer.close()

print(f"Video has been created: {video_path}")
72 changes: 70 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,24 @@
<title>ManiCM</title>

<style type="text/css">svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x{height:2em;width:2.5em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}.fad.fa-inverse{color:#fff}</style><link href="./files/css" rel="stylesheet">

<style>
.video-container {
display: grid;
grid-template-columns: repeat(8, 1fr); /* 8列 */
grid-template-rows: repeat(4, auto); /* 4行,高度根据内容自动调整 */
gap: 10px; /* 网格项之间的间隙 */
width: 100%; /* 容器宽度,可根据需要调整 */
margin: auto; /* 居中显示 */
padding: 5px; /* 容器内边距 */
border: 2px dashed #333; /* 虚线边框 */
box-sizing: border-box; /* 边框计算在宽度内 */
}
.video-item {
width: 100%; /* 视频宽度 */
height: auto; /* 视频高度自适应 */
display: block; /* 显示视频 */
}
</style>
<link rel="stylesheet" href="./files/bulma.min.css">
<link rel="stylesheet" href="./files/bulma-carousel.min.css">
<link rel="stylesheet" href="./files/bulma-slider.min.css">
Expand Down Expand Up @@ -143,6 +160,58 @@ <h2 class="title is-2" style="text-align: center;">Framework of ManiCM</h2>
<h2 class="title is-2">Results</h2>
</div>
</div>




<div class="container">
<!-- Abstract. -->
<div class="columns is-centered has-text-centered">
<div class="column is-two-thirds">
<div class="content has-text-justified" style="font-size: larger; font-weight: 800">
31 tasks (Adroit and MetaWorld)
</div>
<div class="video-container" id="videoContainer">
<!-- 视频标签将通过JavaScript动态添加 -->
</div>
<script>
// 获取视频容器
var container = document.getElementById('videoContainer');

// 函数用于创建视频元素并添加到容器
function createVideoElement(index) {
var video = document.createElement('video');
video.className = 'video-item';
video.setAttribute('controls', '');
video.setAttribute('autoplay', '');
video.setAttribute('loop', '');
video.muted = true; // 静音自动播放

var source = document.createElement('source');
source.src = 'videos/' + index + '.mp4';
source.type = 'video/mp4';

video.appendChild(source);

// 视频加载完成后自动播放
video.addEventListener('loadedmetadata', function() {
video.style.display = 'block'; // 显示视频
video.play(); // 播放视频
});

return video;
}

// 动态创建并添加32个视频到页面
for (var i = 1; i <= 32; i++) {
container.appendChild(createVideoElement(i));
}
</script>
<div class="content has-text-justified" style="margin-top: 10px">
We conduct our experiments in the well-recognized MetaWorld and Adroit benchmarks, resulting in a total of 31 tasks. These tasks range from simple pick-and-place tasks to more challenging scenarios such as dexterous manipulation, which ensure that the model is effective across various scenarios.
</div>
</div>
</div>
<div class="container">
<!-- Abstract. -->
<div class="columns is-centered has-text-centered">
Expand Down Expand Up @@ -174,7 +243,6 @@ <h2 class="title is-2">Results</h2>
</div>
</div>
</div>

</section>

<section class="section" style="margin-top: -60px">
Expand Down
61 changes: 61 additions & 0 deletions tmp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>32 MP4 Videos in Grid</title>
<style>
.video-container {
display: grid;
grid-template-columns: repeat(8, 1fr); /* 8列 */
grid-template-rows: repeat(4, auto); /* 4行,每行的高度根据内容自动调整 */
gap: 10px; /* 网格项之间的间隙 */
width: 100%; /* 容器宽度 */
margin: auto; /* 居中显示 */
}
.video-item {
width: 100%; /* 视频宽度 */
height: auto; /* 视频高度自适应 */
}
</style>
</head>
<body>

<div class="video-container">
<!-- 32个视频标签 -->
<video class="video-item" controls>
<source src="videos/1.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<video class="video-item" controls>
<source src="videos/2.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

<!-- ... 以下是自动生成的剩余视频标签 ... -->
<video class="video-item" controls>
<source src="videos/32.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>

</body>
<script>
// 使用JavaScript动态生成剩余的视频标签
var container = document.querySelector('.video-container');
for (var i = 5; i <= 31; i++) {
var video = document.createElement('video');
video.className = 'video-item';
video.setAttribute('controls', '');

var source = document.createElement('source');
source.src = 'videos/' + i + '.mp4';
source.type = 'video/mp4';

video.appendChild(source);
video.innerHTML += 'Your browser does not support the video tag.';

container.appendChild(video);
}
</script>
</html>
Binary file added videos/1.mp4
Binary file not shown.
Binary file added videos/10.mp4
Binary file not shown.
Binary file added videos/11.mp4
Binary file not shown.
Binary file added videos/12.mp4
Binary file not shown.
Binary file added videos/13.mp4
Binary file not shown.
Binary file added videos/14.mp4
Binary file not shown.
Binary file added videos/15.mp4
Binary file not shown.
Binary file added videos/16.mp4
Binary file not shown.
Binary file added videos/17.mp4
Binary file not shown.
Binary file added videos/18.mp4
Binary file not shown.
Binary file added videos/19.mp4
Binary file not shown.
Binary file added videos/2.mp4
Binary file not shown.
Binary file added videos/20.mp4
Binary file not shown.
Binary file added videos/21.mp4
Binary file not shown.
Binary file added videos/22.mp4
Binary file not shown.
Binary file added videos/23.mp4
Binary file not shown.
Binary file added videos/24.mp4
Binary file not shown.
Binary file added videos/25.mp4
Binary file not shown.
Binary file added videos/26.mp4
Binary file not shown.
Binary file added videos/27.mp4
Binary file not shown.
Binary file added videos/28.mp4
Binary file not shown.
Binary file added videos/29.mp4
Binary file not shown.
Binary file added videos/3.mp4
Binary file not shown.
Binary file added videos/30.mp4
Binary file not shown.
Binary file added videos/31.mp4
Binary file not shown.
Binary file added videos/32.mp4
Binary file not shown.
Binary file added videos/4.mp4
Binary file not shown.
Binary file added videos/5.mp4
Binary file not shown.
Binary file added videos/6.mp4
Binary file not shown.
Binary file added videos/7.mp4
Binary file not shown.
Binary file added videos/8.mp4
Binary file not shown.
Binary file added videos/9.mp4
Binary file not shown.

0 comments on commit eb7d793

Please sign in to comment.