[Cin] Re3: Blu-ray encoding again

Andrew Randrianasulu randrianasulu at gmail.com
Sun Nov 17 01:39:54 CET 2019


В сообщении от Saturday 16 November 2019 19:18:05 Phyllis Smith написал(а):
> Andrew, just trying to keep up with you but not really able to.  Just some
> feedback and a question.
> 
> With the fake-interlaced=1, a "real" interlace media file came out
> progressive too, so besides your bluray.m2ts, gg created bluray_tff.m2ts
> and bluray_bff.m2ts and made changes to bdcreate.C to pick that one based
> on ILACE.  I have yet to have him look into the bdcreate.C changes you
> tested but hopefully I can do so today will still testing more bluray media
> on the TV.

Unfortunately, those changes apparently made no effect after all - 
because only x264 command line encoder knows how to deal with 
--pulldown option.

> 
> BUT, BIG QUESTION here and I already re-read the x264 url on deprecation of
> x264opts to be replaced by x264-params.  I can not get x264-params to work
> with tff or bff added at the end of the statement.  I even tried tff=1 and
> still does not work.  The only way I can get the interlace options to work
> is with x264opts.  So the question I have for you is, in your bluray.m2ts,
> can you verify that the vbv-maxrate=40000:vbv-bufsize=30000 actually take
> effect? I notice that you have them commented in the main section and added
> them to the end of the x264opts.  Thanks, Phyllis

well, while libx264 recognizes changes I made there

[libx264 @ 0xe93ebf40] using mv_range_thread = 56
[libx264 @ 0xe93ebf40] using SAR=1/1
[libx264 @ 0xe93ebf40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
[libx264 @ 0xe93ebf40] HRD bitrate: 15000000 bits/sec
[libx264 @ 0xe93ebf40] CPB size: 12000000 bits
[libx264 @ 0xe93ebf40] profile High, level 4.1

for
x264-params keyint=25:min-keyint=4:qpmin=3:qpmax=33:qp_step=4:merange=8:vbv-maxrate=15000:vbv-bufsize=12000
line in bluray.m2ts

but resulting fiile still around 90 Mb for 1 minute (1280x720, 24p)
ediainfo bd.m2ts
General
ID                                       : 1 (0x1)
Complete name                            : bd.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 94.2 MiB
Duration                                 : 1 min 17 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 10.2 Mb/s

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3 frames
Codec ID                                 : 27
Duration                                 : 1 min 17 s
Bit rate mode                            : Variable
Bit rate                                 : 10 000 kb/s
Maximum bit rate                         : 15.0 Mb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.452
Stream size                              : 88.6 MiB (94%)
Writing library                          : x264 core 155
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=abr / mbtree=1 / bitrate=10000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=15000 / vbv_bufsize=12000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709


I can try to reduce them further, and see if file will be any smaller ...

for same input file /BD settings, but with further reduced bitrate/bufsze:

[libx264 @ 0xe3932000] max bitrate less than average bitrate, assuming CBR
[libx264 @ 0xe3932000] using mv_range_thread = 56
[libx264 @ 0xe3932000] using SAR=1/1
[libx264 @ 0xe3932000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
[libx264 @ 0xe3932000] HRD bitrate: 8000000 bits/sec
[libx264 @ 0xe3932000] CPB size: 6000000 bits
[libx264 @ 0xe3932000] profile High, level 4.1

mediainfo bd.m2ts
General
ID                                       : 1 (0x1)
Complete name                            : bd.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 78.9 MiB
Duration                                 : 1 min 17 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 583 kb/s

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4.1
Format settings                          : CABAC / 3 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 3 frames
Codec ID                                 : 27
Duration                                 : 1 min 17 s
Bit rate mode                            : Variable
Bit rate                                 : 8 000 kb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.362
Stream size                              : 73.9 MiB (94%)
Writing library                          : x264 core 155
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=8 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=25 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=cbr / mbtree=1 / bitrate=8000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=33 / qpstep=4 / vbv_maxrate=8000 / vbv_bufsize=6000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

so, it seems those parameters encoded..somewhere, even if resulting file not much smaller.

> 
> On Sat, Nov 16, 2019 at 12:57 AM Andrew Randrianasulu <
> randrianasulu at gmail.com> wrote:
> 
> >
> > No, apparently pulldown option requres more handling:
> >
> > from x264.h
> >
> >
> 




More information about the Cin mailing list