83 lines
2.3 KiB
Bash
Executable File
83 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# 检查视频生成进度
|
|
|
|
echo "======================================"
|
|
echo " 🎥 视频生成进度监控"
|
|
echo "======================================"
|
|
echo ""
|
|
|
|
# 检查进程是否在运行
|
|
if ps aux | grep -q "[v]isualize_results_with_video"; then
|
|
echo "✅ 状态: 生成中..."
|
|
echo ""
|
|
|
|
# 获取帧数
|
|
FRAMES=$(ls /workspace/bevfusion/visualizations/temp_frames 2>/dev/null | wc -l)
|
|
TOTAL=6019
|
|
|
|
echo "📊 进度信息:"
|
|
echo " 已生成帧数: $FRAMES / $TOTAL"
|
|
|
|
# 计算百分比
|
|
if [ $FRAMES -gt 0 ]; then
|
|
PERCENT=$(echo "scale=2; $FRAMES / $TOTAL * 100" | bc)
|
|
echo " 完成百分比: ${PERCENT}%"
|
|
|
|
# 进度条
|
|
PROGRESS=$(echo "scale=0; $FRAMES / $TOTAL * 50" | bc)
|
|
printf " 进度条: ["
|
|
for i in $(seq 1 50); do
|
|
if [ $i -le $PROGRESS ]; then
|
|
printf "="
|
|
else
|
|
printf " "
|
|
fi
|
|
done
|
|
printf "] ${PERCENT}%%\n"
|
|
fi
|
|
|
|
echo ""
|
|
echo "💻 进程状态:"
|
|
ps aux | grep "[v]isualize_results_with_video" | awk '{print " CPU: " $3 "% | 内存: " $4 "% | 运行时间: " $10}'
|
|
|
|
echo ""
|
|
echo "⏱️ 预计剩余时间: 约 5-10 分钟"
|
|
|
|
echo ""
|
|
echo "📁 临时文件:"
|
|
du -sh /workspace/bevfusion/visualizations/temp_frames 2>/dev/null | awk '{print " 临时帧大小: " $1}'
|
|
|
|
else
|
|
echo "⏹️ 状态: 已完成或未运行"
|
|
echo ""
|
|
|
|
# 检查视频文件
|
|
if [ -f "/workspace/bevfusion/visualizations/bevfusion_results.mp4" ]; then
|
|
echo "✅ 视频文件已生成!"
|
|
ls -lh /workspace/bevfusion/visualizations/bevfusion_results.mp4 | awk '{print " 文件大小: " $5}'
|
|
echo ""
|
|
echo "🎬 视频信息:"
|
|
echo " 路径: visualizations/bevfusion_results.mp4"
|
|
echo " 帧率: 10 FPS"
|
|
echo " 总帧数: 6019"
|
|
echo " 时长: 约10分钟"
|
|
else
|
|
echo "⚠️ 视频文件未找到"
|
|
echo ""
|
|
echo "📋 查看日志:"
|
|
echo " tail -50 video_generation.log"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "======================================"
|
|
echo "提示: 再次运行此脚本查看最新进度"
|
|
echo " bash check_video_progress.sh"
|
|
echo "======================================"
|
|
|
|
|
|
|
|
|
|
|
|
|