Skip to content

Commit 102ff6b

Browse files
committed
edit rip guide
1 parent bd53ab2 commit 102ff6b

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

videorip/ripguide.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ S_HDMV/PGS, ./PLAYLIST/00004.mpls, lang=eng, track=4609
3535
A_LPCM, ./PLAYLIST/00004.mpls, track=4352
3636
V_MPEG4/ISO/AVC, ./PLAYLIST/00004.mpls, track=4113
3737
38-
A_DTS, "./film/Fallen.Angels.1995.Criterion.Collection.1080p.Blu-ray.AVC.DTS-HD.MA.5.1-DiY@HDHome/BDMV/PLAYLIST/00001.mpls", track=4352, down-to-dts
38+
A_DTS, "./BDMV/PLAYLIST/00001.mpls", track=4352, down-to-dts
39+
A_AC3, "./BDMV/PLAYLIST/00001.mpls", track=4353, down-to-ac3
3940
```
4041

4142
Run
@@ -74,25 +75,6 @@ mkvextract chapters "chapters.mkv" > chapters.xml
7475

7576
## 2 Encode video by ffmpeg/x264
7677

77-
78-
My samples
79-
80-
**Rip an old Chinese film**
81-
82-
grain: for old film
83-
84-
```
85-
ffmpeg -analyzeduration 100M -probesize 100M -i main.VOB -ss 00:10:00 -t 00:02:00 -codec:v libx264 -b_strategy 2 -crf 18 -me_method umh -x264opts deblock=-4:subme=11:no-fast-pskip=1:no-dct-decimate=1 -tune grain sample.264
86-
```
87-
88-
**Rip a new film**
89-
90-
```
91-
ffmpeg -analyzeduration 100M -probesize 100M -i VIDEO_TS/VTS01.VOB -ss 00:13:00 -t 00:02:00 -codec:v libx264 -preset slow -x264-params "crf=18:me=umh:bframes=5:deblock=-4:subme=11:no-fast-pskip=1:no-dct-decimate=1" sample.264
92-
93-
ffmpeg -analyzeduration 100M -probesize 100M -i main.VOB -codec:v libx264 -preset veryslow -x264-params "me=umh:deblock=-3:subme=11:no-fast-pskip=1:no-dct-decimate=1:qcomp=0.65:bframes=5:crf=18" main.264
94-
```
95-
9678
**Rip bluray film**
9779

9880
ffmpeg:
@@ -106,8 +88,18 @@ libx264 -preset veryslow -tune film -x264-params "me=umh:subme=11:no-fast-pskip=
10688
ffmpeg -analyzeduration 500M -probesize 2046M -i demux/00001.track_4113.264 -codec:v libx264 -preset veryslow -tune film -x264-params "me=umh:subme=11:no-fast-pskip=1:no-dct-decimate=1:crf=21.5:aq-mode=2:aq-strength=1.0:qcomp=0.8:no-mbtree=1:bframes=8:b-adapt=2:ref=12" main.264 > ffmpeg.log 2>&1 < /dev/null &
10789
```
10890

91+
### x264 Encode
92+
10993
x264 (w/ vspipe)
11094

95+
First, get lossless 264 video file
96+
97+
```
98+
vspipe -y clip.vpy - | x264 --demuxer y4m - --qp 0 -o samplesrc.264
99+
```
100+
101+
Use Vapoursynth to filter and x264 to encode
102+
111103
```
112104
vspipe --y4m encodetest.vpy - | x264 --demuxer y4m - \
113105
--preset slow --tune film \
@@ -119,6 +111,14 @@ vspipe --y4m encodetest.vpy - | x264 --demuxer y4m - \
119111

120112
### x264 Settings
121113

114+
#### Qcomp
115+
116+
Qcomp determines your encoding strategy. Given the fact that the default qcomp is 0.6, when I say “Qcomp = 0.8” I am telling my encoder this “Hey, just because a frame is P or B, doesn’t mean that they are to be given too much of a step-motherly treatment”. When I say “Qcomp = 0.4”, P-frames and B-frames deteriorate much more than the I-frame.
117+
118+
Thus - in our example, when Qcomp was 0, the P and B frames were very information-light.
119+
120+
Warning: If you turn mbtree on for encodes which use qcomps less than 0.7, you must be very very sure that the source isn’t grainy or complex or else you will end up destroying your encode. Turn it off with –no-mbtree; since mbtree is enabled by default.
121+
122122
#### ref
123123
ref: The max –ref value can be calculated as follows:
124124

@@ -162,6 +162,28 @@ Recommendation: Default
162162

163163
2 / 3 choose
164164

165+
### compare screenshot
166+
167+
use [`ffinfo_screen.py`](ffinfo_screen.py) to generate screenshots.
168+
169+
### backup stuff
170+
My samples
171+
172+
**Rip an old Chinese film**
173+
174+
grain: for old film
175+
176+
```
177+
ffmpeg -analyzeduration 100M -probesize 100M -i main.VOB -ss 00:10:00 -t 00:02:00 -codec:v libx264 -b_strategy 2 -crf 18 -me_method umh -x264opts deblock=-4:subme=11:no-fast-pskip=1:no-dct-decimate=1 -tune grain sample.264
178+
```
179+
180+
**Rip a new film**
181+
182+
```
183+
ffmpeg -analyzeduration 100M -probesize 100M -i VIDEO_TS/VTS01.VOB -ss 00:13:00 -t 00:02:00 -codec:v libx264 -preset slow -x264-params "crf=18:me=umh:bframes=5:deblock=-4:subme=11:no-fast-pskip=1:no-dct-decimate=1" sample.264
184+
185+
ffmpeg -analyzeduration 100M -probesize 100M -i main.VOB -codec:v libx264 -preset veryslow -x264-params "me=umh:deblock=-3:subme=11:no-fast-pskip=1:no-dct-decimate=1:qcomp=0.65:bframes=5:crf=18" main.264
186+
```
165187

166188
## 3 Enocde Audio
167189

0 commit comments

Comments
 (0)