# 🎬 VIDEO DQ - New Features Guide ## Feature 1: Rumble Support 🎬 Rumble is now fully supported as a platform. ### Single Download from Rumble ```powershell .\Download-Video.ps1 -URL "https://rumble.com/v123456-video-title.html" ``` Platform will be **auto-detected** from the URL. ### Batch Download with Rumble In your `videos.txt`: ``` https://rumble.com/v123456-video-title.html https://rumble.com/v789012-another-video.html https://www.youtube.com/watch?v=ABC123|youtube ``` Run: ```powershell .\Download-Batch.ps1 -ListFile "videos.txt" ``` --- ## Feature 2: Custom Clips (Start/End Time) ✂️ Create **custom clips** from full videos by specifying start and end times. ### Time Formats Supported All of these work: - **Seconds:** `30` or `150` - **MM:SS format:** `1:30` or `2:45` - **HH:MM:SS format:** `0:01:30` or `1:23:45` ### Examples #### **Simple Clip - Last 30 seconds** ```powershell .\Download-Video.ps1 -URL "https://x.com/..." -StartTime "0" -EndTime "30" ``` #### **Clip from 1 minute to 2 minutes** ```powershell .\Download-Video.ps1 -URL "https://instagram.com/..." -StartTime "1:00" -EndTime "2:00" ``` #### **Clip with minutes:seconds** ```powershell .\Download-Video.ps1 -URL "https://tiktok.com/..." -StartTime "30" -EndTime "1:30" ``` #### **Clip with hours:minutes:seconds** ```powershell .\Download-Video.ps1 -URL "https://youtube.com/..." -StartTime "0:05:00" -EndTime "0:10:30" ``` #### **Clip with custom filename** ```powershell .\Download-Video.ps1 ` -URL "https://x.com/..." ` -StartTime "10" ` -EndTime "45" ` -CustomFilename "my-custom-clip" ``` --- ## 📖 Usage Examples ### Download Full Video (No Clipping) ```powershell # Auto-detect platform .\Download-Video.ps1 -URL "https://rumble.com/v123456-video.html" # Explicit platform .\Download-Video.ps1 -URL "https://x.com/user/status/123" -Platform "twitter" # With custom filename .\Download-Video.ps1 -URL "https://instagram.com/..." -CustomFilename "vacation-reel" ``` ### Create Custom Clips ```powershell # First 10 seconds .\Download-Video.ps1 -URL "https://youtube.com/..." -EndTime "10" # Skip first 30 seconds, take 60 seconds total .\Download-Video.ps1 -URL "https://tiktok.com/..." -StartTime "30" -EndTime "1:30" # Extract middle section (2 min to 4 min) .\Download-Video.ps1 -URL "https://facebook.com/..." -StartTime "2:00" -EndTime "4:00" # Last 15 seconds of a video .\Download-Video.ps1 -URL "https://instagram.com/..." -StartTime "999:99" -EndTime "" # (yt-dlp will use the actual end time if you go past it) ``` --- ## 📋 Batch File with Custom Clips Create `clips.txt`: ``` # Format: URL|[platform]|[start-end as start:end]|[filename] # Simple clips https://x.com/user/status/123|twitter||first-10-seconds:10 https://instagram.com/reel/abc|instagram||middle-section:1:00:2:00 # Full videos (no clip) https://youtube.com/watch?v=xyz|youtube https://rumble.com/v123456|rumble||full-video # With custom names https://tiktok.com/video/456||30:60|my-custom-clip https://facebook.com/video/789|facebook|0:15|banner-section ``` **Run:** ```powershell .\Download-Batch.ps1 -ListFile "clips.txt" ``` --- ## 🎯 Rumble Platform Details ### Supported Features ✅ Full video download ✅ Custom clips (start/end time) ✅ Custom filenames ✅ Duplicate detection by video ID ✅ Auto-platform detection ### Rumble URL Examples ``` https://rumble.com/v123456-video-title.html https://rumble.com/v789012-another-one.html ``` ### Example ```powershell # Download full Rumble video .\Download-Video.ps1 -URL "https://rumble.com/v123456-video-title.html" # Create 10-second clip from Rumble .\Download-Video.ps1 -URL "https://rumble.com/v123456-video-title.html" -EndTime "10" -CustomFilename "rumble-clip" ``` --- ## 🔍 How Clips Work ### Behind the Scenes 1. **Download** - yt-dlp downloads the full video 2. **Trim** - ffmpeg trims using start/end times 3. **Encode** - Re-encodes with H.264 video + AAC audio 4. **Save** - Saves trimmed video with metadata ### Command Sent to Server ``` POST /api/download { "url": "https://x.com/user/status/123", "platform": "twitter", "startTime": "10", "endTime": "45", "filename": "my-clip" } ``` ### Log Output ``` 📥 URL: https://x.com/user/status/123 ✂️ Custom Clip: 10 → 45 🎬 Preparing video trimming with ffmpeg... ⏱️ Trim: Start=10s End=45s 🔍 Video ID: 2046667149083570405 ⚙️ Running yt-dlp... ✓ Downloaded: my-clip.mp4 (12.3 MB) ``` --- ## 📊 Supported Platforms (All 7) | Platform | Auto-Detect | Clips | Status | |----------|------------|-------|--------| | 📷 Instagram | `instagram.com` | ✅ | Full support | | 👥 Facebook | `facebook.com` | ✅ | Full support | | 🎵 TikTok | `tiktok.com` | ✅ | Full support | | 🎥 YouTube | `youtube.com`, `youtu.be` | ✅ | Full support | | 𝕏 Twitter | `twitter.com`, `x.com` | ✅ | Full support | | 💼 LinkedIn | `linkedin.com` | ✅ | Full support | | 🎬 Rumble | `rumble.com` | ✅ | Full support | --- ## ⚡ Advanced Usage ### Create Montage from Multiple Clips ```powershell # Download clips from different platforms .\Download-Video.ps1 -URL "https://x.com/..." -StartTime "5" -EndTime "15" -CustomFilename "clip1" .\Download-Video.ps1 -URL "https://instagram.com/..." -StartTime "10" -EndTime "20" -CustomFilename "clip2" .\Download-Video.ps1 -URL "https://youtube.com/..." -StartTime "30" -EndTime "45" -CustomFilename "clip3" # Then use ffmpeg to concatenate: # ffmpeg -i clip1.mp4 -i clip2.mp4 -i clip3.mp4 ... montage.mp4 ``` ### Extract Only Audio from Video You can use clips to extract just the audio portion: ```powershell # Download and trim .\Download-Video.ps1 -URL "https://youtube.com/..." -StartTime "1:00" -EndTime "2:00" -CustomFilename "audio-clip" # Then extract audio with ffmpeg # ffmpeg -i audio-clip.mp4 -q:a 0 -map a audio-clip.mp3 ``` --- ## 🐛 Troubleshooting ### Clip Never Completes If video trimming takes a long time: - Larger videos take longer to re-encode - Check CPU/disk space on NAS - Shorter clips = faster trimming ### Clip Quality Issues - The clip is re-encoded with ffmpeg - Original quality might be slightly reduced - Use longer clips to preserve quality better ### Invalid Time Format ```powershell # ✅ VALID -StartTime "10" -StartTime "1:30" -StartTime "0:01:30" # ❌ INVALID -StartTime "1m30s" -StartTime "1.5 minutes" ``` --- ## 📝 Summary **New Capabilities:** - ✅ **Rumble Support** - 7th platform now fully supported - ✅ **Custom Clips** - Create clips with start/end times - ✅ **Auto-Detection** - Platform detected from URL - ✅ **Flexible Timing** - Seconds, MM:SS, or HH:MM:SS - ✅ **All Platforms** - Works with all 7 supported platforms - ✅ **Batch Support** - Clips work in batch files too **Next Steps:** 1. Update your PowerShell scripts (Download-Video.ps1, Download-Batch.ps1) 2. Restart videoDQ service: `pm2 restart videoDQ` 3. Test with a simple clip: `.\Download-Video.ps1 -URL "..." -EndTime "15"` 4. Try Rumble URLs --- **Enjoy your new clipping capabilities!** 🎬✂️