x264 encoding with Avidemux 2.6.1 (32-bit)

Started by Spellbinder, February 14, 2013, 12:52:15 PM

Previous topic - Next topic

Spellbinder

Hi,

I have some stange behavior. Maybe someone can explain this:

I am trying to encode a cut video with x264 (2 Pass Variable Bit Rate set to 3000). Audio in copy mode. ChangeFPS set to 29.970 (which is the framerate of the original movie, but wihout this I get even stanger results)

Build Info:
Avidemux 2.6.1 (32-bit)
-----------------------
Built using GCC 4.7.2 and MSVC++ 10.0 SP1.
Packaged with NSIS 2.46.

Included libraries:
Aften           git-89aee3d496bb2a89f046025402626ee12a12969f
Expat           2.1.0
FAAC            1.28
FAAD2           2.7
Fontconfig      2.10.2
Freetype        2.4.10
FriBidi         0.19.5
LAME            3.99.5
libogg          1.3.0
libvorbis       1.3.3
libvpx          1.1.0
NSPR            4.9.4
opencore-amr    0.1.3
Qt              4.8.4
SpiderMonkey    1.7.0
SQLite          3.7.15
TwoLAME         0.3.13
x264            r2230
Xvid            1.3.2
zlib            1.2.7

Included applications:
Avisynth Proxy GUI 2.20

Plugin Settings:

{
   "general" : {
      "params" : "2PASSBITRATE=3000",
      "threads" : 99,
      "fast_first_pass" : true
   },
   "level" : -1,
   "vui" : {
      "sar_height" : 1,
      "sar_width" : 1
   },
   "MaxRefFrames" : 3,
   "MinIdr" : 25,
   "MaxIdr" : 250,
   "i_scenecut_threshold" : 30,
   "MaxBFrame" : 16,
   "i_bframe_adaptive" : 2,
   "i_bframe_bias" : 0,
   "i_bframe_pyramid" : 2,
   "b_deblocking_filter" : true,
   "i_deblocking_filter_alphac0" : 0,
   "i_deblocking_filter_beta" : 0,
   "cabac" : true,
   "interlaced" : false,
   "analyze" : {
      "b_8x8" : true,
      "b_i4x4" : true,
      "b_i8x8" : true,
      "b_p8x8" : false,
      "b_p16x16" : true,
      "b_b16x16" : true,
      "weighted_pred" : 2,
      "weighted_bipred" : true,
      "direct_mv_pred" : 3,
      "chroma_offset" : 0,
      "me_method" : 2,
      "mv_range" : 32,
      "subpel_refine" : 8,
      "chroma_me" : true,
      "mixed_references" : true,
      "trellis" : 2,
      "psy_rd" : 0,
      "psy_trellis" : 0,
      "fast_pskip" : false,
      "dct_decimate" : true,
      "noise_reduction" : 0,
      "psy" : true,
      "intra_luma" : 21,
      "inter_luma" : 21
   },
   "ratecontrol" : {
      "rc_method" : 0,
      "qp_constant" : 0,
      "qp_min" : 0,
      "qp_max" : 0,
      "qp_step" : 0,
      "bitrate" : 0,
      "vbv_max_bitrate" : 0,
      "vbv_buffer_size" : 0,
      "vbv_buffer_init" : 0,
      "ip_factor" : 0,
      "pb_factor" : 0,
      "aq_mode" : 1,
      "aq_strength" : 1,
      "mb_tree" : true,
      "lookahead" : 50
   }
}

This is the Result (MediaInfo):

General
Complete name                            : INFO\test.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 227 MiB
Duration                                 : 20mn 20s
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 559 Kbps
Encoded date                             : UTC 2013-02-14 07:06:51
Tagged date                              : UTC 2013-02-14 07:28:39

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 20mn 20s
Bit rate mode                            : Variable
Bit rate                                 : 1 428 Kbps
Nominal bit rate                         : 3 000 Kbps

Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 14.254 fps
Original frame rate                      : 29.970 fps
Minimum frame rate                       : 9.986 fps
Maximum frame rate                       : 100.000 fps

Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.109
Stream size                              : 208 MiB (92%)
Writing library                          : x264 core 129 r2230 1cffe9f
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / 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=0 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=30 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=3000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 2013-02-14 07:06:52
Tagged date                              : UTC 2013-02-14 07:28:39

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 20mn 20s
Bit rate mode                            : Variable
Bit rate                                 : 127 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 18.5 MiB (8%)
Encoded date                             : UTC 2013-02-14 07:06:52
Tagged date                              : UTC 2013-02-14 07:28:39


First thing i find stange is the bitrate:

Bit rate mode                            : Variable
Bit rate                                 : 1 428 Kbps
Nominal bit rate                         : 3 000 Kbps


Why does it not reach the bitrate that I specified (3000)?

Second thing is the framerate:

Frame rate mode                          : Variable
Frame rate                               : 14.254 fps
Original frame rate                      : 29.970 fps
Minimum frame rate                       : 9.986 fps
Maximum frame rate                       : 100.000 fps


EDIT: Here is the Mediainfo from the original file:

Complete name                            : INFO\test_ORIGINAL.mp4
Frame rate mode                          : Variable
Frame rate                               : 29.970 fps
Minimum frame rate                       : 29.004 fps
Maximum frame rate                       : 30.000 fps

Shouldnt the framerate be the one I set as well (29.970 fps)?

On a side node: Is it possible to set the framerate to constant?

Thanks for some advice in advanced!

mean

There ' s video filter called resample fps or similar that enforces a constant framerate

Spellbinder

I made a test with that filter as well. It does not look like constant framerate either:

Complete name                            : INFO\test_h254_changeFPS.mp4
Frame rate mode                          : Variable
Frame rate                               : 14.270 fps
Minimum frame rate                       : 9.986 fps
Maximum frame rate                       : 100.000 fps

Complete name                            : INFO\test_h254_resampleFPS.mp4
Frame rate mode                          : Variable
Frame rate                               : 29.970 fps
Minimum frame rate                       : 9.991 fps
Maximum frame rate                       : 100.000 fps