# 🎬 Deploying Updated videoDQ.html with Clip Features
## What's New in the Updated HTML
### ✂️ **Custom Clip Section**
A new section in Advanced Options with:
- **Start Time input** - Specify when to start clipping
- **End Time input** - Specify when to end clipping
- **Format support** - HH:MM:SS, MM:SS, or just seconds
- **Example hints** - "First 30s: 0-30 | 1-2 minutes: 1:00-2:00"
### 🎬 **Rumble Support**
Added to:
- ✅ Platform folder dropdown (Save to Folder)
- ✅ Platform filter buttons (Browse tab)
- ✅ Auto-detected from Rumble URLs
### 💼 **LinkedIn Support**
Added to:
- ✅ Platform folder dropdown
- ✅ Platform filter buttons
### 🔧 **JavaScript Updates**
The download function now:
- ✅ Captures clip start/end times
- ✅ Sends them in the API request
- ✅ Clears clip inputs after successful download
- ✅ Shows "(creating clip)" in status message
---
## Deployment Steps
### Step 1: Backup Old File
```bash
ssh user@192.168.69.105
cd /volume2/video/videoDQ
# Backup old version
cp videoDQ.html videoDQ-old.html
```
### Step 2: Upload New File
Download `videoDQ-updated.html` from the outputs folder and rename it, then upload:
```bash
# Via SCP from Windows PowerShell
scp C:\path\to\videoDQ-updated.html user@192.168.69.105:/volume2/video/videoDQ/videoDQ.html
# Or via WinSCP (drag and drop) then rename to videoDQ.html
```
### Step 3: Verify Server is Running
```bash
ssh user@192.168.69.105
pm2 status videoDQ
# Should show: online
# Restart to be safe
pm2 restart videoDQ
pm2 logs videoDQ --lines 10
```
### Step 4: Test in Browser
Open `http://192.168.69.105:3001` and check:
- ✅ Advanced Options section loads
- ✅ New "✂️ Custom Clip" section visible
- ✅ Start Time and End Time inputs present
- ✅ Rumble appears in platform dropdowns
- ✅ LinkedIn appears in platform dropdowns
---
## Testing the Features
### Test 1: Full Video Download (No Clip)
1. Paste a Twitter URL
2. Leave Start Time and End Time empty
3. Click "Download Now"
4. Should work as before ✅
### Test 2: Custom Clip
1. Paste a YouTube URL
2. In Advanced Options → Custom Clip:
- Start Time: `10`
- End Time: `30`
3. Click "Download Now"
4. Logs should show:
```
✂️ Custom Clip: 10 → 30
🎬 Preparing video trimming with ffmpeg...
⏱️ Trim: Start=10s End=30s
```
5. Downloaded file should be ~20 seconds long ✅
### Test 3: Time Format Flexibility
Test these all work:
- Start Time: `30` (seconds)
- Start Time: `0:30` (MM:SS)
- Start Time: `0:00:30` (HH:MM:SS)
All should create the same 30-second start point ✅
### Test 4: Rumble Download
1. Paste a Rumble URL: `https://rumble.com/v123456-video.html`
2. Platform should auto-detect or show Rumble in dropdown
3. Click "Download Now"
4. Should save to `/downloads/rumble/` folder ✅
### Test 5: Browse Tab Filters
1. Go to "Browse" tab
2. Check that Rumble and LinkedIn buttons appear
3. Click Rumble filter
4. Only Rumble videos should display ✅
---
## Rollback If Needed
If something goes wrong:
```bash
ssh user@192.168.69.105
cd /volume2/video/videoDQ
# Restore old version
cp videoDQ-old.html videoDQ.html
# Refresh in browser
# Ctrl+F5 (hard refresh to clear cache)
```
---
## What's Compatible
✅ **With Updated serverNas.js**
- Backend fully supports startTime and endTime
- ffmpeg trimming works
- All clip features functional
✅ **With Updated Download-Video.ps1**
- PowerShell script sends clip parameters
- Works in batch mode
✅ **Backward Compatible**
- Old URLs without clips still work
- All platforms work same as before
- No breaking changes
---
## Browser Cache Note
After deployment, if you see old version:
```
Press: Ctrl + F5 (Windows/Linux)
or: Cmd + Shift + R (Mac)
```
This does a hard refresh and clears the cache.
---
## File Comparison
### Old videoDQ.html
- 1571 lines
- 6 platforms (no Rumble, no LinkedIn)
- No clip support
- Filename only in Advanced Options
### New videoDQ-updated.html
- ~1600 lines
- 8 platforms (+ Rumble, LinkedIn)
- Full clip support with Start/End times
- Bilingual clip interface (EN/FR)
---
## Troubleshooting
### Clip inputs don't appear
- Clear browser cache: Ctrl+F5
- Check if Advanced Options panel opens
- Verify JavaScript console for errors (F12)
### Clips not working after upload
- Verify serverNas.js is updated and running: `pm2 logs videoDQ`
- Check that `ffmpeg` is available on NAS
- Check clip parameters in logs
### Rumble/LinkedIn filters missing
- Hard refresh browser: Ctrl+F5
- Check HTML file uploaded correctly
- View source (Ctrl+U) and search for "rumble"
---
## Summary
✅ **Feature Complete**
- Frontend (HTML) ✅ Updated with clip UI
- Backend (serverNas.js) ✅ Supports clip parameters
- PowerShell (scripts) ✅ Can send clip parameters
✅ **Ready to Deploy**
- videoDQ-updated.html ready to upload
- All 8 platforms supported
- Bilingual interface (EN/FR)
- Backward compatible
**Next Step:** Upload videoDQ-updated.html to NAS! 🚀