r(8696) Average bit rate tripled or more from given value for AVC

Started by hefestus, May 25, 2013, 05:36:16 AM

Previous topic - Next topic

hefestus

r(8696) Average bit rate tripled or more from given value.

Tried for AVC (264) two pass Average bit rate 1800kbs turned to be average 7800kbs in encoded video.
Getting even worse for 8000kbs two pass encodes in 125000kbs

:(


Jan Gruuthuse

Did small test, can not confirm your results.
Source video mpeg-ts 720p then Average Bitrate (Two Pass) 1800 and 1500, both saved videos ended up as specified. see attached picture.
Have you changed any other parameters?

hefestus

Thanx for replay Jan

Yes I do change:

Fast first pass
partition
8x8 DTC
8x8, 8x16 16x8 P-fr
8x8, 8x16 16x8 B-fr
8x8 intra
4x4 intra
Frame
CABAC
6 ref frames
B-Frames
max 2
Optimal
Strict
I-Frame
GOP 100 -500
threshold 40
Analysis
Mix ref
Chroma motion
Trellis -on

This setting works in 2.6.1 /64

All my work is from mkv to mp4 or avi

hefestus

Here is example:

Original video:

Format            : AVI at 1 363 Kbps
Length            : 47.6 MiB for 4mn 52s 959ms

Video #0          : AVC at 1 143 Kbps
Aspect            : 720 x 400 (1.800) at 23.976 fps

Audio #0          : AAC at 128 Kbps
Infos             : 2 channels, 48.0 KHz

re encoded to 1800kbs with sharpen convolution + logo


General
Complete name                            : G:\Video\1.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 466 MiB
Duration                                 : 41h 38mn

Overall bit rate                         : 26.1 Kbps

Video
ID                                       : 0
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : H264
Duration                                 : 4mn 52s
Bit rate                                 : 13.1 Mbps
Nominal bit rate                         : 1 800 Kbps
Width                                    : 720 pixels
Height                                   : 400 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.902
Stream size                              : 458 MiB (98%)
Writing library                          : x264 core 123 r2189 35cf912
Encoding settings                        : cabac=1 / ref=6 / deblock=1:0:0 / analyse=0x3:0x113 / me=dia / subme=8 / psy=1 / psy_rd=0.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,21 / fast_pskip=1 / chroma_qp_offset=0 / threads=9 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=0 / weightb=0 / open_gop=0 / weightp=0 / keyint=500 / keyint_min=100 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=1800 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=0 / qpstep=2 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.00 / pb_ratio=1.00 / aq=1:1.00

Audio
ID                                       : 1
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : FF
Duration                                 : 41h 38mn
Source duration                          : 7mn 19s
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 6.70 MiB (1%)
Alignment                                : Split accross interleaves
Interleave, duration                     : 21 ms (0.51 video frame)

Jan Gruuthuse

Result you obtain still not reproducible? Main differences seen: Writing library
x264 core 120 r2151 a3f4407 <> x264 core 123 r2189 35cf912
Can you do a test? Load 720x400.avi, download 34 MB in avidemux.
And run the attached 1800Kbps.py from avidemux Menu (textual): File: Tinypy Project: Run Project and browse to the 1800Kbps.py file. Then save video.
You should end up with a 12.1 MB avi file, still running 1:30.

hefestus

Sorry I'm late with replay.

RS file was gone but I tried on one of my avi's with your 1800Kbps.py.
This is working! bbs are correct and timing too!

Stream size                    : 42.2 MiB (97%)
Writing library                : x264 core 123 r2189 35cf912
Encoding settings              : cabac=1 / ref=6 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=9 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=2 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=500 / keyint_min=100 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1800 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

I've had more than few 32/64 installs, so I uninstall all of them and install the latest (r8696)32. This still doesn't fix my presets but at least I can use your .py and adjust bps and check for the difference that still produce this:

General
Complete name                  : G:\uskl.avi
Format                         : AVI
Format/Info                    : Audio Video Interleave
File size                      : 2.09 GiB
Duration                       : 1mn 53s
Overall bit rate               : 159 Mbps

Video
ID                             : 0
Format                         : AVC
Format/Info                    : Advanced Video Codec
Format profile                 : High@L3.1
Format settings, CABAC         : Yes
Format settings, ReFrames      : 2 frames
Codec ID                       : H264
Duration                       : 1mn 53s
Bit rate                       : 157 Mbps
Nominal bit rate               : 8 000 Kbps

Width                          : 1 920 pixels
Height                         : 1 080 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)             : 3.159
Stream size                    : 2.07 GiB (99%)
Writing library                : x264 core 123 r2189 35cf912
Encoding settings              : cabac=1 / ref=2 / deblock=0:0:0 / analyse=0x3:0x113 / me=dia / subme=8 / psy=1 / psy_rd=0.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,21 / fast_pskip=1 / chroma_qp_offset=0 / threads=9 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=4 / b_pyramid=0 / b_adapt=0 / b_bias=0 / direct=0 / weightb=0 / open_gop=0 / weightp=0 / keyint=500 / keyint_min=100 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=8000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=0 / qpstep=2 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.00 / pb_ratio=1.00 / aq=1:1.00


Thanx for the help Jan. Hope this will hep to trace the bug.



Jan Gruuthuse

I'm a user, and I never go that deep in encoder settings. Perhaps developer/user/yourself ha(s/ve) a clue why this is happening.
Left is top encoder setting, right is bottom encoder setting. See attached picture, click to enlarge, perhaps you remember why certain parameters you did apply and its usage.
Color Coding: Light Green: exactly the same, Dark Green: some differences, Grey: parameter not used in this setting.