What is the deal with b-pyramid? I have been searching and searching for an explanation to my observation that when using b-pyramid=strict it decreases the ref frame count by one (at least as mediainfo sees it). Here is an example:
Test 1 (B Pyramid checked)
Code: Select all
Complete name : C:\Users\plaza\Desktop\South Park Pyramid.mkv
Format : Matroska
File size : 22.2 MiB
Duration : 59s 977ms
Overall bit rate : 3 107 Kbps
Writing application : HandBrake svn3036
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Muxing mode : Container profile=Unknown@4.0
Codec ID : V_MPEG4/ISO/AVC
Duration : 59s 917ms
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Writing library : x264 core 80
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=64 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : A_AAC
Duration : 59s 977ms
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Language : English
Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 59s 977ms
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 4.58 MiB (21%)
Language : English
Menu
00:00:00.000 : Chapter 1
Test 2 (b-pyramid=strict added to string)
Code: Select all
General
Complete name : C:\Users\plaza\Desktop\South Park Strict.mkv
Format : Matroska
File size : 22.3 MiB
Duration : 59s 977ms
Overall bit rate : 3 123 Kbps
Writing application : HandBrake svn3036
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Muxing mode : Container profile=Unknown@4.0
Codec ID : V_MPEG4/ISO/AVC
Duration : 59s 917ms
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Writing library : x264 core 80
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=64 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : A_AAC
Duration : 59s 977ms
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Language : English
Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 59s 977ms
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 4.58 MiB (20%)
Language : English
Menu
00:00:00.000 : Chapter 1
Media info tells me that I only have 3 ref frames in the second test even though it later shows my encoding parameters (ref=4). Is this significant? Does this mean I can add a reference frame and still keep level 4.1 compatibility? The closest thing I got to an answer is
http://doom10.org/index.php?topic=69.0 but I'm still a little confused. It seems like he is saying that there are indeed 4 ref frames in my second test but does not explain any further. Am I losing a reference frame or not? Why?
P.S. This question was conceived from my desire to create what I believe to be dxva level 4.1 compliant videos. I satisfied myself that this would be the best way to "future proof" my mkvs (I figured I could simply repackage them to m4v or any other format needed in the future without re-ripping my blu-collection). I am beginning to not care as much anymore but would still be interested in knowing what b-pyramid is actually doing. Thank you for any help and you guys are amazing! Also these videos were simply previews in handbrake which is why I don't have handbrake logs. I could do some individual chapter encodes if that is necessary.