File size: 6,283 Bytes
51e419e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | # 📖 User Guide - Sinhala Subtitle Hardcoder
## Table of Contents
1. [Quick Start](#quick-start)
2. [Detailed Instructions](#detailed-instructions)
3. [Supported Formats](#supported-formats)
4. [Troubleshooting](#troubleshooting)
5. [Tips & Best Practices](#tips--best-practices)
6. [FAQ](#faq)
---
## Quick Start
### 3 Simple Steps:
1. **Add Video Links** - Paste one or more video URLs (one per line)
2. **Upload Subtitles** - Upload your .srt file with Sinhala text
3. **Click Process** - Wait for processing and get PixelDrain links
That's it! 🎉
---
## Detailed Instructions
### Step 1: Prepare Your Videos
You can use videos from:
- **PixelDrain**: Copy the URL like `https://pixeldrain.com/u/abc123`
- **Direct Links**: Any direct video URL like `https://example.com/video.mp4`
**Multiple Videos:**
```
https://pixeldrain.com/u/video1
https://pixeldrain.com/u/video2
https://example.com/video3.mp4
```
### Step 2: Prepare Your Subtitle File
Your subtitle file should be in **SRT format**:
```srt
1
00:00:01,000 --> 00:00:04,000
හෙලෝ, මෙය සිංහල උපසිරැසි පරීක්ෂණයකි
2
00:00:05,000 --> 00:00:08,000
දෙවන උපසිරැසි පේළිය මෙන්න
```
**Important:**
- Must be `.srt` file
- Can be any encoding (UTF-8, UTF-16, etc.) - app will fix it
- Can have one subtitle for multiple videos
- Sinhala Unicode characters fully supported
### Step 3: Upload and Process
1. Paste video URLs in the text box (one per line)
2. Click the file upload button and select your .srt file
3. Click "🚀 Process Videos"
4. Wait for completion (time varies by video size)
5. Copy your PixelDrain links!
### Step 4: Download Your Videos
Click any PixelDrain link to:
- Download directly
- Share with others
- Stream online
---
## Supported Formats
### Video Formats
- ✅ MP4 (H.264, H.265)
- ✅ MKV
- ✅ AVI
- ✅ MOV
- ✅ WebM
- ✅ Most common video formats
### Subtitle Formats
- ✅ SRT (SubRip)
- ⚠️ Other formats: Convert to SRT first
### Encoding
- ✅ UTF-8
- ✅ UTF-16 (LE/BE)
- ✅ ISO-8859-1
- ✅ Windows-1252
- ✅ Auto-detection and conversion
---
## Troubleshooting
### Problem: "Download failed"
**Possible causes:**
- Invalid URL
- File removed from PixelDrain
- Network connection issues
**Solutions:**
- Verify URL is correct
- Try re-uploading video to PixelDrain
- Check internet connection
### Problem: "Subtitle encoding fix failed"
**Possible causes:**
- Corrupted subtitle file
- Wrong file format
**Solutions:**
- Re-save subtitle as UTF-8
- Verify file is valid SRT format
- Use a text editor to check file content
### Problem: "FFmpeg failed"
**Possible causes:**
- Corrupted video file
- Incompatible video codec
- Subtitle file has errors
**Solutions:**
- Try re-downloading the video
- Check subtitle file for errors
- Try with a different video first
### Problem: "Upload to PixelDrain failed"
**Possible causes:**
- Network issues
- File too large
- PixelDrain service down
**Solutions:**
- Wait and retry
- Check file size (max ~10GB)
- Try uploading manually to verify PixelDrain works
### Problem: Subtitles not visible in output
**Possible causes:**
- Subtitle timing issues
- Font not rendering
**Solutions:**
- Check subtitle timings match video length
- Verify Sinhala characters in subtitle file
- Preview output video to confirm
---
## Tips & Best Practices
### ✅ DO:
- Use stable internet connection
- Upload clean subtitle files (no corrupted characters)
- Test with one video first before batch processing
- Keep video URLs in a text file for easy pasting
- Use UTF-8 encoding when creating subtitles
### ❌ DON'T:
- Upload extremely large files (>5GB per video)
- Use password-protected video links
- Use subtitles with wrong timings
- Process too many videos at once (keep under 10)
- Use special characters in filenames
### Performance Tips:
**For Faster Processing:**
- Use shorter videos when possible
- Ensure good internet speed
- Process fewer videos at a time
- Use direct links when possible
**For Better Quality:**
- Use high-quality source videos
- Ensure subtitles are properly timed
- Use clean SRT files without errors
---
## FAQ
### Q: Can I use the same subtitle for multiple videos?
**A:** Yes! Just add multiple video URLs and upload one subtitle file. Perfect for multi-part series.
### Q: How long does processing take?
**A:** Depends on video length and count. Typically:
- 5-minute video: ~2-3 minutes
- 20-minute video: ~8-10 minutes
- Multiple videos: Processed in parallel (up to 3 at once)
### Q: What happens to my files?
**A:**
1. Videos are downloaded to temporary storage
2. Subtitles are hardcoded
3. Results uploaded to PixelDrain
4. All temporary files deleted automatically
### Q: Is my data private?
**A:**
- Processing happens on Hugging Face servers
- Temporary files are deleted after processing
- PixelDrain uploads are as per their privacy policy
- Consider using private Space for sensitive content
### Q: Can I customize subtitle appearance?
**A:** Currently, subtitles use:
- Font: Noto Sans Sinhala
- Size: 24px
- Color: White with black outline
- Position: Bottom of screen
For custom styling, you'll need to modify the code.
### Q: Why PixelDrain?
**A:** PixelDrain offers:
- Free hosting
- No account required
- Direct download links
- Reliable service
### Q: Can I use other upload services?
**A:** Currently only PixelDrain is supported. Contact developer for other options.
### Q: Maximum file size?
**A:** Depends on Hugging Face Space storage and PixelDrain limits:
- Recommended: Under 2GB per video
- Maximum: ~10GB (may be slower)
### Q: Can I process videos without subtitles?
**A:** No, subtitle file is required. This tool is specifically for hardcoding subtitles.
### Q: What if my subtitle file has errors?
**A:** The app automatically:
- Fixes encoding issues
- Removes invalid characters
- Preserves Sinhala Unicode
However, timing errors must be fixed manually.
---
## Need Help?
- 📧 Open an issue on GitHub
- 💬 Comment on Hugging Face Space
- 📖 Re-read this guide
- 🧪 Run test with example subtitle file
---
**Happy subtitle hardcoding! 🎬✨**
*Made for the Sinhala-speaking community with ❤️*
|