Skip to content

Commit 11d1d52

Browse files
committed
feature: update video rip guide
1 parent 03bcd0b commit 11d1d52

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

videorip/ripguide.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,23 @@ ffmpeg:
9898
```
9999
ffmpeg -analyzeduration 500M -probesize 2000M -i demux/00003.track_4113.264 -ss 00:05:00 -t 00:00:20 -codec:v
100100
101+
# Example1
101102
libx264 -preset slow -tune film -x264-params "me=umh:subme=11:no-fast-pskip=1:no-dct-decimate=1:qcomp=0.75:crf=21:bframes=16:b-adapt=2:ref=13:deblock=-4" sample.264
102103
104+
# Example2
103105
libx264 -preset veryslow -tune film -x264-params "me=umh:subme=11:no-fast-pskip=1:no-dct-decimate=1:qcomp=0.75:crf=23:rc-lookahead=250:aq-strength=0.9:min-keyint=24:bframes=16:b-adapt=2:ref=13:deblock=-4"
104106
105-
fmpeg -probesize 4096M -i src.264 -codec:v libx264 \
107+
# Example3
108+
libx264 -preset slow -tune film -x264-params \
109+
"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"
110+
111+
# Example4
112+
ffmpeg -probesize 4096M -i src.264 -codec:v libx264 \
106113
-preset veryslow -tune film -x264-params \
107114
"me=umh:subme=11:no-fast-pskip=1:no-dct-decimate=1:crf=23.0:qcomp=0.75:no-mbtree=0:rc-lookahead=250:aq-strength=0.9:min-keyint=24:bframes=16:b-adapt=2:ref=12:deblock=-4" main.264
115+
116+
# run in background
117+
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 &
108118
```
109119

110120
x264:
@@ -127,6 +137,38 @@ For example, for an HDTV picture that is 1,920 samples wide (PicWidthInMbs = 120
127137

128138
For level 5 MaxDpbMbs is 110400, same res--> 13.5
129139

140+
#### aq
141+
142+
aq-mode
143+
144+
Adaptive Quantization Mode
145+
146+
Default: 1
147+
148+
Without AQ, x264 tends to underallocate bits to lower details sections. AQ is used to better distribute the available bits between all macroblocks in the video. This setting changes what scope AQ re-arranges bits in:
149+
150+
0: Do not use AQ at all.
151+
1: Allow AQ to redistribute bits within each frame.
152+
2: Allow AQ to redistribute bits across the whole video.
153+
3: Auto-variance AQ with bias to dark scenes.
154+
155+
Recommendation: Default
156+
157+
aq-strength
158+
159+
Adaptive Quantization Strength
160+
161+
Default: 1.0
162+
163+
Sets the strength of AQ bias towards low detail ('flat') macroblocks. Negative values are not allowed. Values more than a couple of hundred percent off from 1.0 are probably a bad idea.
164+
165+
Recommendation: Default
166+
167+
#### psy rd
168+
169+
2 / 3 choose
170+
171+
130172
## 3 Enocde Audio
131173

132174
```
@@ -141,17 +183,22 @@ ffmpeg -i demux/00003.track_4352.wav -codec:a flac demux/00003.track_4352.flac
141183
ffmpeg -i DTS-HD_MA.dts -bsf:a dca_core -c:a copy TS-Core.dts
142184
```
143185

144-
## 4 REMUX mkvmerge
186+
## 4 REMUX by mkvmerge
145187

146188
```
147189
mkvmerge -o "Black.Snow.1990.PAL.DVDRip.x264.AC3-psklf.mkv" --title "Black.Snow.1990.PAL.DVDRip.x264.AC3-psklf" --chapters chapters.txt --default-duration 0:25fps --track-name 0:"H.264 Video yuv420p 720x576 2685.6kbps" output.264 --language 0:chi --track-name 0:"AC3 Audio" output.ac3 --language 0:eng eng.idx
148190
149191
mkvmerge -o Time.To.Die.2007.DVDRip.x264.AC3-psklf.mkv --title "Time.To.Die.2007.DVDRip.x264.AC3-psklf" --default-duration 0:25fps --track-name 0:"H.264 Video" main.264 --language 0:pol --track-name 0:"AC-3 5.1 Audio" main51.ac3 --language 0:pol --track-name 0:"AC-3 stereo Audio" mainstereo.ac3 --chapters chapters.txt --language 0:chi Time.To.Die.2007.DVDRip.XviD-RESERVED.chs.srt --language 0:eng Time.To.Die.2007.DVDRip.XviD-RESERVED.english.srt
150192
193+
mkvmerge -o Rebels.of.the.Neon.God.1080p.BluRay.FLAC.x264-psklf.mkv --title "Rebels.of.the.Neon.God.1080p.BluRay.FLAC.x264-psklf" --compression 0:none --track-name 0:"H.264 / 1080p / 24fps / Advanced Profile 5" 00003rip.track_4113.264 --compression 0:none --language 0:chi --track-name 0:"Chinese / FLAC / 2.0 / 16 bits" demux/00003.track_4352.flac --chapters demux/00003chapters.xml --language 0:chi demux/00003.track_4608.sup --language 0:eng demux/00003.track_4609.sup
151194
152-
mkvmerge -o Rebels.of.the.Neon.God.1080p.BluRay.FLAC.x264-psklf.mkv --title "Rebels.of.the.Neon.God.1080p.BluRay.FLAC.x264-psklf" --compression 0:none --default-duration 0:24fps --track-name 0:"H.264 / 1080p / 24fps / Advanced Profile 5" 00003rip.track_4113.264 --compression 0:none --language 0:chi --track-name 0:"Chinese / FLAC / 2.0 / 16 bits" demux/00003.track_4352.flac --chapters demux/00003chapters.xml --language 0:chi demux/00003.track_4608.sup --language 0:eng demux/00003.track_4609.sup
195+
```
196+
Tips:
153197

154198
```
199+
mkvmerge -o temp.mkv --subtitle-tracks 2 ChungKing.Express.1994.1080p.BluRay.DTS.x264-psklf.mkv # select track 2
200+
mkvmerge -o output.mkv -s '!3' input.mkv # remove subtitle track 3
201+
```
155202

156203

157204

0 commit comments

Comments
 (0)