[vlc] Re: x264 Encode Keyframes and Defaults

Mark Moriarty mfmbusiness at earthlink.net
Tue Feb 28 12:56:45 CET 2006


If you look in the vlcrc file, you will see the defaults. 
For instance, a search for "x264-keyint" shows:
# Sets maximum interval between IDR-frames (integer)
#sout-x264-keyint=250

The default maximum interval is 250.
If I wished to change the value, did't feel like going through the GUI, I
would uncomment it:
sout-x264-keyint=30


-----Original Message-----
From: vlc-bounce at videolan.org [mailto:vlc-bounce at videolan.org] On Behalf Of
George Bray
Sent: Tuesday, February 28, 2006 6:47 AM
To: vlc at videolan.org
Subject: [vlc] x264 Encode Keyframes and Defaults



I'm using VLC to transcode MPEG2-TS files to H.264 and it's working well.
My only complaint is that often, the first five seconds of the target file
are all mosaic (like a Monet painting).  It seems as if the frequency of key
frames isn't high enough, so I'm wondering which of the x264 settings can
help me.

These ones?  What's a good value?

       --sout-x264-keyint <integer>
                                  Sets maximum interval between IDR- frames

       --sout-x264-scenecut <integer>
                                  Scene-cut detection.

The VLC longhelp is great, but it would be very helpful if all the default
values (and expected ranges) could be provided for these parameters.

thanks very much,

George
University of Canberra, Australia



H264 encoder (using x264 library)
       --sout-x264-qp <integer>   Quantizer parameter
           This selects the quantizer to use (1 to 51). Lower values result
in better fidelity, but higher bitrates. 26 is a good default
           value.
       --sout-x264-qp-min <integer>
                                  Minimum quantizer parameter
           Minimum quantizer, 15/35 seems to be a useful range.
       --sout-x264-qp-max <integer>
                                  Maximum quantizer parameter
           Maximum quantizer parameter.
       --sout-x264-cabac, --no-sout-x264-cabac
                                  Enable CABAC (default enabled)
           Enable CABAC (Context-Adaptive Binary Arithmetic Coding).  
Slightly slows down encoding and decoding, but should save 10-15%
           bitrate. (default enabled)
       --sout-x264-loopfilter, --no-sout-x264-loopfilter
                                  Enable loop filter (default enabled)
           Use deblocking loop filter (increases quality). (default
enabled)
       --sout-x264-analyse {,all,normal,fast,none}
                                  Analyse mode
           This selects the analysing mode.
       --sout-x264-tolerance <float>
                                  Bitrate tolerance
           Sets the allowed variance in average bitrate.
       --sout-x264-vbv-maxrate <integer>
                                  Maximum local bitrate
           Sets a maximum local bitrate in kbits/s.
       --sout-x264-vbv-bufsize <integer>
                                  Averaging period for the maximum local
bitrate
           Sets an averaging period for the maximum local bitrate, in
kbits/s.
       --sout-x264-vbv-init <float>
                                  Initial buffer occupancy
           Sets the initial buffer occupancy as a fraction of the buffer
size.
       --sout-x264-keyint <integer>
                                  Sets maximum interval between IDR- frames
           Larger values save bits, thus improve quality for a given
bitrate, at the cost of seeking precision.
       --sout-x264-keyint-min <integer>
                                  Sets minimum interval between IDR- frames
           In H.264, I-Frames do not necessarily bound a closed GOP because
it is allowable for a P-frame to be predicted from more frames
           than just the one frame before it (also see frameref).  
Therefore, I-frames are not necessarily seekable. IDR-Frames restrict
           subsequent P-frames from referring to any frame prior to the
IDR-Frame.
If scenecuts appear within this interval, they are still
           encoded as I-frames, but do not start a new GOP. Default value is
keyint * 0.4.
       --sout-x264-bframes <integer>
                                  B frames
           Number of consecutive B-Frames between I and P-frames.
       --sout-x264-bpyramid, --no-sout-x264-bpyramid
                                  B pyramid (default disabled)
           Allows B-frames to be used as references for predicting other
frames. (default disabled)
       --sout-x264-frameref <integer>
                                  Number of previous frames used as
predictors.
           This is effective in Anime, but seems to make little difference
in live-action source material. Some decoders are unable to deal
           with large frameref values.
       --sout-x264-scenecut <integer>
                                  Scene-cut detection.
           Controls how aggressively to insert extra I-frames. With small
values of scenecut, the codec often has to force an I-frame when it
           would exceed keyint. Good values of scenecut may find a better
location for the I-frame. Large values use more I-frames than
           necessary, thus wasting bits. -1 disables scene-cut detection, so
I-frames are be inserted only every other keyint frames, which
           probably leads to ugly encoding artifacts.
       --sout-x264-subpel <integer>
                                  Sub-pixel refinement quality.
           This parameter controls quality versus speed tradeoffs involved
in the motion estimation decision process (lower = quicker and
           higher = better quality).
       --sout-x264-me {,dia,hex,umh,esa}
                                  Motion estimation algorithm.
           Selects the motion estimation algorithm:  - dia: diamond search,
radius 1 (fast)
- hex: hexagonal search, radius 2
- umh: uneven
           multi-hexagon search (better but slower)
- esa: exhaustive search (extremely slow, primarily for testing)

       --sout-x264-merange <integer>
                                  Motion estimation search range.
           Maximum distance to search for motion estimation, measured from
predicted position(s). Default of 16 is good for most footage, high
           motion sequences may benefit from settings between 24-32.
       --sout-x264-no-psnr, --no-sout-x264-no-psnr
                                  Disable PSNR calculation. (default
disabled)
           This has no effect on actual encoding quality, it just prevents
the stats from being calculated (for speed). (default disabled)
       --sout-x264-weightb, --no-sout-x264-weightb
                                  Weighted prediction for B-frames.  
(default disabled)
           Weighted prediction for B-frames. (default disabled)
       --sout-x264-no-b-adapt, --no-sout-x264-no-b-adapt
                                  Disable adaptive B-frames. (default
disabled)
           If this is on, the specified number of consecutive B- frames will
always be used, except possibly before an I-frame.  (default
           disabled)
       --sout-x264-b-bias <integer>
                                  Bias the choice to use B-frames.
           Positive values cause more B-frames, negative values cause less
B-frames.
       --sout-x264-mixed-refs, --no-sout-x264-mixed-refs
                                  Decide references on a per partition
basis. (default disabled)
           Decide references on a per partition basis. (default
disabled)
       --sout-x264-crf <integer>  CRF (1-pass Quality-based VBR (nominal
QP)).
           CRF (1-pass Quality-based VBR (nominal QP)).
       --sout-x264-trellis <integer>
                                  Trellis RD quantization.
           Trellis RD quantization. Requires CABAC.
- 0: disabled
- 1: enabled only on the final encode of a MB
- 2: enabled on all mode
           decisions

       --sout-x264-b-rdo, --no-sout-x264-b-rdo
                                  RD based mode decision for B- frames.
(default disabled)
           RD based mode decision for B-frames. Requires subme 6.  
(default disabled)
       --sout-x264-no-fast-pskip, --no-sout-x264-no-fast-pskip
                                  Disable early SKIP detection on P- frames.
(default disabled)
           Disable early SKIP detection on P-frames. (default disabled)

--
This is the vlc mailing-list, see http://www.videolan.org/vlc/ To
unsubscribe, please read http://www.videolan.org/support/lists.html

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list