โปรแกรมสำหรับดาวน์โหลดและถอดรหัสวิดีโอจาก Be Online แล้วแปลงเป็นไฟล์ MP4 คุณภาพสูง
A powerful tool for downloading and decrypting Be Online video streams, converting them to high-quality MP4 files
|
|
| Component | Version | Status |
|---|---|---|
| Node.js | >= 16.0.0 |
|
| FFmpeg | >= 4.0.0 |
|
| TypeScript | >= 4.5.0 |
|
| Memory | >= 1GB RAM |
|
| Storage | >= 5GB Free |
📖 Need detailed setup instructions? Check out our Complete Setup Guide for platform-specific installation steps, troubleshooting, and verification.
🖥️ Step 1: Clone Repository
# Clone the repository
git clone https://github.com/ImJustNon/Be-Engineer-Downloader.git
# Navigate to project directory
cd Be-Engineer-Downloader
# Check if git clone was successful
ls -la📚 Step 2: Install Dependencies
# Install all required packages
npm install
# Verify installation
npm list --depth=0🎬 Step 3: Install FFmpeg
Choose your operating system:
| OS | Command | Package Manager |
|---|---|---|
| macOS | brew install ffmpeg |
Homebrew |
| Windows | choco install ffmpeg |
Chocolatey |
| Ubuntu/Debian | sudo apt update && sudo apt install ffmpeg |
APT |
| CentOS/RHEL | sudo yum install ffmpeg |
YUM |
| Arch Linux | sudo pacman -S ffmpeg |
Pacman |
| Manual | Download from official site | - |
Verify FFmpeg installation:
ffmpeg -version
⚠️ Important: The encryption key is required and must be obtained from the video source.
🔍 How to Find Encryption Key
-
Open Browser Developer Tools
- Press
F12orCtrl+Shift+I(Windows/Linux) - Press
Cmd+Option+I(macOS)
- Press
-
Navigate to Network Tab
- Click on the "Network" tab
- Enable "Preserve log" if available
-
Filter Network Requests
Filter by: .key OR .m3u8 OR encryption -
Play the Target Video
- Start playing the video you want to download
- Watch for network requests
-
Locate Key File
- Look for files named like:
encryption.keykey.key*.key
- Right-click → "Save as..." →
enckeybeonline.key
- Look for files named like:
-
Place in Project Root
Be-Engineer-Downloader/ ├── enckeybeonline.key ← Place your key file here ├── package.json └── src/
Edit src/index.ts with your video details:
const beeng = new BeEngDL({
startSegment: 0, // Starting segment (usually 0)
url: "YOUR_VIDEO_URL", // Video stream URL
identifier: "<<>>", // Segment number placeholder
encryptKey: "" // Leave empty (reads from key file)
});📋 Configuration Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
startSegment |
number |
First segment to download | 0, 10, 50 |
url |
string |
Base URL with identifier | See URL section |
identifier |
string |
Segment placeholder | "<<>>", "[]", "$$$" |
encryptKey |
string |
Leave empty (auto-loaded) | "" |
📊 Step-by-Step URL Discovery
-
Open Developer Tools
F12 → Network Tab → Enable "Preserve log" -
Set Network Filters
Filter: .ts OR .m3u8 OR segment -
Play Target Video
- Start video playback
- Let it buffer for a few seconds
-
Identify Segment Pattern Look for URLs like:
segment-0.ts 0.ts chunk_000000.ts video_001.ts -
Extract Base URL From the segment URL, remove the number part
| Original Segment URL | Transformed URL | Identifier |
|---|---|---|
|
|
|
|
|
|
|
|
|
// Example configuration for Be Online video
const beeng = new BeEngDL({
startSegment: 0,
url: "https://vdo.inclass.me/beonline/course/video<<>>.ts",
identifier: "<<>>",
encryptKey: "" // Auto-loaded from enckeybeonline.key
});🔧 Advanced URL Patterns
Common identifier patterns:
<<>>- Most common for Be Online[]- Alternative bracket style$$$- Dollar sign placeholder###- Hash placeholder{num}- Brace style
URL validation checklist:
- ✅ Base URL is accessible
- ✅ Identifier correctly placed
- ✅ First segment (0) exists
- ✅ Pattern matches actual segments
Be-Engineer-Downloader/
├── 📄 enckeybeonline.key # ไฟล์ encryption key
├── 📄 package.json
├── 📄 tsconfig.json
├── 📁 cache/ # ไฟล์ชั่วคราว
│ ├── 📁 ffmpeg/ # ไฟล์สำหรับ FFmpeg
│ └── 📁 stream/
│ ├── 📁 encrypted/ # ไฟล์ TS ที่เข้ารหัส
│ └── 📁 decrypted/ # ไฟล์ TS ที่ถอดรหัสแล้ว
├── 📁 output/ # ไฟล์ MP4 ที่เสร็จแล้ว
└── 📁 src/
├── 📄 index.ts # ไฟล์หลัก
└── 📁 class/
├── 📄 BeEngDL.class.ts # คลาสหลัก
├── 📄 Convert.class.ts # การแปลงไฟล์
├── 📄 DecryptTS.class.ts # การถอดรหัส
└── 📄 DownloadTS.class.ts # การดาวน์โหลด
# Start the download process
npm run dev
# Alternative: Direct TypeScript execution
npx tsx src/index.tsgraph LR
A[🎬 Video URL] --> B[📥 Download Segments]
B --> C[🔐 Decrypt Files]
C --> D[🎞️ Merge & Convert]
D --> E[✅ MP4 Output]
📋 Stage 1: Download Encrypted Segments
🔄 Processing Stage 1/3: Download
┌─────────────────────────────────────┐
│ • Fetching segment URLs sequentially│
│ • Downloading encrypted TS files │
│ • Storing in cache/stream/encrypted/│
│ • Auto-detecting end of stream │
└─────────────────────────────────────┘
What happens:
- Downloads segments starting from
startSegment - Continues until HTTP 404 (end of stream)
- Stores encrypted files temporarily
- Provides real-time progress updates
🔓 Stage 2: Decrypt Files
🔐 Processing Stage 2/3: Decrypt
┌─────────────────────────────────────┐
│ • Loading encryption key from file │
│ • Applying AES-128-CBC decryption │
│ • Validating TS sync byte (0x47) │
│ • Storing in cache/stream/decrypted/│
└─────────────────────────────────────┘
What happens:
- Reads
enckeybeonline.keyautomatically - Decrypts each segment using AES-128-CBC
- Validates file integrity (TS sync byte)
- Skips corrupted segments
🎬 Stage 3: Merge & Convert
🎞️ Processing Stage 3/3: Convert
┌─────────────────────────────────────┐
│ • Creating FFmpeg concat list │
│ • Merging all TS segments │
│ • Converting to MP4 format │
│ • Optimizing for playback │
└─────────────────────────────────────┘
What happens:
- Generates FFmpeg input file list
- Concatenates segments in correct order
- Converts to MP4 with optimal settings
- Outputs final video file
🔍 View Complete Process Log
🎬 Be Engineer Downloader v1.0.0
================================================
📥 Step 1) Download TS Stream file with encryption
[ Info ] Deleted /cache/stream dir
[ Info ] Created /cache/stream dir
[ Info ] Starting download from segment: 0
⏳ Downloading segments...
✅ write file success : 0 (2.1 MB)
✅ write file success : 1 (2.3 MB)
✅ write file success : 2 (2.0 MB)
...
✅ write file success : 149 (1.8 MB)
❌ Segment 150: 404 Not Found (End of stream)
📊 Download Summary:
• Total segments: 150
• Total size: 312.5 MB
• Duration: 2m 34s
• Status: ✅ Complete
🔐 Step 2) Decrypt segments
[ Info ] Loading encryption key: enckeybeonline.key
[ Info ] Starting decryption process...
🔓 Decrypting segments...
✅ Decrypted: stream-segment-0.ts (sync: 0x47 ✓)
✅ Decrypted: stream-segment-1.ts (sync: 0x47 ✓)
...
✅ Decrypted: stream-segment-149.ts (sync: 0x47 ✓)
📊 Decryption Summary:
• Processed: 150/150 segments
• Success rate: 100%
• Status: ✅ Complete
🎞️ Step 3) Concat and Convert to MP4
[ Info ] Creating file list for FFmpeg
[ Info ] Found 150 decrypted TS files
[ Info ] Converting to MP4...
🎬 FFmpeg Processing...
frame= 7200 fps= 85 q=28.0 size= 187392kB time=00:04:00.00
✅ Conversion complete!
📊 Final Output:
• File: Physics1_M2_Introduction.mp4
• Size: 245.7 MB
• Duration: 4:00:15
• Resolution: 1920x1080
• Status: ✅ Ready for playback
🎉 Process completed successfully!โปรแกรมรองรับ identifier หลายแบบ:
// สำหรับ URL ที่ใช้ <<>>
identifier: "<<>>"
// สำหรับ URL ที่ใช้ []
identifier: "[]"
// สำหรับ URL ที่ใช้ $$$
identifier: "$$$"
// หรือสตริงอื่นๆ ตามต้องการ
identifier: "SEGMENT_NUMBER"const beeng = new BeEngDL({
startSegment: 50, // เริ่มจากเซกเมนต์ที่ 50
url: "...",
identifier: "<<>>",
encryptKey: ""
});❌ FFmpeg Not Found
Error Message:
Error: ffmpeg not found
Command failed: ffmpeg -versionSolutions:
-
Install FFmpeg:
# macOS brew install ffmpeg # Windows choco install ffmpeg # Ubuntu/Debian sudo apt install ffmpeg
-
Verify Installation:
ffmpeg -version which ffmpeg # Check PATH -
Manual PATH Setup:
export PATH="/path/to/ffmpeg/bin:$PATH"
🔑 Encryption Key Issues
Error Messages:
Error: ENOENT: no such file or directory, open 'enckeybeonline.key'
[ Error ] Fail to decrypt : stream-segment-X.tsSolutions:
-
Check Key File Location:
ls -la enckeybeonline.key # Should be in project root -
Verify Key File Content:
file enckeybeonline.key # Should show: data hexdump -C enckeybeonline.key | head # Should show binary data
-
Re-obtain Key:
- Use browser DevTools → Network tab
- Filter by
.keyfiles - Download correct encryption key
🌐 URL & Network Issues
Error Messages:
404 Not Found
Connection timeout
ENOTFOUND domain.comDiagnostic Commands:
# Test URL accessibility
curl -I "YOUR_SEGMENT_URL_HERE"
# Test with first segment (replace <<>> with 0)
curl -I "https://example.com/video0.ts"
# Check DNS resolution
nslookup your-domain.comSolutions:
-
Verify URL Pattern:
- Check identifier placement
- Test first segment manually
- Confirm segment numbering
-
Network Issues:
# Check internet connection ping google.com # Try with different DNS export DNS_SERVER=8.8.8.8
💾 Storage & Permission Issues
Error Messages:
EACCES: permission denied
ENOSPC: no space left on deviceSolutions:
-
Check Disk Space:
df -h . # Check available space du -sh cache/ output/ # Check folder sizes
-
Fix Permissions:
chmod 755 . # Fix directory permissions sudo chown -R $USER:$USER . # Fix ownership
-
Clean Cache:
rm -rf cache/ # Clean temporary files mkdir -p cache/stream/{encrypted,decrypted}
🔍 Quick System Check
Run this comprehensive check:
#!/bin/bash
echo "🔍 Be Engineer Downloader - System Diagnostics"
echo "=============================================="
echo "📦 Node.js Version:"
node --version || echo "❌ Node.js not installed"
echo "🎬 FFmpeg Version:"
ffmpeg -version 2>/dev/null | head -1 || echo "❌ FFmpeg not installed"
echo "📁 Project Structure:"
ls -la enckeybeonline.key 2>/dev/null && echo "✅ Key file exists" || echo "❌ Key file missing"
ls -la package.json 2>/dev/null && echo "✅ Package.json exists" || echo "❌ Package.json missing"
echo "💾 Disk Space:"
df -h . | tail -1
echo "🔧 Dependencies:"
npm list --depth=0 2>/dev/null | grep -E "(axios|typescript)" || echo "❌ Dependencies missing"
echo "=============================================="
echo "✅ Diagnostic complete"| Issue Type | Contact Method | Response Time |
|---|---|---|
| 🐛 Bugs | GitHub Issues | 24-48 hours |
| ❓ Questions | Discussions | 1-3 days |
| 💡 Features | Feature Request | 1 week |
🔧 Constructor Options
interface BeEngOptionSpecs {
startSegment: number; // Starting segment number
url: string; // Video stream URL with identifier
identifier: string; // Placeholder for segment numbers
encryptKey: string; // Leave empty (auto-loaded)
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
startSegment |
number |
✅ | First segment to download | 0, 10, 50 |
url |
string |
✅ | Stream URL with placeholder | "https://example.com/video<<>>.ts" |
identifier |
string |
✅ | Segment number placeholder | "<<>>", "[]", "$$$" |
encryptKey |
string |
✅ | Leave empty (auto-loaded) | "" |
⚡ Methods
Downloads encrypted TS segments sequentially.
await beeng.download();Features:
- ✅ Automatic segment detection
- ✅ Progress tracking
- ✅ Error handling & retry logic
- ✅ Cache management
Decrypts downloaded segments using AES-128-CBC.
await beeng.decrypt();Features:
- ✅ Automatic key loading
- ✅ TS sync byte validation
- ✅ Batch processing
- ✅ Error reporting
Merges decrypted segments into MP4.
await beeng.concatAndConvert();Features:
- ✅ FFmpeg integration
- ✅ Optimal MP4 encoding
- ✅ File size optimization
- ✅ Quality preservation
📖 Basic Usage
import { BeEngDL } from "./class/BeEngDL.class";
const downloader = new BeEngDL({
startSegment: 0,
url: "https://example.com/video<<>>.ts",
identifier: "<<>>",
encryptKey: ""
});
// Sequential processing
await downloader.download();
await downloader.decrypt();
await downloader.concatAndConvert();🔄 Advanced Usage
// Resume from specific segment
const resumeDownloader = new BeEngDL({
startSegment: 50, // Resume from segment 50
url: "https://example.com/video<<>>.ts",
identifier: "<<>>",
encryptKey: ""
});
// Error handling
try {
await resumeDownloader.download();
console.log("✅ Download completed");
await resumeDownloader.decrypt();
console.log("✅ Decryption completed");
await resumeDownloader.concatAndConvert();
console.log("✅ Conversion completed");
} catch (error) {
console.error("❌ Process failed:", error);
}🚀 Quick Contribution Guide
-
Fork & Clone
git clone https://github.com/YOUR_USERNAME/Be-Engineer-Downloader.git cd Be-Engineer-Downloader -
Create Branch
git checkout -b feature/your-feature-name
-
Make Changes
- Follow existing code style
- Add tests if applicable
- Update documentation
-
Commit & Push
git commit -m "✨ Add: your feature description" git push origin feature/your-feature-name -
Create Pull Request
- Use descriptive title
- Explain changes made
- Reference related issues
Non-Commercial License - Free for personal and educational use
- FFmpeg Team - For excellent video processing tools
- Node.js Community - For the robust ecosystem
- TypeScript Team - For type safety and developer experience
- Contributors - For making this project better
Educational Purpose Only
This tool is created for educational and research purposes only. Please respect copyright laws and terms of service of content providers. Users are responsible for ensuring their usage complies with applicable laws and regulations.
โปรแกรมนี้สร้างขึ้นเพื่อการศึกษาเท่านั้น กรุณาใช้งานภายในกรอบกฎหมายลิขสิทธิ์
Made with ❤️ by ImJustNon
⭐ If this project helped you, please consider giving it a star! ⭐
| Guide | Description | Link |
|---|---|---|
| 🚀 Setup Guide | Complete installation and configuration | docs/SETUP.md |
| 📖 Usage Guide | Detailed usage examples and best practices | docs/USAGE.md |
| 🔧 Troubleshooting | Common issues and solutions | README.md#troubleshooting |