Update tech_docs/dvd_rip.md
This commit is contained in:
@@ -1,3 +1,207 @@
|
|||||||
|
Here's the complete cleaned-up documentation following the optimized structure:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# **DVD Ripping Workflow Documentation**
|
||||||
|
*Last Updated: [DATE]*
|
||||||
|
|
||||||
|
## **1. Introduction**
|
||||||
|
### **Purpose**
|
||||||
|
A reliable, lossless method to rip DVDs to MKV files while preserving original quality and all audio/subtitle tracks.
|
||||||
|
|
||||||
|
### **Requirements**
|
||||||
|
- Linux system with DVD drive
|
||||||
|
- sudo/root access for mounting
|
||||||
|
- 2x DVD storage space for temporary files
|
||||||
|
|
||||||
|
### **Tool Overview**
|
||||||
|
| Tool | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `vobcopy` | Simple DVD extraction |
|
||||||
|
| `dvdbackup` | Advanced title selection |
|
||||||
|
| `ffmpeg` | Video conversion/merging |
|
||||||
|
| `lsdvd` | DVD structure analysis |
|
||||||
|
| `mpv` | Playback verification |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **2. Installation**
|
||||||
|
### **Core Tools**
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install vobcopy dvdbackup ffmpeg lsdvd
|
||||||
|
```
|
||||||
|
|
||||||
|
### **Optional Playback Support**
|
||||||
|
```bash
|
||||||
|
sudo apt install mpv
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **3. Basic Ripping Workflow**
|
||||||
|
### **3.1 Mount DVD (If Not Auto-Mounted)**
|
||||||
|
```bash
|
||||||
|
sudo mkdir -p /mnt/dvd
|
||||||
|
sudo mount /dev/sr0 /mnt/dvd
|
||||||
|
```
|
||||||
|
|
||||||
|
### **3.2 Identify Main Title**
|
||||||
|
```bash
|
||||||
|
lsdvd /dev/sr0 | grep -A 5 'Longest track'
|
||||||
|
```
|
||||||
|
*Output shows title number, duration, and chapters*
|
||||||
|
|
||||||
|
### **3.3 Ripping Methods**
|
||||||
|
#### **Method A: vobcopy (Recommended for Simplicity)**
|
||||||
|
```bash
|
||||||
|
vobcopy -l -m -o ~/dvd_rips
|
||||||
|
```
|
||||||
|
**Flags**:
|
||||||
|
- `-l`: Large file support (>2GB)
|
||||||
|
- `-m`: Mirror DVD structure
|
||||||
|
- `-o`: Output directory
|
||||||
|
|
||||||
|
#### **Method B: dvdbackup (For Title Selection)**
|
||||||
|
```bash
|
||||||
|
dvdbackup -i /dev/sr0 -o ~/dvd_rip -t <TITLE_NUM> -M
|
||||||
|
```
|
||||||
|
**Flags**:
|
||||||
|
- `-t`: Specify title number
|
||||||
|
- `-M`: Main feature mode
|
||||||
|
|
||||||
|
### **3.4 Convert to MKV**
|
||||||
|
```bash
|
||||||
|
ffmpeg -err_detect ignore_err \
|
||||||
|
-i "concat:INPUT.VOB" \
|
||||||
|
-map 0:v -map 0:a -map 0:s? \
|
||||||
|
-c copy \
|
||||||
|
output.mkv
|
||||||
|
```
|
||||||
|
**Key Options**:
|
||||||
|
- `ignore_err`: Skip corrupted sectors
|
||||||
|
- `-map`: Include all streams
|
||||||
|
- `-c copy`: No re-encoding
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **4. Advanced Techniques**
|
||||||
|
### **4.1 Batch Processing**
|
||||||
|
```bash
|
||||||
|
for vob in ~/dvd_rips/VIDEO_TS/VTS_*.VOB; do
|
||||||
|
ffmpeg -err_detect ignore_err -i "$vob" \
|
||||||
|
-c copy "${vob%.VOB}.mkv"
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
### **4.2 Multi-Title Extraction**
|
||||||
|
```bash
|
||||||
|
for title in $(lsdvd /dev/sr0 | grep 'Title' | awk '{print $2}' | tr -d ','); do
|
||||||
|
vobcopy -l -n $title -i /mnt/dvd -o ~/dvd_titles
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
### **4.3 Error Recovery**
|
||||||
|
```bash
|
||||||
|
ffmpeg -err_detect aggressive -i corrupted.VOB \
|
||||||
|
-c:v libx264 -crf 18 -preset slow \
|
||||||
|
-c:a copy \
|
||||||
|
repaired.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **5. Verification**
|
||||||
|
### **5.1 Quick Integrity Check**
|
||||||
|
```bash
|
||||||
|
ffprobe -v error -show_format output.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
### **5.2 Stream Comparison**
|
||||||
|
```bash
|
||||||
|
ffprobe -show_streams file1.mkv > file1.txt
|
||||||
|
ffprobe -show_streams file2.mkv > file2.txt
|
||||||
|
diff -y file1.txt file2.txt | colordiff
|
||||||
|
```
|
||||||
|
|
||||||
|
### **5.3 Playback Test**
|
||||||
|
```bash
|
||||||
|
mpv --untimed --frames=100 output.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **6. Playback Options**
|
||||||
|
### **6.1 Basic Playback**
|
||||||
|
```bash
|
||||||
|
mpv output.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
### **6.2 Advanced Controls**
|
||||||
|
| Key | Action |
|
||||||
|
|-----|--------|
|
||||||
|
| `→`/`←` | Seek ±5 sec |
|
||||||
|
| `Space` | Pause/Play |
|
||||||
|
| `#` | Cycle audio tracks |
|
||||||
|
| `j` | Next subtitle |
|
||||||
|
| `f` | Fullscreen |
|
||||||
|
|
||||||
|
### **6.3 Hardware Acceleration**
|
||||||
|
```bash
|
||||||
|
mpv --hwdec=vaapi --vo=gpu output.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **7. Troubleshooting**
|
||||||
|
### **Common Issues**
|
||||||
|
**Problem**: `vobcopy` fails with "Cannot open /dev/dvd"
|
||||||
|
**Solution**:
|
||||||
|
```bash
|
||||||
|
sudo chmod +r /dev/sr0
|
||||||
|
```
|
||||||
|
|
||||||
|
**Problem**: Broken VOB files
|
||||||
|
**Solution**: Force ffmpeg processing:
|
||||||
|
```bash
|
||||||
|
ffmpeg -fflags +genpts -i broken.VOB -c copy fixed.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## **Appendices**
|
||||||
|
### **A. Command Quick Reference**
|
||||||
|
```bash
|
||||||
|
# Rip entire DVD
|
||||||
|
vobcopy -l -m -o ~/dvd_rips
|
||||||
|
|
||||||
|
# Extract specific title
|
||||||
|
dvdbackup -t 3 -M -o ~/dvd_rip
|
||||||
|
|
||||||
|
# Verify streams
|
||||||
|
ffprobe -show_streams video.mkv
|
||||||
|
```
|
||||||
|
|
||||||
|
### **B. FAQ**
|
||||||
|
**Q**: How to preserve subtitles?
|
||||||
|
**A**: Use `-map 0:s?` in ffmpeg
|
||||||
|
|
||||||
|
**Q**: Why MKV over MP4?
|
||||||
|
**A**: MKV supports DVD subtitles and multiple audio tracks natively
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This documentation:
|
||||||
|
✅ Removes all redundancy
|
||||||
|
✅ Organizes workflows logically
|
||||||
|
✅ Provides consistent formatting
|
||||||
|
✅ Includes troubleshooting
|
||||||
|
✅ Offers quick-reference sections
|
||||||
|
|
||||||
|
Let me know if you'd like any section expanded or additional details added!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
You're right - I misunderstood your request. Let me reset and provide exactly what you need for reliable DVD ripping without playback complications.
|
You're right - I misunderstood your request. Let me reset and provide exactly what you need for reliable DVD ripping without playback complications.
|
||||||
|
|
||||||
### **Bulletproof DVD Ripping Workflow**
|
### **Bulletproof DVD Ripping Workflow**
|
||||||
|
|||||||
Reference in New Issue
Block a user