|
| 1 | +# Troubleshooting Guide |
| 2 | + |
| 3 | +This guide covers common issues you might encounter while setting up or running the AI Video Editor. |
| 4 | + |
| 5 | +## 1. FFmpeg Issues |
| 6 | + |
| 7 | +### FFmpeg not found |
| 8 | +**Symptoms**: Backend fails to start, or video processing tools return errors like "ffmpeg not found". |
| 9 | +**Solution**: |
| 10 | +- Ensure FFmpeg is installed on your system. |
| 11 | +- Add the FFmpeg binary directory to your system's PATH. |
| 12 | +- On macOS (Homebrew): `brew install ffmpeg` |
| 13 | +- On Ubuntu/Debian: `sudo apt update && sudo apt install ffmpeg` |
| 14 | +- On Windows: Download from [ffmpeg.org](https://ffmpeg.org/download.html) and add to Environment Variables. |
| 15 | + |
| 16 | +### FFmpeg version mismatch |
| 17 | +**Symptoms**: Errors during specific filtering or encoding operations. |
| 18 | +**Solution**: Ensure you are using FFmpeg 4.x or 5.x. Some advanced filters might require newer versions. |
| 19 | + |
| 20 | +## 2. MCP Server Connectivity |
| 21 | + |
| 22 | +### Server fails to connect |
| 23 | +**Symptoms**: Backend logs show "Failed to connect to MCP server [name]". |
| 24 | +**Solution**: |
| 25 | +- Check if the server's entry point exists. For example, `mcp-servers/ffmpeg-server/dist/index.js`. |
| 26 | +- If the `dist` folder is missing, run `pnpm build` from the project root. |
| 27 | +- Ensure the `node` command is available in your environment. |
| 28 | + |
| 29 | +### Tool execution timeout |
| 30 | +**Symptoms**: LLM reports a timeout or the backend logs show "Tool execution timed out". |
| 31 | +**Solution**: |
| 32 | +- Complex operations like `transcribe_audio` or `render_video` can take time. |
| 33 | +- Check system resources (CPU/RAM). |
| 34 | +- Increase the timeout in `apps/backend/src/mcp/client-manager.ts` if necessary. |
| 35 | + |
| 36 | +## 3. LLM & API Key Issues |
| 37 | + |
| 38 | +### 401 Unauthorized |
| 39 | +**Symptoms**: LLM provider returns an authentication error. |
| 40 | +**Solution**: |
| 41 | +- Double-check your API keys in `apps/backend/.env`. |
| 42 | +- Ensure there are no leading/trailing spaces in the keys. |
| 43 | +- If using GitHub Copilot, run `pnpm exec copilot` in `apps/backend` to re-authenticate. |
| 44 | + |
| 45 | +### Model not found |
| 46 | +**Symptoms**: Error stating "Model [name] not found". |
| 47 | +**Solution**: |
| 48 | +- Ensure the `LLM_MODEL` in your `.env` is supported by your provider and your specific API key tier. |
| 49 | +- Common models: `claude-3-5-sonnet-20240620`, `gpt-4o`, `gemini-1.5-pro`. |
| 50 | + |
| 51 | +## 4. Frontend & WebSocket Issues |
| 52 | + |
| 53 | +### WebSocket connection failed |
| 54 | +**Symptoms**: Frontend shows "Disconnected" or chat messages don't send. |
| 55 | +**Solution**: |
| 56 | +- Ensure the backend is running on the expected port (default 3001). |
| 57 | +- Check if `NEXT_PUBLIC_BACKEND_URL` in `apps/web/.env.local` matches your backend URL. |
| 58 | +- If running in a container or cloud environment, ensure WebSocket ports are exposed. |
| 59 | + |
| 60 | +### Mixed Content Errors |
| 61 | +**Symptoms**: Browser blocks requests to the backend. |
| 62 | +**Solution**: If the frontend is served over HTTPS, the backend must also be over HTTPS (WSS for WebSockets). For local development, HTTP/WS is fine. |
| 63 | + |
| 64 | +## 5. Whisper Server Issues |
| 65 | + |
| 66 | +### Model downloading fails |
| 67 | +**Symptoms**: Whisper server hangs or fails on the first transcription. |
| 68 | +**Solution**: |
| 69 | +- The first time it runs, it may attempt to download the Whisper model. Ensure you have an internet connection. |
| 70 | +- Check disk space. Models can be several hundred MBs to a few GBs. |
0 commit comments