Guest User

Untitled

a guest
Jun 3rd, 2017
30
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x264 core:148 r2744 b97ae06
  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 or L-SMASH support (lsmash)
  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. --direct auto --rc-lookahead 50 --ref 5
  89. --subme 8 --trellis 2
  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. --slices-max <integer> Absolute maximum slices per frame; overrides
  168. slice-max-size/slice-max-mbs when necessary
  169. --slice-max-size <integer> Limit the size of each slice in bytes
  170. --slice-max-mbs <integer> Limit the size of each slice in macroblocks (max)
  171. --slice-min-mbs <integer> Limit the size of each slice in macroblocks (min)
  172. --tff Enable interlaced mode (top field first)
  173. --bff Enable interlaced mode (bottom field first)
  174. --constrained-intra Enable constrained intra prediction.
  175. --pulldown <string> Use soft pulldown to change frame rate
  176. - none, 22, 32, 64, double, triple, euro (requires cfr input)
  177. --fake-interlaced Flag stream as interlaced but encode progressive.
  178. Makes it possible to encode 25p and 30p Blu-Ray
  179. streams. Ignored in interlaced mode.
  180. --frame-packing <integer> For stereoscopic videos define frame arrangement
  181. - 0: checkerboard - pixels are alternatively from L and R
  182. - 1: column alternation - L and R are interlaced by column
  183. - 2: row alternation - L and R are interlaced by row
  184. - 3: side by side - L is on the left, R on the right
  185. - 4: top bottom - L is on top, R on bottom
  186. - 5: frame alternation - one view per frame
  187. - 6: mono - 2D frame without any frame packing
  188. - 7: tile format - L is on top-left, R split across
  189.  
  190. Ratecontrol:
  191.  
  192. -q, --qp <integer> Force constant QP (0-69, 0=lossless)
  193. -B, --bitrate <integer> Set bitrate (kbit/s)
  194. --crf <float> Quality-based VBR (0-51) [23.0]
  195. --rc-lookahead <integer> Number of frames for frametype lookahead [40]
  196. --vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
  197. --vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
  198. --vbv-init <float> Initial VBV buffer occupancy [0.9]
  199. --crf-max <float> With CRF+VBV, limit RF to this value
  200. May cause VBV underflows!
  201. --qpmin <integer> Set min QP [0]
  202. --qpmax <integer> Set max QP [69]
  203. --qpstep <integer> Set max QP step [4]
  204. --ratetol <float> Tolerance of ABR ratecontrol and VBV [1.0]
  205. --ipratio <float> QP factor between I and P [1.40]
  206. --pbratio <float> QP factor between P and B [1.30]
  207. --chroma-qp-offset <integer> QP difference between chroma and luma [0]
  208. --aq-mode <integer> AQ method [1]
  209. - 0: Disabled
  210. - 1: Variance AQ (complexity mask)
  211. - 2: Auto-variance AQ
  212. - 3: Auto-variance AQ with bias to dark scenes
  213. --aq-strength <float> Reduces blocking and blurring in flat and
  214. textured areas. [1.0]
  215.  
  216. -p, --pass <integer> Enable multipass ratecontrol
  217. - 1: First pass, creates stats file
  218. - 2: Last pass, does not overwrite stats file
  219. - 3: Nth pass, overwrites stats file
  220. --stats <string> Filename for 2 pass stats ["x264_2pass.log"]
  221. --no-mbtree Disable mb-tree ratecontrol.
  222. --qcomp <float> QP curve compression [0.60]
  223. --cplxblur <float> Reduce fluctuations in QP (before curve compression) [20.0]
  224. --qblur <float> Reduce fluctuations in QP (after curve compression) [0.5]
  225. --zones <zone0>/<zone1>/... Tweak the bitrate of regions of the video
  226. Each zone is of the form
  227. <start frame>,<end frame>,<option>
  228. where <option> is either
  229. q=<integer> (force QP)
  230. or b=<float> (bitrate multiplier)
  231. --qpfile <string> Force frametypes and QPs for some or all frames
  232. Format of each line: framenumber frametype QP
  233. QP is optional (none lets x264 choose). Frametypes: I,i,K,P,B,b.
  234. K=<I or i> depending on open-gop setting
  235. QPs are restricted by qpmin/qpmax.
  236.  
  237. Analysis:
  238.  
  239. -A, --partitions <string> Partitions to consider ["p8x8,b8x8,i8x8,i4x4"]
  240. - p8x8, p4x4, b8x8, i8x8, i4x4
  241. - none, all
  242. (p4x4 requires p8x8. i8x8 requires --8x8dct.)
  243. --direct <string> Direct MV prediction mode ["spatial"]
  244. - none, spatial, temporal, auto
  245. --no-weightb Disable weighted prediction for B-frames
  246. --weightp <integer> Weighted prediction for P-frames [2]
  247. - 0: Disabled
  248. - 1: Weighted refs
  249. - 2: Weighted refs + Duplicates
  250. --me <string> Integer pixel motion estimation method ["hex"]
  251. - dia: diamond search, radius 1 (fast)
  252. - hex: hexagonal search, radius 2
  253. - umh: uneven multi-hexagon search
  254. - esa: exhaustive search
  255. - tesa: hadamard exhaustive search (slow)
  256. --merange <integer> Maximum motion vector search range [16]
  257. --mvrange <integer> Maximum motion vector length [-1 (auto)]
  258. --mvrange-thread <int> Minimum buffer between threads [-1 (auto)]
  259. -m, --subme <integer> Subpixel motion estimation and mode decision [7]
  260. - 0: fullpel only (not recommended)
  261. - 1: SAD mode decision, one qpel iteration
  262. - 2: SATD mode decision
  263. - 3-5: Progressively more qpel
  264. - 6: RD mode decision for I/P-frames
  265. - 7: RD mode decision for all frames
  266. - 8: RD refinement for I/P-frames
  267. - 9: RD refinement for all frames
  268. - 10: QP-RD - requires trellis=2, aq-mode>0
  269. - 11: Full RD: disable all early terminations
  270. --psy-rd <float:float> Strength of psychovisual optimization ["1.0:0.0"]
  271. #1: RD (requires subme>=6)
  272. #2: Trellis (requires trellis, experimental)
  273. --no-psy Disable all visual optimizations that worsen
  274. both PSNR and SSIM.
  275. --no-mixed-refs Don't decide references on a per partition basis
  276. --no-chroma-me Ignore chroma in motion estimation
  277. --no-8x8dct Disable adaptive spatial transform size
  278. -t, --trellis <integer> Trellis RD quantization. [1]
  279. - 0: disabled
  280. - 1: enabled only on the final encode of a MB
  281. - 2: enabled on all mode decisions
  282. --no-fast-pskip Disables early SKIP detection on P-frames
  283. --no-dct-decimate Disables coefficient thresholding on P-frames
  284. --nr <integer> Noise reduction [0]
  285.  
  286. --deadzone-inter <int> Set the size of the inter luma quantization deadzone [21]
  287. --deadzone-intra <int> Set the size of the intra luma quantization deadzone [11]
  288. Deadzones should be in the range 0 - 32.
  289. --cqm <string> Preset quant matrices ["flat"]
  290. - jvt, flat
  291. --cqmfile <string> Read custom quant matrices from a JM-compatible file
  292. Overrides any other --cqm* options.
  293. --cqm4 <list> Set all 4x4 quant matrices
  294. Takes a comma-separated list of 16 integers.
  295. --cqm8 <list> Set all 8x8 quant matrices
  296. Takes a comma-separated list of 64 integers.
  297. --cqm4i, --cqm4p, --cqm8i, --cqm8p <list>
  298. Set both luma and chroma quant matrices
  299. --cqm4iy, --cqm4ic, --cqm4py, --cqm4pc <list>
  300. Set individual quant matrices
  301.  
  302. Video Usability Info (Annex E):
  303. The VUI settings are not used by the encoder but are merely suggestions to
  304. the playback equipment. See doc/vui.txt for details. Use at your own risk.
  305.  
  306. --overscan <string> Specify crop overscan setting ["undef"]
  307. - undef, show, crop
  308. --videoformat <string> Specify video format ["undef"]
  309. - component, pal, ntsc, secam, mac, undef
  310. --range <string> Specify color range ["auto"]
  311. - auto, tv, pc
  312. --colorprim <string> Specify color primaries ["undef"]
  313. - undef, bt709, bt470m, bt470bg, smpte170m,
  314. smpte240m, film, bt2020, smpte428,
  315. smpte431, smpte432
  316. --transfer <string> Specify transfer characteristics ["undef"]
  317. - undef, bt709, bt470m, bt470bg, smpte170m,
  318. smpte240m, linear, log100, log316,
  319. iec61966-2-4, bt1361e, iec61966-2-1,
  320. bt2020-10, bt2020-12, smpte2084, smpte428
  321. --colormatrix <string> Specify color matrix setting ["???"]
  322. - undef, bt709, fcc, bt470bg, smpte170m,
  323. smpte240m, GBR, YCgCo, bt2020nc, bt2020c,
  324. smpte2085
  325. --chromaloc <integer> Specify chroma sample location (0 to 5) [0]
  326. --nal-hrd <string> Signal HRD information (requires vbv-bufsize)
  327. - none, vbr, cbr (cbr not allowed in .mp4)
  328. --filler Force hard-CBR and generate filler (implied by
  329. --nal-hrd cbr)
  330. --pic-struct Force pic_struct in Picture Timing SEI
  331. --crop-rect <string> Add 'left,top,right,bottom' to the bitstream-level
  332. cropping rectangle
  333.  
  334. Input/Output:
  335.  
  336. -o, --output <string> Specify output file
  337. --muxer <string> Specify output container format ["auto"]
  338. - auto, raw, mkv, flv, mp4
  339. --demuxer <string> Specify input container format ["auto"]
  340. - auto, raw, y4m, avs, lavf, ffms
  341. --input-fmt <string> Specify input file format (requires lavf support)
  342. --input-csp <string> Specify input colorspace format for raw input
  343. - valid csps for `raw' demuxer:
  344. i420, yv12, nv12, nv21, i422, yv16, nv16, i444, yv24, bgr, bgra, rgb
  345. - valid csps for `lavf' demuxer:
  346. yuv420p, yuyv422, rgb24, bgr24, yuv422p,
  347. yuv444p, yuv410p, yuv411p, gray, monow, monob,
  348. pal8, yuvj420p, yuvj422p, yuvj444p, xvmcmc,
  349. xvmcidct, uyvy422, uyyvyy411, bgr8, bgr4,
  350. bgr4_byte, rgb8, rgb4, rgb4_byte, nv12, nv21,
  351. argb, rgba, abgr, bgra, gray16be, gray16le,
  352. yuv440p, yuvj440p, yuva420p, vdpau_h264,
  353. vdpau_mpeg1, vdpau_mpeg2, vdpau_wmv3,
  354. vdpau_vc1, rgb48be, rgb48le, rgb565be,
  355. rgb565le, rgb555be, rgb555le, bgr565be,
  356. bgr565le, bgr555be, bgr555le, vaapi_moco,
  357. vaapi_idct, vaapi_vld, yuv420p16le,
  358. yuv420p16be, yuv422p16le, yuv422p16be,
  359. yuv444p16le, yuv444p16be, vdpau_mpeg4,
  360. dxva2_vld, rgb444le, rgb444be, bgr444le,
  361. bgr444be, ya8, bgr48be, bgr48le, yuv420p9be,
  362. yuv420p9le, yuv420p10be, yuv420p10le,
  363. yuv422p10be, yuv422p10le, yuv444p9be,
  364. yuv444p9le, yuv444p10be, yuv444p10le,
  365. yuv422p9be, yuv422p9le, vda_vld, gbrp, gbrp9be,
  366. gbrp9le, gbrp10be, gbrp10le, gbrp16be,
  367. gbrp16le, yuva422p, yuva444p, yuva420p9be,
  368. yuva420p9le, yuva422p9be, yuva422p9le,
  369. yuva444p9be, yuva444p9le, yuva420p10be,
  370. yuva420p10le, yuva422p10be, yuva422p10le,
  371. yuva444p10be, yuva444p10le, yuva420p16be,
  372. yuva420p16le, yuva422p16be, yuva422p16le,
  373. yuva444p16be, yuva444p16le, vdpau, xyz12le,
  374. xyz12be, nv16, nv20le, nv20be, rgba64be,
  375. rgba64le, bgra64be, bgra64le, yvyu422, vda,
  376. ya16be, ya16le, gbrap, gbrap16be, gbrap16le,
  377. qsv, mmal, d3d11va_vld, cuda, 0rgb, rgb0, 0bgr,
  378. bgr0, yuv420p12be, yuv420p12le, yuv420p14be,
  379. yuv420p14le, yuv422p12be, yuv422p12le,
  380. yuv422p14be, yuv422p14le, yuv444p12be,
  381. yuv444p12le, yuv444p14be, yuv444p14le,
  382. gbrp12be, gbrp12le, gbrp14be, gbrp14le,
  383. yuvj411p, bayer_bggr8, bayer_rggb8,
  384. bayer_gbrg8, bayer_grbg8, bayer_bggr16le,
  385. bayer_bggr16be, bayer_rggb16le, bayer_rggb16be,
  386. bayer_gbrg16le, bayer_gbrg16be, bayer_grbg16le,
  387. bayer_grbg16be, yuv440p10le, yuv440p10be,
  388. yuv440p12le, yuv440p12be, ayuv64le, ayuv64be,
  389. videotoolbox_vld, p010le, p010be, gbrap12be,
  390. gbrap12le, gbrap10be, gbrap10le, mediacodec,
  391. gray12be, gray12le, gray10be, gray10le, p016le,
  392. p016be
  393. --output-csp <string> Specify output colorspace ["i420"]
  394. - i420, i422, i444, rgb
  395. --input-depth <integer> Specify input bit depth for raw input
  396. --input-range <string> Specify input color range ["auto"]
  397. - auto, tv, pc
  398. --input-res <intxint> Specify input resolution (width x height)
  399. --index <string> Filename for input index file
  400. --sar width:height Specify Sample Aspect Ratio
  401. --fps <float|rational> Specify framerate
  402. --seek <integer> First frame to encode
  403. --frames <integer> Maximum number of frames to encode
  404. --level <string> Specify level (as defined by Annex A)
  405. --bluray-compat Enable compatibility hacks for Blu-ray support
  406. --avcintra-class <integer> Use compatibility hacks for AVC-Intra class
  407. - 50, 100, 200
  408. --stitchable Don't optimize headers based on video content
  409. Ensures ability to recombine a segmented encode
  410.  
  411. -v, --verbose Print stats for each frame
  412. --no-progress Don't show the progress indicator while encoding
  413. --quiet Quiet Mode
  414. --log-level <string> Specify the maximum level of logging ["info"]
  415. - none, error, warning, info, debug
  416. --psnr Enable PSNR computation
  417. --ssim Enable SSIM computation
  418. --threads <integer> Force a specific number of threads
  419. --lookahead-threads <integer> Force a specific number of lookahead threads
  420. --sliced-threads Low-latency but lower-efficiency threading
  421. --thread-input Run Avisynth in its own thread
  422. --sync-lookahead <integer> Number of buffer frames for threaded lookahead
  423. --non-deterministic Slightly improve quality of SMP, at the cost of repeatability
  424. --cpu-independent Ensure exact reproducibility across different cpus,
  425. as opposed to letting them select different algorithms
  426. --asm <integer> Override CPU detection
  427. --no-asm Disable all CPU optimizations
  428. --opencl Enable use of OpenCL
  429. --opencl-clbin <string> Specify path of compiled OpenCL kernel cache
  430. --opencl-device <integer> Specify OpenCL device ordinal
  431. --dump-yuv <string> Save reconstructed frames
  432. --sps-id <integer> Set SPS and PPS id numbers [0]
  433. --aud Use access unit delimiters
  434. --force-cfr Force constant framerate timestamp generation
  435. --tcfile-in <string> Force timestamp generation with timecode file
  436. --tcfile-out <string> Output timecode v2 file from input timestamps
  437. --timebase <int/int> Specify timebase numerator and denominator
  438. <integer> Specify timebase numerator for input timecode file
  439. or specify timebase denominator for other input
  440. --dts-compress Eliminate initial delay with container DTS hack
  441.  
  442. Filtering:
  443.  
  444. --vf, --video-filter <filter0>/<filter1>/... Apply video filtering to the input file
  445.  
  446. Filter options may be specified in <filter>:<option>=<value> format.
  447.  
  448. Available filters:
  449. crop:left,top,right,bottom
  450. removes pixels from the edges of the frame
  451. resize:[width,height][,sar][,fittobox][,csp][,method]
  452. resizes frames based on the given criteria:
  453. - resolution only: resizes and adapts sar to avoid stretching
  454. - sar only: sets the sar and resizes to avoid stretching
  455. - resolution and sar: resizes to given resolution and sets the sar
  456. - fittobox: resizes the video based on the desired constraints
  457. - width, height, both
  458. - fittobox and sar: same as above except with specified sar
  459. - csp: convert to the given csp. syntax: [name][:depth]
  460. - valid csp names [keep current]: i420, yv12, nv12, nv21, i422, yv16, nv16, i444, yv24, bgr, bgra, rgb
  461. - depth: 8 or 16 bits per pixel [keep current]
  462. note: not all depths are supported by all csps.
  463. - method: use resizer method ["bicubic"]
  464. - fastbilinear, bilinear, bicubic, experimental, point,
  465. - area, bicublin, gauss, sinc, lanczos, spline
  466. select_every:step,offset1[,...]
  467. apply a selection pattern to input frames
  468. step: the number of frames in the pattern
  469. offsets: the offset into the step to select a frame
  470. see: http://avisynth.nl/index.php/Select#SelectEvery
RAW Paste Data