- Modify startup script to install video dependencies by default - Add MoviePy to main dependencies for easier setup - Ready to test with InterNACHI demo videos once installation completes
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# MCP Video Editor Startup Script
|
|
# This script launches the MCP Video Editor server using UV
|
|
|
|
set -e # Exit on any error
|
|
|
|
# Get the directory where this script is located
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Change to the project directory
|
|
cd "$SCRIPT_DIR"
|
|
|
|
echo "🎬 Starting MCP Video Editor..."
|
|
echo "📁 Working directory: $SCRIPT_DIR"
|
|
|
|
# Check if uv is installed
|
|
if ! command -v uv &> /dev/null; then
|
|
echo "❌ Error: UV is not installed or not in PATH"
|
|
echo "Please install UV: curl -LsSf https://astral.sh/uv/install.sh | sh"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if dependencies are installed
|
|
if [ ! -d ".venv" ] && [ ! -f "uv.lock" ]; then
|
|
echo "📦 Installing full video processing dependencies with UV..."
|
|
uv sync --extra video
|
|
fi
|
|
|
|
# Set environment variables for video processing
|
|
export VIDEO_OUTPUT_DIR="${VIDEO_OUTPUT_DIR:-./temp_videos}"
|
|
export AUDIO_OUTPUT_DIR="${AUDIO_OUTPUT_DIR:-./temp_audio}"
|
|
export MAX_VIDEO_DURATION="${MAX_VIDEO_DURATION:-3600}"
|
|
|
|
# Create output directories
|
|
mkdir -p "$VIDEO_OUTPUT_DIR"
|
|
mkdir -p "$AUDIO_OUTPUT_DIR"
|
|
|
|
echo "🎥 Video output directory: $VIDEO_OUTPUT_DIR"
|
|
echo "🔊 Audio output directory: $AUDIO_OUTPUT_DIR"
|
|
|
|
# Launch the MCP Video Editor server with UV
|
|
echo "🚀 Launching MCP Video Editor server..."
|
|
exec uv run python -m mcp_video_editor |