Нужно поставить конфигурацию в x264vfw
http://s2.ipicture.ru/uploads/20120723/BBT8HH23.jpg (http://s2.ipicture.ru/)
Рендерит всё без проблем, но мне нужно задать дополнительные параметры, чтобы видео получилось с меньшим размером и лучшим кач-вом.
Вот, что получается при рендеринге моего видео:
http://i41.fastpic.ru/big/2012/0723/7f/be73b9d59e8dfddadc0690eeb17ad67f.jpg (http://fastpic.ru/) Format settings, CABAC : No
Encoding settings : cabac=0 / ref=3 / deblock=0: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=1 / chroma_qp_offset=-2 / threads=4 / sliced_threads=1 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=25.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Что хотел бы я получить (видео не моё взял как пример, но его размер и кач-во отличное):
http://i40.fastpic.ru/big/2012/0723/f2/11e052f12403a59e1e50a7947bdbf5f2.jpg (http://fastpic.ru/) Format settings, CABAC : Yes
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=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=5000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Мне нужно включить некоторые настройки ( cabac, deblock ), но как это сделать я не знаю. В 1ом скрине в нижней части есть поле Extra command line, я так понимаю туда надо вписывать настройки, но в каком виде?
Также хотел бы узнать оптимальные настройки для H264, если знаете.
Надеюсь на вашу помощь.
Extra command line, я так понимаю туда надо вписывать настройки, но в каком виде?
а рядом с ним кнопка с вопросом. Не оно?
Почему при указанном отключен cabac и deblock непонятно. Они только в ultrafast preset отключены, насколько я не помню.
Попробуйте следующее:
Preset slow
Tuning film
Profile high
Level auto
а рядом с ним кнопка с вопросом. Не оно?
Это хелп. Вот что внутри него
Presets:
--profile <string> Force the limits of an H.264 profile
Overrides all settings.
- baseline:
--no-8x8dct --bframes 0 --no-cabac
--cqm flat --weightp 0
No interlaced.
No lossless.
- main:
--no-8x8dct --cqm flat
No lossless.
- high:
No lossless.
- high10:
No lossless.
Support for bit depth 8-10.
- high422:
No lossless.
Support for bit depth 8-10.
Support for 4:2:0/4:2:2 chroma subsampling.
- high444:
Support for bit depth 8-10.
Support for 4:2:0/4:2:2/4:4:4 chroma subsampling.
--preset <string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast:
--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --rc-lookahead 0 --ref 1
--scenecut 0 --subme 0 --trellis 0
--no-weightb --weightp 0
- superfast:
--no-mbtree --me dia --no-mixed-refs
--partitions i8x8,i4x4 --rc-lookahead 0
--ref 1 --subme 1 --trellis 0 --weightp 1
- veryfast:
--no-mixed-refs --rc-lookahead 10
--ref 1 --subme 2 --trellis 0 --weightp 1
- faster:
--no-mixed-refs --rc-lookahead 20
--ref 2 --subme 4 --weightp 1
- fast:
--rc-lookahead 30 --ref 2 --subme 6
--weightp 1
- medium:
Default settings apply.
- slow:
--b-adapt 2 --direct auto --me umh
--rc-lookahead 50 --ref 5 --subme 8
- slower:
--b-adapt 2 --direct auto --me umh
--partitions all --rc-lookahead 60
--ref 8 --subme 9 --trellis 2
- veryslow:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60
- placebo:
--bframes 16 --b-adapt 2 --direct auto
--no-fast-pskip --me tesa --merange 24
--partitions all --rc-lookahead 60
--ref 16 --subme 11 --trellis 2
--tune <string> Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- film (psy tuning):
--deblock -1:-1 --psy-rd <unset>:0.15
- animation (psy tuning):
--bframes {+2} --deblock 1:1
--psy-rd 0.4:<unset> --aq-strength 0.6
--ref {Double if >1 else 1}
- grain (psy tuning):
--aq-strength 0.5 --no-dct-decimate
--deadzone-inter 6 --deadzone-intra 6
--deblock -2:-2 --ipratio 1.1
--pbratio 1.1 --psy-rd <unset>:0.25
--qcomp 0.8
- stillimage (psy tuning):
--aq-strength 1.2 --deblock -3:-3
--psy-rd 2.0:0.7
- psnr (psy tuning):
--aq-mode 0 --no-psy
- ssim (psy tuning):
--aq-mode 2 --no-psy
- fastdecode:
--no-cabac --no-deblock --no-weightb
--weightp 0
- zerolatency:
--bframes 0 --force-cfr --no-mbtree
--sync-lookahead 0 --sliced-threads
--rc-lookahead 0
--fast-firstpass Force these faster settings with --pass 1:
--no-8x8dct --me dia --partitions none
--ref 1 --subme {2 if >2 else unchanged}
--trellis 0 --fast-pskip
--slow-firstpass Don't force faster settings with --pass 1
Frame-type options:
-I, --keyint <integer or "infinite"> Maximum GOP size [250]
-i, --min-keyint <integer> Minimum GOP size [auto]
--no-scenecut Disable adaptive I-frame decision
--scenecut <integer> How aggressively to insert extra I-frames [40]
--intra-refresh Use Periodic Intra Refresh instead of IDR frames
-b, --bframes <integer> Number of B-frames between I and P [3]
--b-adapt <integer> Adaptive B-frame decision method [1]
Higher values may lower threading efficiency.
- 0: Disabled
- 1: Fast
- 2: Optimal (slow with high --bframes)
--b-bias <integer> Influences how often B-frames are used [0]
--b-pyramid <string> Keep some B-frames as references [normal]
- none: Disabled
- strict: Strictly hierarchical pyramid
- normal: Non-strict (not Blu-ray compatible)
--open-gop Use recovery points to close GOPs
Only available with b-frames
--no-cabac Disable CABAC
-r, --ref <integer> Number of reference frames [3]
--no-deblock Disable loop filter
-f, --deblock <alpha:beta> Loop filter parameters [0:0]
--slices <integer> Number of slices per frame; forces rectangular
slices and is overridden by other slicing options
--slice-max-size <integer> Limit the size of each slice in bytes
--slice-max-mbs <integer> Limit the size of each slice in macroblocks
--tff Enable interlaced mode (top field first)
--bff Enable interlaced mode (bottom field first)
--constrained-intra Enable constrained intra prediction.
--fake-interlaced Flag stream as interlaced but encode progressive.
Makes it possible to encode 25p and 30p Blu-Ray
streams. Ignored in interlaced mode.
--frame-packing <integer> For stereoscopic videos define frame arrangement
- 0: checkerboard - pixels are alternatively from L and R
- 1: column alternation - L and R are interlaced by column
- 2: row alternation - L and R are interlaced by row
- 3: side by side - L is on the left, R on the right
- 4: top bottom - L is on top, R on bottom
- 5: frame alternation - one view per frame
Ratecontrol:
-q, --qp <integer> Force constant QP (0-51, 0=lossless)
-B, --bitrate <integer> Set bitrate (kbit/s)
--crf <float> Quality-based VBR (0-51) [23.0]
--rc-lookahead <integer> Number of frames for frametype lookahead [40]
--vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
--vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
--vbv-init <float> Initial VBV buffer occupancy [0.9]
--crf-max <float> With CRF+VBV, limit RF to this value
May cause VBV underflows!
--qpmin <integer> Set min QP [0]
--qpmax <integer> Set max QP [69]
--qpstep <integer> Set max QP step [4]
--ratetol <float> Tolerance of ABR ratecontrol and VBV [1.0]
--ipratio <float> QP factor between I and P [1.40]
--pbratio <float> QP factor between P and B [1.30]
--chroma-qp-offset <integer> QP difference between chroma and luma [0]
--aq-mode <integer> AQ method [1]
- 0: Disabled
- 1: Variance AQ (complexity mask)
- 2: Auto-variance AQ (experimental)
- 3: Auto-variance AQ modification
--aq-strength <float> Reduces blocking and blurring in flat and
textured areas. [1.0]
-p, --pass <integer> Enable multipass ratecontrol
- 1: First pass, creates stats file
- 2: Last pass, does not overwrite stats file
- 3: Nth pass, overwrites stats file
--stats <string> Filename for 2 pass stats ["x264_2pass.log"]
--no-mbtree Disable mb-tree ratecontrol.
--qcomp <float> QP curve compression [0.60]
--cplxblur <float> Reduce fluctuations in QP (before curve compression) [20.0]
--qblur <float> Reduce fluctuations in QP (after curve compression) [0.5]
--zones <zone0>/<zone1>/... Tweak the bitrate of regions of the video
Each zone is of the form
<start frame>,<end frame>,<option>
where <option> is either
q=<integer> (force QP)
or b=<float> (bitrate multiplier)
Analysis:
-A, --partitions <string> Partitions to consider ["p8x8,b8x8,i8x8,i4x4"]
- p8x8, p4x4, b8x8, i8x8, i4x4
- none, all
(p4x4 requires p8x8. i8x8 requires --8x8dct.)
--direct <string> Direct MV prediction mode ["spatial"]
- none, spatial, temporal, auto
--no-weightb Disable weighted prediction for B-frames
--weightp <integer> Weighted prediction for P-frames [2]
- 0: Disabled
- 1: Weighted refs
- 2: Weighted refs + Duplicates
--me <string> Integer pixel motion estimation method ["hex"]
- dia: diamond search, radius 1 (fast)
- hex: hexagonal search, radius 2
- umh: uneven multi-hexagon search
- esa: exhaustive search
- tesa: hadamard exhaustive search (slow)
--merange <integer> Maximum motion vector search range [16]
--mvrange <integer> Maximum motion vector length [-1 (auto)]
--mvrange-thread <int> Minimum buffer between threads [-1 (auto)]
-m, --subme <integer> Subpixel motion estimation and mode decision [7]
- 0: fullpel only (not recommended)
- 1: SAD mode decision, one qpel iteration
- 2: SATD mode decision
- 3-5: Progressively more qpel
- 6: RD mode decision for I/P-frames
- 7: RD mode decision for all frames
- 8: RD refinement for I/P-frames
- 9: RD refinement for all frames
- 10: QP-RD - requires trellis=2, aq-mode>0
- 11: Full RD: disable all early terminations
--psy-rd <float:float> Strength of psychovisual optimization ["1.0:0.0"]
#1: RD (requires subme>=6)
#2: Trellis (requires trellis, experimental)
--no-psy Disable all visual optimizations that worsen
both PSNR and SSIM.
--no-mixed-refs Don't decide references on a per partition basis
--no-chroma-me Ignore chroma in motion estimation
--no-8x8dct Disable adaptive spatial transform size
-t, --trellis <integer> Trellis RD quantization. [1]
- 0: disabled
- 1: enabled only on the final encode of a MB
- 2: enabled on all mode decisions
--no-fast-pskip Disables early SKIP detection on P-frames
--no-dct-decimate Disables coefficient thresholding on P-frames
--nr <integer> Noise reduction [0]
--deadzone-inter <int> Set the size of the inter luma quantization deadzone [21]
--deadzone-intra <int> Set the size of the intra luma quantization deadzone [11]
Deadzones should be in the range 0 - 32.
--cqm <string> Preset quant matrices ["flat"]
- jvt, flat
--cqmfile <string> Read custom quant matrices from a JM-compatible file
Overrides any other --cqm* options.
--cqm4 <list> Set all 4x4 quant matrices
Takes a comma-separated list of 16 integers.
--cqm8 <list> Set all 8x8 quant matrices
Takes a comma-separated list of 64 integers.
--cqm4i, --cqm4p, --cqm8i, --cqm8p <list>
Set both luma and chroma quant matrices
--cqm4iy, --cqm4ic, --cqm4py, --cqm4pc <list>
Set individual quant matrices
Video Usability Info (Annex E):
The VUI settings are not used by the encoder but are merely suggestions to
the playback equipment. See doc/vui.txt for details. Use at your own risk.
--overscan <string> Specify crop overscan setting ["undef"]
- undef, show, crop
--videoformat <string> Specify video format ["undef"]
- component, pal, ntsc, secam, mac, undef
--range <string> Specify color range ["auto"]
- auto, tv, pc
--colorprim <string> Specify color primaries ["undef"]
- undef, bt709, bt470m, bt470bg
smpte170m, smpte240m, film
--transfer <string> Specify transfer characteristics ["undef"]
- undef, bt709, bt470m, bt470bg, linear,
log100, log316, smpte170m, smpte240m
--colormatrix <string> Specify color matrix setting ["undef"]
- undef, bt709, fcc, bt470bg
smpte170m, smpte240m, GBR, YCgCo
--chromaloc <integer> Specify chroma sample location (0 to 5) [0]
--nal-hrd <string> Signal HRD information (requires vbv-bufsize)
- none, vbr, cbr (cbr not allowed in .mp4)
--pic-struct Force pic_struct in Picture Timing SEI
--crop-rect <string> Add 'left,top,right,bottom' to the bitstream-level
cropping rectangle
Input/Output:
-o, --output <string> Specify output file
--muxer <string> Specify output container format ["auto"]
- auto, raw, mkv, flv, mp4, avi
--sar width:height Specify Sample Aspect Ratio
--fps <float|rational> Specify framerate
--level <string> Specify level (as defined by Annex A)
--bluray-compat Enable compatibility hacks for Blu-ray support
-v, --verbose Print stats for each frame
--quiet Quiet Mode
--log-level <string> Specify the maximum level of logging ["info"]
- none, error, warning, info, debug
--psnr Enable PSNR computation
--ssim Enable SSIM computation
--threads <integer> Force a specific number of threads
--sliced-threads Low-latency but lower-efficiency threading
--sync-lookahead <integer> Number of buffer frames for threaded lookahead
--non-deterministic Slightly improve quality of SMP, at the cost of repeatability
--cpu-independent Ensure exact reproducibility across different cpus,
as opposed to letting them select different algorithms
--asm <integer> Override CPU detection
--no-asm Disable all CPU optimizations
--dump-yuv <string> Save reconstructed frames
--sps-id <integer> Set SPS and PPS id numbers [0]
--aud Use access unit delimiters
--force-cfr Force constant framerate timestamp generation
--dts-compress Eliminate initial delay with container DTS hack По идее вписывать настройки нужно в Extra command line, но что именно писать я понятия не имею. Найти бы готовые конфиги, чтобы скопипастить и ок.
Вроде кодек H264 популярный, неужели никто не сталкивался с ним?
Я кажется разобрался. Параметры вписываются в Extra command line.
Вот вам мой конфиг в пример: --preset placebo --bitrate 4000 --bframes 3 --b-adapt 1 --ref 4 --me umh --direct spatial
Может кому поможет, вот чёткий гайд http://forum.kinozal.tv/showthread.php?t=189299
Всё по полочкам толково расписано.
Всем спс, пойду делать мув) темку можно клоуз.