Update tech_docs/dvd_rip.md
This commit is contained in:
@@ -1,3 +1,97 @@
|
||||
Understood. Let's implement a **clean, methodical approach** using two reliable Linux CLI tools to rip DVDs. We'll compare:
|
||||
|
||||
1. **`vobcopy`** (traditional, reliable)
|
||||
2. **`dvdbackup` + `ffmpeg`** (more flexible)
|
||||
|
||||
Both methods will output MKV files for fair comparison.
|
||||
|
||||
---
|
||||
|
||||
### **Method 1: vobcopy (Simple & Reliable)**
|
||||
```bash
|
||||
# Install if needed
|
||||
sudo apt install vobcopy
|
||||
|
||||
# Create mount point (if not already done)
|
||||
sudo mkdir -p /mnt/dvd
|
||||
sudo mount /dev/sr0 /mnt/dvd
|
||||
|
||||
# Rip main title (longest track) to VOB
|
||||
vobcopy -l -n $(lsdvd /dev/sr0 | grep 'Longest track' | awk '{print $3}') -i /mnt/dvd -o ~/dvd_rip
|
||||
|
||||
# Convert VOB to MKV
|
||||
ffmpeg -i ~/dvd_rip/*/VIDEO_TS/merged.vob -c copy "method1_output.mkv"
|
||||
|
||||
# Cleanup
|
||||
sudo umount /mnt/dvd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### **Method 2: dvdbackup + ffmpeg (More Control)**
|
||||
```bash
|
||||
# Install if needed
|
||||
sudo apt install dvdbackup
|
||||
|
||||
# Rip specific title
|
||||
dvdbackup -i /dev/sr0 -o ~/dvd_rip -t $(lsdvd /dev/sr0 | grep 'Longest track' | awk '{print $3}') -M
|
||||
|
||||
# Convert VOBs to MKV
|
||||
ffmpeg -i "concat:$(ls ~/dvd_rip/*/VIDEO_TS/VTS_*.VOB | tr '\n' '|' | sed 's/|$//')" \
|
||||
-c copy "method2_output.mkv"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### **Comparison Script**
|
||||
```bash
|
||||
#!/bin/bash
|
||||
DVD_DEV="/dev/sr0"
|
||||
OUTPUT_DIR="$HOME/dvd_comparison"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
# Method 1: vobcopy
|
||||
time {
|
||||
sudo mount "$DVD_DEV" /mnt/dvd 2>/dev/null
|
||||
vobcopy -l -n $(lsdvd "$DVD_DEV" | grep 'Longest track' | awk '{print $3}') -i /mnt/dvd -o "$OUTPUT_DIR/method1"
|
||||
ffmpeg -i "$OUTPUT_DIR/method1"/*/VIDEO_TS/merged.vob -c copy "$OUTPUT_DIR/method1.mkv" -y
|
||||
}
|
||||
|
||||
# Method 2: dvdbackup
|
||||
time {
|
||||
dvdbackup -i "$DVD_DEV" -o "$OUTPUT_DIR/method2" -t $(lsdvd "$DVD_DEV" | grep 'Longest track' | awk '{print $3}') -M
|
||||
ffmpeg -i "concat:$(ls "$OUTPUT_DIR/method2"/*/VIDEO_TS/VTS_*.VOB | tr '\n' '|' | sed 's/|$//')" \
|
||||
-c copy "$OUTPUT_DIR/method2.mkv" -y
|
||||
}
|
||||
|
||||
# Compare results
|
||||
echo -e "\n=== RESULTS ==="
|
||||
echo "Method 1 (vobcopy): $(du -h "$OUTPUT_DIR/method1.mkv" | awk '{print $1}')"
|
||||
echo "Method 2 (dvdbackup): $(du -h "$OUTPUT_DIR/method2.mkv" | awk '{print $1}')"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### **How to Evaluate**
|
||||
1. **Speed**: Check the `time` output for each method
|
||||
2. **Quality**: Compare files with:
|
||||
```bash
|
||||
ffprobe -v error -show_streams -i method1.mkv > method1_info.txt
|
||||
ffprobe -v error -show_streams -i method2.mkv > method2_info.txt
|
||||
diff method1_info.txt method2_info.txt
|
||||
```
|
||||
3. **Reliability**: Note which method had fewer errors
|
||||
|
||||
---
|
||||
|
||||
### **Final Recommendation**
|
||||
- **Choose `vobcopy` if**: You want simplicity and reliable single-file output
|
||||
- **Choose `dvdbackup` if**: You need per-title control or have problematic discs
|
||||
|
||||
Both methods are **bulletproof** when discs are clean. The winner depends on your specific use case.
|
||||
|
||||
---
|
||||
|
||||
Great! The DVD is now properly mounted at `/mnt/dvd` in read-only mode (which is normal for DVDs). Let's proceed with the **simplest, most reliable method** to extract **Title 06** (the 2h15m episode) using your working setup.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user