Advertisement
overdrive80

x264 fullhelp

Mar 5th, 2012
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.23 KB | None | 0 0
  1. x264 core:120 r2164 da19765
  2. Syntax: x264 [options] -o outfile infile
  3.  
  4. Infile can be raw (in which case resolution is required),
  5. or YUV4MPEG (*.y4m),
  6. or Avisynth if compiled with support (yes).
  7. or libav* formats if compiled with lavf support (yes) or ffms support (yes).
  8. Outfile type is selected by filename:
  9. .264 -> Raw bytestream
  10. .mkv -> Matroska
  11. .flv -> Flash Video
  12. .mp4 -> MP4 if compiled with GPAC support (yes)
  13. Output bit depth: 8 (configured at compile time)
  14.  
  15. Options:
  16.  
  17. -h, --help List basic options
  18. --longhelp List more options
  19. --fullhelp List all options
  20.  
  21. Example usage:
  22.  
  23. Constant quality mode:
  24. x264 --crf 24 -o <output> <input>
  25.  
  26. Two-pass with a bitrate of 1000kbps:
  27. x264 --pass 1 --bitrate 1000 -o <output> <input>
  28. x264 --pass 2 --bitrate 1000 -o <output> <input>
  29.  
  30. Lossless:
  31. x264 --qp 0 -o <output> <input>
  32.  
  33. Maximum PSNR at the cost of speed and visual quality:
  34. x264 --preset placebo --tune psnr -o <output> <input>
  35.  
  36. Constant bitrate at 1000kbps with a 2 second-buffer:
  37. x264 --vbv-bufsize 2000 --bitrate 1000 -o <output> <input>
  38.  
  39. Presets:
  40.  
  41. --profile <string> Force the limits of an H.264 profile
  42. Overrides all settings.
  43. - baseline:
  44. --no-8x8dct --bframes 0 --no-cabac
  45. --cqm flat --weightp 0
  46. No interlaced.
  47. No lossless.
  48. - main:
  49. --no-8x8dct --cqm flat
  50. No lossless.
  51. - high:
  52. No lossless.
  53. - high10:
  54. No lossless.
  55. Support for bit depth 8-10.
  56. - high422:
  57. No lossless.
  58. Support for bit depth 8-10.
  59. Support for 4:2:0/4:2:2 chroma subsampling.
  60. - high444:
  61. Support for bit depth 8-10.
  62. Support for 4:2:0/4:2:2/4:4:4 chroma subsampling.
  63. --preset <string> Use a preset to select encoding settings [medium]
  64. Overridden by user settings.
  65. - ultrafast:
  66. --no-8x8dct --aq-mode 0 --b-adapt 0
  67. --bframes 0 --no-cabac --no-deblock
  68. --no-mbtree --me dia --no-mixed-refs
  69. --partitions none --rc-lookahead 0 --ref 1
  70. --scenecut 0 --subme 0 --trellis 0
  71. --no-weightb --weightp 0
  72. - superfast:
  73. --no-mbtree --me dia --no-mixed-refs
  74. --partitions i8x8,i4x4 --rc-lookahead 0
  75. --ref 1 --subme 1 --trellis 0 --weightp 1
  76. - veryfast:
  77. --no-mixed-refs --rc-lookahead 10
  78. --ref 1 --subme 2 --trellis 0 --weightp 1
  79. - faster:
  80. --no-mixed-refs --rc-lookahead 20
  81. --ref 2 --subme 4 --weightp 1
  82. - fast:
  83. --rc-lookahead 30 --ref 2 --subme 6
  84. --weightp 1
  85. - medium:
  86. Default settings apply.
  87. - slow:
  88. --b-adapt 2 --direct auto --me umh
  89. --rc-lookahead 50 --ref 5 --subme 8
  90. - slower:
  91. --b-adapt 2 --direct auto --me umh
  92. --partitions all --rc-lookahead 60
  93. --ref 8 --subme 9 --trellis 2
  94. - veryslow:
  95. --b-adapt 2 --bframes 8 --direct auto
  96. --me umh --merange 24 --partitions all
  97. --ref 16 --subme 10 --trellis 2
  98. --rc-lookahead 60
  99. - placebo:
  100. --bframes 16 --b-adapt 2 --direct auto
  101. --slow-firstpass --no-fast-pskip
  102. --me tesa --merange 24 --partitions all
  103. --rc-lookahead 60 --ref 16 --subme 11
  104. --trellis 2
  105. --tune <string> Tune the settings for a particular type of source
  106. or situation
  107. Overridden by user settings.
  108. Multiple tunings are separated by commas.
  109. Only one psy tuning can be used at a time.
  110. - film (psy tuning):
  111. --deblock -1:-1 --psy-rd <unset>:0.15
  112. - animation (psy tuning):
  113. --bframes {+2} --deblock 1:1
  114. --psy-rd 0.4:<unset> --aq-strength 0.6
  115. --ref {Double if >1 else 1}
  116. - grain (psy tuning):
  117. --aq-strength 0.5 --no-dct-decimate
  118. --deadzone-inter 6 --deadzone-intra 6
  119. --deblock -2:-2 --ipratio 1.1
  120. --pbratio 1.1 --psy-rd <unset>:0.25
  121. --qcomp 0.8
  122. - stillimage (psy tuning):
  123. --aq-strength 1.2 --deblock -3:-3
  124. --psy-rd 2.0:0.7
  125. - psnr (psy tuning):
  126. --aq-mode 0 --no-psy
  127. - ssim (psy tuning):
  128. --aq-mode 2 --no-psy
  129. - fastdecode:
  130. --no-cabac --no-deblock --no-weightb
  131. --weightp 0
  132. - zerolatency:
  133. --bframes 0 --force-cfr --no-mbtree
  134. --sync-lookahead 0 --sliced-threads
  135. --rc-lookahead 0
  136. --slow-firstpass Don't force these faster settings with --pass 1:
  137. --no-8x8dct --me dia --partitions none
  138. --ref 1 --subme {2 if >2 else unchanged}
  139. --trellis 0 --fast-pskip
  140.  
  141. Frame-type options:
  142.  
  143. -I, --keyint <integer or "infinite"> Maximum GOP size [250]
  144. -i, --min-keyint <integer> Minimum GOP size [auto]
  145. --no-scenecut Disable adaptive I-frame decision
  146. --scenecut <integer> How aggressively to insert extra I-frames [40]
  147. --intra-refresh Use Periodic Intra Refresh instead of IDR frames
  148. -b, --bframes <integer> Number of B-frames between I and P [3]
  149. --b-adapt <integer> Adaptive B-frame decision method [1]
  150. Higher values may lower threading efficiency.
  151. - 0: Disabled
  152. - 1: Fast
  153. - 2: Optimal (slow with high --bframes)
  154. --b-bias <integer> Influences how often B-frames are used [0]
  155. --b-pyramid <string> Keep some B-frames as references [normal]
  156. - none: Disabled
  157. - strict: Strictly hierarchical pyramid
  158. - normal: Non-strict (not Blu-ray compatible)
  159. --open-gop Use recovery points to close GOPs
  160. Only available with b-frames
  161. --no-cabac Disable CABAC
  162. -r, --ref <integer> Number of reference frames [3]
  163. --no-deblock Disable loop filter
  164. -f, --deblock <alpha:beta> Loop filter parameters [0:0]
  165. --slices <integer> Number of slices per frame; forces rectangular
  166. slices and is overridden by other slicing options
  167. --slice-max-size <integer> Limit the size of each slice in bytes
  168. --slice-max-mbs <integer> Limit the size of each slice in macroblocks
  169. --tff Enable interlaced mode (top field first)
  170. --bff Enable interlaced mode (bottom field first)
  171. --constrained-intra Enable constrained intra prediction.
  172. --pulldown <string> Use soft pulldown to change frame rate
  173. - none, 22, 32, 64, double, triple, euro (requires cfr input)
  174. --fake-interlaced Flag stream as interlaced but encode progressive.
  175. Makes it possible to encode 25p and 30p Blu-Ray
  176. streams. Ignored in interlaced mode.
  177. --frame-packing <integer> For stereoscopic videos define frame arrangement
  178. - 0: checkerboard - pixels are alternatively from L and R
  179. - 1: column alternation - L and R are interlaced by column
  180. - 2: row alternation - L and R are interlaced by row
  181. - 3: side by side - L is on the left, R on the right
  182. - 4: top bottom - L is on top, R on bottom
  183. - 5: frame alternation - one view per frame
  184.  
  185. Ratecontrol:
  186.  
  187. -q, --qp <integer> Force constant QP (0-69, 0=lossless)
  188. -B, --bitrate <integer> Set bitrate (kbit/s)
  189. --crf <float> Quality-based VBR (0-51) [23.0]
  190. --rc-lookahead <integer> Number of frames for frametype lookahead [40]
  191. --vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
  192. --vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
  193. --vbv-init <float> Initial VBV buffer occupancy [0.9]
  194. --crf-max <float> With CRF+VBV, limit RF to this value
  195. May cause VBV underflows!
  196. --qpmin <integer> Set min QP [0]
  197. --qpmax <integer> Set max QP [69]
  198. --qpstep <integer> Set max QP step [4]
  199. --ratetol <float> Tolerance of ABR ratecontrol and VBV [1.0]
  200. --ipratio <float> QP factor between I and P [1.40]
  201. --pbratio <float> QP factor between P and B [1.30]
  202. --chroma-qp-offset <integer> QP difference between chroma and luma [0]
  203. --aq-mode <integer> AQ method [1]
  204. - 0: Disabled
  205. - 1: Variance AQ (complexity mask)
  206. - 2: Auto-variance AQ (experimental)
  207. --aq-strength <float> Reduces blocking and blurring in flat and
  208. textured areas. [1.0]
  209.  
  210. -p, --pass <integer> Enable multipass ratecontrol
  211. - 1: First pass, creates stats file
  212. - 2: Last pass, does not overwrite stats file
  213. - 3: Nth pass, overwrites stats file
  214. --stats <string> Filename for 2 pass stats ["x264_2pass.log"]
  215. --no-mbtree Disable mb-tree ratecontrol.
  216. --qcomp <float> QP curve compression [0.60]
  217. --cplxblur <float> Reduce fluctuations in QP (before curve compression) [20.0]
  218. --qblur <float> Reduce fluctuations in QP (after curve compression) [0.5]
  219. --zones <zone0>/<zone1>/... Tweak the bitrate of regions of the video
  220. Each zone is of the form
  221. <start frame>,<end frame>,<option>
  222. where <option> is either
  223. q=<integer> (force QP)
  224. or b=<float> (bitrate multiplier)
  225. --qpfile <string> Force frametypes and QPs for some or all frames
  226. Format of each line: framenumber frametype QP
  227. QP is optional (none lets x264 choose). Frametypes: I,i,K,P,B,b.
  228. K=<I or i> depending on open-gop setting
  229. QPs are restricted by qpmin/qpmax.
  230.  
  231. Analysis:
  232.  
  233. -A, --partitions <string> Partitions to consider ["p8x8,b8x8,i8x8,i4x4"]
  234. - p8x8, p4x4, b8x8, i8x8, i4x4
  235. - none, all
  236. (p4x4 requires p8x8. i8x8 requires --8x8dct.)
  237. --direct <string> Direct MV prediction mode ["spatial"]
  238. - none, spatial, temporal, auto
  239. --no-weightb Disable weighted prediction for B-frames
  240. --weightp <integer> Weighted prediction for P-frames [2]
  241. - 0: Disabled
  242. - 1: Weighted refs
  243. - 2: Weighted refs + Duplicates
  244. --me <string> Integer pixel motion estimation method ["hex"]
  245. - dia: diamond search, radius 1 (fast)
  246. - hex: hexagonal search, radius 2
  247. - umh: uneven multi-hexagon search
  248. - esa: exhaustive search
  249. - tesa: hadamard exhaustive search (slow)
  250. --merange <integer> Maximum motion vector search range [16]
  251. --mvrange <integer> Maximum motion vector length [-1 (auto)]
  252. --mvrange-thread <int> Minimum buffer between threads [-1 (auto)]
  253. -m, --subme <integer> Subpixel motion estimation and mode decision [7]
  254. - 0: fullpel only (not recommended)
  255. - 1: SAD mode decision, one qpel iteration
  256. - 2: SATD mode decision
  257. - 3-5: Progressively more qpel
  258. - 6: RD mode decision for I/P-frames
  259. - 7: RD mode decision for all frames
  260. - 8: RD refinement for I/P-frames
  261. - 9: RD refinement for all frames
  262. - 10: QP-RD - requires trellis=2, aq-mode>0
  263. - 11: Full RD: disable all early terminations
  264. --psy-rd <float:float> Strength of psychovisual optimization ["1.0:0.0"]
  265. #1: RD (requires subme>=6)
  266. #2: Trellis (requires trellis, experimental)
  267. --no-psy Disable all visual optimizations that worsen
  268. both PSNR and SSIM.
  269. --no-mixed-refs Don't decide references on a per partition basis
  270. --no-chroma-me Ignore chroma in motion estimation
  271. --no-8x8dct Disable adaptive spatial transform size
  272. -t, --trellis <integer> Trellis RD quantization. [1]
  273. - 0: disabled
  274. - 1: enabled only on the final encode of a MB
  275. - 2: enabled on all mode decisions
  276. --no-fast-pskip Disables early SKIP detection on P-frames
  277. --no-dct-decimate Disables coefficient thresholding on P-frames
  278. --nr <integer> Noise reduction [0]
  279.  
  280. --deadzone-inter <int> Set the size of the inter luma quantization deadzone [21]
  281. --deadzone-intra <int> Set the size of the intra luma quantization deadzone [11]
  282. Deadzones should be in the range 0 - 32.
  283. --cqm <string> Preset quant matrices ["flat"]
  284. - jvt, flat
  285. --cqmfile <string> Read custom quant matrices from a JM-compatible file
  286. Overrides any other --cqm* options.
  287. --cqm4 <list> Set all 4x4 quant matrices
  288. Takes a comma-separated list of 16 integers.
  289. --cqm8 <list> Set all 8x8 quant matrices
  290. Takes a comma-separated list of 64 integers.
  291. --cqm4i, --cqm4p, --cqm8i, --cqm8p <list>
  292. Set both luma and chroma quant matrices
  293. --cqm4iy, --cqm4ic, --cqm4py, --cqm4pc <list>
  294. Set individual quant matrices
  295.  
  296. Video Usability Info (Annex E):
  297. The VUI settings are not used by the encoder but are merely suggestions to
  298. the playback equipment. See doc/vui.txt for details. Use at your own risk.
  299.  
  300. --overscan <string> Specify crop overscan setting ["undef"]
  301. - undef, show, crop
  302. --videoformat <string> Specify video format ["undef"]
  303. - component, pal, ntsc, secam, mac, undef
  304. --range <string> Specify color range ["auto"]
  305. - auto, tv, pc
  306. --colorprim <string> Specify color primaries ["undef"]
  307. - undef, bt709, bt470m, bt470bg
  308. smpte170m, smpte240m, film
  309. --transfer <string> Specify transfer characteristics ["undef"]
  310. - undef, bt709, bt470m, bt470bg, linear,
  311. log100, log316, smpte170m, smpte240m
  312. --colormatrix <string> Specify color matrix setting ["???"]
  313. - undef, bt709, fcc, bt470bg
  314. smpte170m, smpte240m, GBR, YCgCo
  315. --chromaloc <integer> Specify chroma sample location (0 to 5) [0]
  316. --nal-hrd <string> Signal HRD information (requires vbv-bufsize)
  317. - none, vbr, cbr (cbr not allowed in .mp4)
  318. --pic-struct Force pic_struct in Picture Timing SEI
  319. --crop-rect <string> Add 'left,top,right,bottom' to the bitstream-level
  320. cropping rectangle
  321.  
  322. Input/Output:
  323.  
  324. -o, --output <string> Specify output file
  325. --muxer <string> Specify output container format ["auto"]
  326. - auto, raw, mkv, flv, mp4
  327. --demuxer <string> Specify input container format ["auto"]
  328. - auto, raw, y4m, avs, lavf, ffms
  329. --input-fmt <string> Specify input file format (requires lavf support)
  330. --input-csp <string> Specify input colorspace format for raw input
  331. - valid csps for `raw' demuxer:
  332. i420, yv12, nv12, i422, yv16, nv16, i444, yv24, bgr, bgra, rgb
  333. - valid csps for `lavf' demuxer:
  334. yuv420p, yuyv422, rgb24, bgr24, yuv422p,
  335. yuv444p, yuv410p, yuv411p, gray, monow, monob,
  336. pal8, yuvj420p, yuvj422p, yuvj444p, xvmcmc,
  337. xvmcidct, uyvy422, uyyvyy411, bgr8, bgr4,
  338. bgr4_byte, rgb8, rgb4, rgb4_byte, nv12, nv21,
  339. argb, rgba, abgr, bgra, gray16be, gray16le,
  340. yuv440p, yuvj440p, yuva420p, vdpau_h264,
  341. vdpau_mpeg1, vdpau_mpeg2, vdpau_wmv3,
  342. vdpau_vc1, rgb48be, rgb48le, rgb565be,
  343. rgb565le, rgb555be, rgb555le, bgr565be,
  344. bgr565le, bgr555be, bgr555le, vaapi_moco,
  345. vaapi_idct, vaapi_vld, yuv420p16le,
  346. yuv420p16be, yuv422p16le, yuv422p16be,
  347. yuv444p16le, yuv444p16be, vdpau_mpeg4,
  348. dxva2_vld, rgb444le, rgb444be, bgr444le,
  349. bgr444be, y400a, bgr48be, bgr48le, yuv420p9be,
  350. yuv420p9le, yuv420p10be, yuv420p10le,
  351. yuv422p10be, yuv422p10le, yuv444p9be,
  352. yuv444p9le, yuv444p10be, yuv444p10le,
  353. yuv422p9be, yuv422p9le, vda_vld, gbrp, gbrp9be,
  354. gbrp9le, gbrp10be, gbrp10le, gbrp16be,
  355. gbrp16le
  356. --output-csp <string> Specify output colorspace ["i420"]
  357. - i420, i422, i444, rgb
  358. --input-depth <integer> Specify input bit depth for raw input
  359. --input-range <string> Specify input color range ["auto"]
  360. - auto, tv, pc
  361. --input-res <intxint> Specify input resolution (width x height)
  362. --index <string> Filename for input index file
  363. --sar width:height Specify Sample Aspect Ratio
  364. --fps <float|rational> Specify framerate
  365. --seek <integer> First frame to encode
  366. --frames <integer> Maximum number of frames to encode
  367. --level <string> Specify level (as defined by Annex A)
  368. --bluray-compat Enable compatibility hacks for Blu-ray support
  369.  
  370. -v, --verbose Print stats for each frame
  371. --no-progress Don't show the progress indicator while encoding
  372. --quiet Quiet Mode
  373. --log-level <string> Specify the maximum level of logging ["info"]
  374. - none, error, warning, info, debug
  375. --psnr Enable PSNR computation
  376. --ssim Enable SSIM computation
  377. --threads <integer> Force a specific number of threads
  378. --sliced-threads Low-latency but lower-efficiency threading
  379. --thread-input Run Avisynth in its own thread
  380. --sync-lookahead <integer> Number of buffer frames for threaded lookahead
  381. --non-deterministic Slightly improve quality of SMP, at the cost of repeatability
  382. --cpu-independent Ensure exact reproducibility across different cpus,
  383. as opposed to letting them select different algorithms
  384. --asm <integer> Override CPU detection
  385. --no-asm Disable all CPU optimizations
  386. --visualize Show MB types overlayed on the encoded video
  387. --dump-yuv <string> Save reconstructed frames
  388. --sps-id <integer> Set SPS and PPS id numbers [0]
  389. --aud Use access unit delimiters
  390. --force-cfr Force constant framerate timestamp generation
  391. --tcfile-in <string> Force timestamp generation with timecode file
  392. --tcfile-out <string> Output timecode v2 file from input timestamps
  393. --timebase <int/int> Specify timebase numerator and denominator
  394. <integer> Specify timebase numerator for input timecode file
  395. or specify timebase denominator for other input
  396. --dts-compress Eliminate initial delay with container DTS hack
  397.  
  398. Filtering:
  399.  
  400. --vf, --video-filter <filter0>/<filter1>/... Apply video filtering to the input file
  401.  
  402. Filter options may be specified in <filter>:<option>=<value> format.
  403.  
  404. Available filters:
  405. crop:left,top,right,bottom
  406. removes pixels from the edges of the frame
  407. resize:[width,height][,sar][,fittobox][,csp][,method]
  408. resizes frames based on the given criteria:
  409. - resolution only: resizes and adapts sar to avoid stretching
  410. - sar only: sets the sar and resizes to avoid stretching
  411. - resolution and sar: resizes to given resolution and sets the sar
  412. - fittobox: resizes the video based on the desired constraints
  413. - width, height, both
  414. - fittobox and sar: same as above except with specified sar
  415. - csp: convert to the given csp. syntax: [name][:depth]
  416. - valid csp names [keep current]: i420, yv12, nv12, i422, yv16, nv16, i444, yv24, bgr, bgra, rgb
  417. - depth: 8 or 16 bits per pixel [keep current]
  418. note: not all depths are supported by all csps.
  419. - method: use resizer method ["bicubic"]
  420. - fastbilinear, bilinear, bicubic, experimental, point,
  421. - area, bicublin, gauss, sinc, lanczos, spline
  422. select_every:step,offset1[,...]
  423. apply a selection pattern to input frames
  424. step: the number of frames in the pattern
  425. offsets: the offset into the step to select a frame
  426. see: http://avisynth.org/mediawiki/Select#SelectEvery
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement