aLu
21st December 2009, 02:07
In XviD, if I want to add to an existing video that I encoded a year ago, it's usually no problem. However, x264 has a lot more options, and I'm not sure which of them are important for playback and which for encoding/quality purposes only. Maybe you can give me some hints? They're not all neatly on the same tab, unfortunately.
As far as I know, crucially important are:
- custom matrix (must be the same)
- analyse= (!) (setting must be the same)
- deblocking (I suppose -?)
What else?
Of course the codec's output options must be generally similar. With more recent video, I found it unnecessary to go to great lengths (by trial and error), but in some cases I had to downgrade x264 for very old encodings. I reproduced x264's commandline arguments faithfully from Avinaptic info like this:
[ About H.264 encoding ]
User data: x264
User data: core 47 svn-518
User data: H.264/MPEG-4 AVC codec
User data: Copyleft 2005
User data: http://www.videolan.org/x264.html
User data: cabac=1
User data: ref=5
User data: deblock=1:0:0
User data: analyse=0x3:0x133
User data: me=hex
User data: subme=7
User data: brdo=1
User data: mixed_ref=1
User data: me_range=16
User data: chroma_me=1
User data: trellis=2
User data: 8x8dct=1
User data: cqm=2
User data: chroma_qp_offset=0
User data: slices=2
User data: nr=0
User data: decimate=1
User data: bframes=3
User data: b_pyramid=1
User data: b_adapt=1
User data: b_bias=0
User data: direct=1
User data: wpredb=1
User data: bime=1
User data: keyint=250
User data: keyint_min=25
User data: scenecut=40
User data: rc=2pass
User data: bitrate=4432
User data: ratetol=1.0
User data: rceq='blurCplx^(1-qComp)'
User data: qcomp=0.60
User data: qpmin=10
User data: qpmax=51
User data: qpstep=4
User data: cplxblur=20.0
User data: qblur=0.5
User data: ip_ratio=1.40
User data: pb_ratio=1.30
SPS id: 0
Profile: High@L5.1
Num ref frames: 8
Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
Entropy coding type: CABAC
Weighted prediction: No
Weighted bipred idc: B slices - implicit weighted prediction
8x8dct: Yes
Custom intra4X4 luma:
6 9 13 19
9 14 20 27
13 20 28 35
19 27 35 42
Custom intra4X4 chromau:
6 10 15 20
10 16 21 27
15 21 28 33
20 27 33 42
Custom inter4X4 luma:
8 11 15 20
11 16 21 27
15 21 28 35
20 27 35 42
Custom inter4X4 chromau:
8 11 16 21
11 17 22 27
16 22 28 35
21 27 35 42
Custom intra8X8 luma:
6 7 8 10 12 14 16 18
7 9 11 13 15 16 18 20
8 11 14 16 17 19 21 22
10 13 16 18 20 22 24 26
12 15 17 20 23 25 28 30
14 16 19 22 25 29 34 38
16 18 21 24 28 34 46 52
18 20 22 26 30 38 52 72
Custom inter8X8 luma:
8 9 10 12 14 16 19 21
9 11 13 15 17 19 21 23
10 13 16 18 20 22 23 25
12 15 18 21 23 24 26 32
14 17 20 23 25 27 33 40
16 19 22 24 27 34 41 52
19 21 23 26 33 41 53 64
21 23 25 32 40 52 64 80
... translates into this:
x264.exe --pass 1 --bitrate 4432 --stats "X:\x264_2pass.log" --level 5.1 --b-pyramid --trellis 2 --chroma-qp-offset 0 --ref 5 --analyse all --subme 7 --b-rdo --mixed-refs --8x8dct 1 --bframes 3 --b-pyramid 1 --b-bias 0 --direct spatial --weightb --bime --thread-input --cqmfile "X:\eqm_avc_hr.cfg" --output "X:\output.mkv" "X:\input.avs"
... for that particular version of x264 (revision 518 / 2006-05-06).
This was cobbled together from MeGui code and trial & error on the commandline, I don't really know what I'm doing here.
I'd like to have a better idea what is important or not, it would be great time-saver. Quality or bitrate is not an issue when encoding only a few frames.
As far as I know, crucially important are:
- custom matrix (must be the same)
- analyse= (!) (setting must be the same)
- deblocking (I suppose -?)
What else?
Of course the codec's output options must be generally similar. With more recent video, I found it unnecessary to go to great lengths (by trial and error), but in some cases I had to downgrade x264 for very old encodings. I reproduced x264's commandline arguments faithfully from Avinaptic info like this:
[ About H.264 encoding ]
User data: x264
User data: core 47 svn-518
User data: H.264/MPEG-4 AVC codec
User data: Copyleft 2005
User data: http://www.videolan.org/x264.html
User data: cabac=1
User data: ref=5
User data: deblock=1:0:0
User data: analyse=0x3:0x133
User data: me=hex
User data: subme=7
User data: brdo=1
User data: mixed_ref=1
User data: me_range=16
User data: chroma_me=1
User data: trellis=2
User data: 8x8dct=1
User data: cqm=2
User data: chroma_qp_offset=0
User data: slices=2
User data: nr=0
User data: decimate=1
User data: bframes=3
User data: b_pyramid=1
User data: b_adapt=1
User data: b_bias=0
User data: direct=1
User data: wpredb=1
User data: bime=1
User data: keyint=250
User data: keyint_min=25
User data: scenecut=40
User data: rc=2pass
User data: bitrate=4432
User data: ratetol=1.0
User data: rceq='blurCplx^(1-qComp)'
User data: qcomp=0.60
User data: qpmin=10
User data: qpmax=51
User data: qpstep=4
User data: cplxblur=20.0
User data: qblur=0.5
User data: ip_ratio=1.40
User data: pb_ratio=1.30
SPS id: 0
Profile: High@L5.1
Num ref frames: 8
Chroma format idc: YUV 4:2:0
PPS id: 0 (SPS: 0)
Entropy coding type: CABAC
Weighted prediction: No
Weighted bipred idc: B slices - implicit weighted prediction
8x8dct: Yes
Custom intra4X4 luma:
6 9 13 19
9 14 20 27
13 20 28 35
19 27 35 42
Custom intra4X4 chromau:
6 10 15 20
10 16 21 27
15 21 28 33
20 27 33 42
Custom inter4X4 luma:
8 11 15 20
11 16 21 27
15 21 28 35
20 27 35 42
Custom inter4X4 chromau:
8 11 16 21
11 17 22 27
16 22 28 35
21 27 35 42
Custom intra8X8 luma:
6 7 8 10 12 14 16 18
7 9 11 13 15 16 18 20
8 11 14 16 17 19 21 22
10 13 16 18 20 22 24 26
12 15 17 20 23 25 28 30
14 16 19 22 25 29 34 38
16 18 21 24 28 34 46 52
18 20 22 26 30 38 52 72
Custom inter8X8 luma:
8 9 10 12 14 16 19 21
9 11 13 15 17 19 21 23
10 13 16 18 20 22 23 25
12 15 18 21 23 24 26 32
14 17 20 23 25 27 33 40
16 19 22 24 27 34 41 52
19 21 23 26 33 41 53 64
21 23 25 32 40 52 64 80
... translates into this:
x264.exe --pass 1 --bitrate 4432 --stats "X:\x264_2pass.log" --level 5.1 --b-pyramid --trellis 2 --chroma-qp-offset 0 --ref 5 --analyse all --subme 7 --b-rdo --mixed-refs --8x8dct 1 --bframes 3 --b-pyramid 1 --b-bias 0 --direct spatial --weightb --bime --thread-input --cqmfile "X:\eqm_avc_hr.cfg" --output "X:\output.mkv" "X:\input.avs"
... for that particular version of x264 (revision 518 / 2006-05-06).
This was cobbled together from MeGui code and trial & error on the commandline, I don't really know what I'm doing here.
I'd like to have a better idea what is important or not, it would be great time-saver. Quality or bitrate is not an issue when encoding only a few frames.