121 lines
2.6 KiB
Markdown
121 lines
2.6 KiB
Markdown
# OBS Auto-Upload Setup Guide
|
|
|
|
## How It Works
|
|
|
|
When you **record** in OBS, the file watcher automatically:
|
|
1. Detects when you stop recording (file size stabilizes)
|
|
2. Uploads the video to Cloudflare R2
|
|
3. Copies the public URL to your clipboard
|
|
4. Optionally deletes the local file (if enabled)
|
|
|
|
## Quick Setup
|
|
|
|
### 1. Start the File Watcher
|
|
|
|
In WSL terminal:
|
|
|
|
```bash
|
|
cd ~/Github/obs-r2-uploader
|
|
./start-obs-watcher.sh
|
|
```
|
|
|
|
**Leave this running in the background!**
|
|
|
|
### 2. Record in OBS
|
|
|
|
1. Open OBS Studio (Windows)
|
|
2. Click **Start Recording** (not Stream!)
|
|
3. Do your recording
|
|
4. Click **Stop Recording**
|
|
5. Wait ~5 seconds for upload to complete
|
|
6. Public URL is automatically copied to your clipboard!
|
|
|
|
### 3. Access Your Video
|
|
|
|
- **Direct link**: Paste from clipboard (e.g., `https://videos.jeffemmett.com/2025-11-22_15-30-45.mkv`)
|
|
- **Gallery**: Visit `https://videos.jeffemmett.com/gallery`
|
|
- **Admin Panel**: `https://videos.jeffemmett.com/admin`
|
|
|
|
## Configuration Options
|
|
|
|
### Auto-Delete Local Files
|
|
|
|
Edit `.env`:
|
|
|
|
```env
|
|
AUTO_DELETE_AFTER_UPLOAD=true
|
|
```
|
|
|
|
This will automatically delete local recordings after successful upload.
|
|
|
|
### Change Recording Directory
|
|
|
|
If you change OBS recording path:
|
|
|
|
1. In OBS: Settings → Output → Recording Path
|
|
2. Update `.env`:
|
|
```env
|
|
OBS_RECORDING_DIR=/mnt/c/Users/jeffe/NewPath
|
|
```
|
|
|
|
## Running at Startup (Optional)
|
|
|
|
### Option 1: Windows Startup (Task Scheduler)
|
|
|
|
1. Open Task Scheduler
|
|
2. Create Basic Task
|
|
3. Trigger: At startup
|
|
4. Action: Start a program
|
|
- Program: `wsl.exe`
|
|
- Arguments: `bash -c "cd ~/Github/obs-r2-uploader && ./start-obs-watcher.sh"`
|
|
|
|
### Option 2: Manual Start
|
|
|
|
Just run the script whenever you plan to record:
|
|
```bash
|
|
./start-obs-watcher.sh
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Uploads not working?
|
|
|
|
Check if watcher is running:
|
|
```bash
|
|
ps aux | grep file_watcher
|
|
```
|
|
|
|
### Can't access Windows files?
|
|
|
|
Make sure WSL can see Windows:
|
|
```bash
|
|
ls /mnt/c/Users/jeffe/Videos
|
|
```
|
|
|
|
### Wrong recording directory?
|
|
|
|
Check OBS settings:
|
|
- Settings → Output → Recording → Recording Path
|
|
|
|
## Pro Tips
|
|
|
|
1. **Run in tmux/screen** so it survives terminal closes:
|
|
```bash
|
|
tmux new -s obs-watcher
|
|
./start-obs-watcher.sh
|
|
# Press Ctrl+B then D to detach
|
|
```
|
|
|
|
2. **Check upload status**:
|
|
The watcher prints status messages for each upload
|
|
|
|
3. **Test with a short recording** before your important streams
|
|
|
|
4. **Videos are shareable immediately** at videos.jeffemmett.com
|
|
|
|
## Need Help?
|
|
|
|
- Check logs in the terminal where watcher is running
|
|
- Test manual upload: `./scripts/upload.sh /mnt/c/Users/jeffe/Videos/test.mkv`
|
|
- Verify credentials in `.env` file
|