当前位置: 首页 > news >正文

音视频开发32 FFmpeg 编码- 视频编码 h264 参数相关

1. ffmpeg -h 这个命令总不会忘记,用这个先将ffmpeg所有的help信息都list出来

C:\Users\Administrator>ffmpeg -h
ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developersbuilt with gcc 12.2.0 (Rev10, Built by MSYS2 project)configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprintlibavutil      58.  2.100 / 58.  2.100libavcodec     60.  3.100 / 60.  3.100libavformat    60.  3.100 / 60.  3.100libavdevice    60.  1.100 / 60.  1.100libavfilter     9.  3.100 /  9.  3.100libswscale      7.  1.100 /  7.  1.100libswresample   4. 10.100 /  4. 10.100libpostproc    57.  1.100 / 57.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...Getting help:-h      -- print basic options-h long -- print more options-h full -- print all options (including all format and codec specific options, very long)-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocolSee man ffmpeg for detailed description of the options.Print help / information / capabilities:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-buildconf          show build configuration
-formats            show available formats
-muxers             show available muxers
-demuxers           show available demuxers
-devices            show available devices
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-pix_fmts           show available pixel formats
-layouts            show standard channel layouts
-sample_fmts        show available audio sample formats
-dispositions       show available stream dispositions
-colors             show available color names
-sources device     list sources of the input device
-sinks device       list sinks of the output device
-hwaccels           show available HW acceleration methodsGlobal options (affect whole program instead of just one file):
-loglevel loglevel  set logging level
-v loglevel         set logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-y                  overwrite output files
-n                  never overwrite output files
-ignore_unknown     Ignore unknown stream types
-filter_threads     number of non-complex filter threads
-filter_complex_threads  number of threads for -filter_complex
-stats              print progress report during encoding
-max_error_rate maximum error rate  ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.Per-file main options:
-f fmt              force format
-c codec            codec name
-codec codec        codec name
-pre preset         preset name
-map_metadata outfile[,metadata]:infile[,metadata]  set metadata information of outfile from infile
-t duration         record or transcode "duration" seconds of audio/video
-to time_stop       record or transcode stop time
-fs limit_size      set the limit file size in bytes
-ss time_off        set the start time offset
-sseof time_off     set the start time offset relative to EOF
-seek_timestamp     enable/disable seeking by timestamp with -ss
-timestamp time     set the recording timestamp ('now' to set the current time)
-metadata string=string  add metadata
-program title=string:st=number...  add program with specified streams
-target type        specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apad               audio pad
-frames number      set the number of frames to output
-filter filter_graph  set stream filtergraph
-filter_script filename  read stream filtergraph description from a file
-reinit_filter      reinit filtergraph on input parameter changes
-discard            discard
-disposition        dispositionVideo options:
-vframes number     set the number of video frames to output
-r rate             set frame rate (Hz value, fraction or abbreviation)
-fpsmax rate        set max frame rate (Hz value, fraction or abbreviation)
-s size             set frame size (WxH or abbreviation)
-aspect aspect      set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-display_rotation angle  set pure counter-clockwise rotation in degrees for stream(s)
-display_hflip      set display horizontal flip for stream(s) (overrides any display rotation if it is not set)
-display_vflip      set display vertical flip for stream(s) (overrides any display rotation if it is not set)
-vn                 disable video
-vcodec codec       force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.
-pass n             select the pass number (1 to 3)
-vf filter_graph    set video filters
-b bitrate          video bitrate (please use -b:v)
-dn                 disable dataAudio options:
-aframes number     set the number of audio frames to output
-aq quality         set audio quality (codec-specific)
-ar rate            set audio sampling rate (in Hz)
-ac channels        set number of audio channels
-an                 disable audio
-acodec codec       force audio codec ('copy' to copy stream)
-ab bitrate         audio bitrate (please use -b:a)
-af filter_graph    set audio filtersSubtitle options:
-s size             set frame size (WxH or abbreviation)
-sn                 disable subtitle
-scodec codec       force subtitle codec ('copy' to copy stream)
-stag fourcc/tag    force subtitle tag/fourcc
-fix_sub_duration   fix subtitles duration
-canvas_size size   set canvas size (WxH or abbreviation)
-spre preset        set the subtitle options to the indicated preset

2. 查看x264的编码器的详情  ffmpeg -codecs | findstr x264

 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 
(decoders: h264 h264_qsv h264_cuvid ) 
(encoders: libx264 libx264rgb h264_amf h264_mf h264_nvenc h264_qsv )

我们可以看到encoders 默认的第一个就是 libx264

3. 再查看 libx264具体的的帮忙文档 ffmpeg -h encoder=libx264


 

Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:General capabilities: dr1 delay threadsThreading capabilities: otherSupported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le
libx264 AVOptions:-preset            <string>     E..V....... Set the encoding preset (cf. x264 --fullhelp) (default "medium")-tune              <string>     E..V....... Tune the encoding params (cf. x264 --fullhelp)-profile           <string>     E..V....... Set profile restrictions (cf. x264 --fullhelp)-fastfirstpass     <boolean>    E..V....... Use fast settings when encoding first pass (default true)-level             <string>     E..V....... Specify level (as defined by Annex A)-passlogfile       <string>     E..V....... Filename for 2 pass stats-wpredp            <string>     E..V....... Weighted prediction for P-frames-a53cc             <boolean>    E..V....... Use A53 Closed Captions (if available) (default true)-x264opts          <string>     E..V....... x264 options-crf               <float>      E..V....... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)-crf_max           <float>      E..V....... In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)-qp                <int>        E..V....... Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)-aq-mode           <int>        E..V....... AQ method (from -1 to INT_MAX) (default -1)none            0            E..V.......variance        1            E..V....... Variance AQ (complexity mask)autovariance    2            E..V....... Auto-variance AQautovariance-biased 3            E..V....... Auto-variance AQ with bias to dark scenes-aq-strength       <float>      E..V....... AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)-psy               <boolean>    E..V....... Use psychovisual optimizations. (default auto)-psy-rd            <string>     E..V....... Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.-rc-lookahead      <int>        E..V....... Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)-weightb           <boolean>    E..V....... Weighted prediction for B-frames. (default auto)-weightp           <int>        E..V....... Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)none            0            E..V.......simple          1            E..V.......smart           2            E..V.......-ssim              <boolean>    E..V....... Calculate and print SSIM stats. (default auto)-intra-refresh     <boolean>    E..V....... Use Periodic Intra Refresh instead of IDR frames. (default auto)-bluray-compat     <boolean>    E..V....... Bluray compatibility workarounds. (default auto)-b-bias            <int>        E..V....... Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)-b-pyramid         <int>        E..V....... Keep some B-frames as references. (from -1 to INT_MAX) (default -1)none            0            E..V.......strict          1            E..V....... Strictly hierarchical pyramidnormal          2            E..V....... Non-strict (not Blu-ray compatible)-mixed-refs        <boolean>    E..V....... One reference per partition, as opposed to one reference per macroblock (default auto)-8x8dct            <boolean>    E..V....... High profile 8x8 transform. (default auto)-fast-pskip        <boolean>    E..V....... (default auto)-aud               <boolean>    E..V....... Use access unit delimiters. (default auto)-mbtree            <boolean>    E..V....... Use macroblock tree ratecontrol. (default auto)-deblock           <string>     E..V....... Loop filter parameters, in <alpha:beta> form.-cplxblur          <float>      E..V....... Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)-partitions        <string>     E..V....... A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all-direct-pred       <int>        E..V....... Direct MV prediction mode (from -1 to INT_MAX) (default -1)none            0            E..V.......spatial         1            E..V.......temporal        2            E..V.......auto            3            E..V.......-slice-max-size    <int>        E..V....... Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)-stats             <string>     E..V....... Filename for 2 pass stats-nal-hrd           <int>        E..V....... Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1)none            0            E..V.......vbr             1            E..V.......cbr             2            E..V.......-avcintra-class    <int>        E..V....... AVC-Intra class 50/100/200/300/480 (from -1 to 480) (default -1)-me_method         <int>        E..V....... Set motion estimation method (from -1 to 4) (default -1)dia             0            E..V.......hex             1            E..V.......umh             2            E..V.......esa             3            E..V.......tesa            4            E..V.......-motion-est        <int>        E..V....... Set motion estimation method (from -1 to 4) (default -1)dia             0            E..V.......hex             1            E..V.......umh             2            E..V.......esa             3            E..V.......tesa            4            E..V.......-forced-idr        <boolean>    E..V....... If forcing keyframes, force them as IDR frames. (default false)-coder             <int>        E..V....... Coder type (from -1 to 1) (default default)default         -1           E..V.......cavlc           0            E..V.......cabac           1            E..V.......vlc             0            E..V.......ac              1            E..V.......-b_strategy        <int>        E..V....... Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)-chromaoffset      <int>        E..V....... QP difference between chroma and luma (from INT_MIN to INT_MAX) (default 0)-sc_threshold      <int>        E..V....... Scene change threshold (from INT_MIN to INT_MAX) (default -1)-noise_reduction   <int>        E..V....... Noise reduction (from INT_MIN to INT_MAX) (default -1)-udu_sei           <boolean>    E..V....... Use user data unregistered SEI if available (default false)-x264-params       <dictionary> E..V....... Override the x264 configuration using a :-separated list of key=value parameters

以如下一行为例:

  -preset            <string>     E..V....... Set the encoding preset (cf. x264 --fullhelp) (default "medium")

含义如下:

 参数名字为 -preset, 参数值类型为string,默认值为medium

但是没有更加详细的说明。提示给出:可以使用x264 --fullhelp查看。意思是,你要找一个可执行的x264(windows上是x264.exe),然后使用 x264 --fullhelp,查看更加相近的说明。

4.找到一个x264.exe,然后执行 x264 --fullhelp 命令

实际上 我们前面在windows 上 自己build ffmpeg的时候,就会有x264.exe build 出来。

如果忘记了,可以参考一下前面的博客。

有了x264.exe,cmd进入当前路径,执行 x264 --fullhelp

也可以使用  x264 --fullhelp > x264fullhelp.txt ,将h264参数都存储到 txt中

x264 core:164 r3161M a354f11
Syntax: x264 [options] -o outfile infileInfile can be raw (in which case resolution is required),or YUV4MPEG (*.y4m),or Avisynth if compiled with support (yes).or libav* formats if compiled with lavf support (yes) or ffms support (yes).
Outfile type is selected by filename:.264 -> Raw bytestream.mkv -> Matroska.flv -> Flash Video.mp4 -> MP4 if compiled with GPAC or L-SMASH support (lsmash)
Output bit depth: 8/10Options:-h, --help                  List basic options--longhelp              List more options--fullhelp              List all optionsExample usage:Constant quality mode:x264 --crf 24 -o <output> <input>Two-pass with a bitrate of 1000kbps:x264 --pass 1 --bitrate 1000 -o <output> <input>x264 --pass 2 --bitrate 1000 -o <output> <input>Lossless:x264 --qp 0 -o <output> <input>Maximum PSNR at the cost of speed and visual quality:x264 --preset placebo --tune psnr -o <output> <input>Constant bitrate at 1000kbps with a 2 second-buffer:x264 --vbv-bufsize 2000 --bitrate 1000 -o <output> <input>Presets:--profile <string>      Force the limits of an H.264 profileOverrides all settings.- baseline:--no-8x8dct --bframes 0 --no-cabac--cqm flat --weightp 0No interlaced.No lossless.- main:--no-8x8dct --cqm flatNo 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:--direct auto --rc-lookahead 50 --ref 5--subme 8 --trellis 2- 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--slow-firstpass --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 sourceor situationOverridden 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--slow-firstpass        Don't force these faster settings with --pass 1:--no-8x8dct --me dia --partitions none--ref 1 --subme {2 if >2 else unchanged}--trellis 0 --fast-pskipFrame-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 GOPsOnly 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 rectangularslices and is overridden by other slicing options--slices-max <integer>  Absolute maximum slices per frame; overridesslice-max-size/slice-max-mbs when necessary--slice-max-size <integer> Limit the size of each slice in bytes--slice-max-mbs <integer> Limit the size of each slice in macroblocks (max)--slice-min-mbs <integer> Limit the size of each slice in macroblocks (min)--tff                   Enable interlaced mode (top field first)--bff                   Enable interlaced mode (bottom field first)--constrained-intra     Enable constrained intra prediction.--pulldown <string>     Use soft pulldown to change frame rate- none, 22, 32, 64, double, triple, euro (requires cfr input)--fake-interlaced       Flag stream as interlaced but encode progressive.Makes it possible to encode 25p and 30p Blu-Raystreams. 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- 6: mono - 2D frame without any frame packing- 7: tile format - L is on top-left, R split acrossRatecontrol:-q, --qp <integer>          Force constant QP (0-81, 0=lossless)-B, --bitrate <integer>     Set bitrate (kbit/s)--crf <float>           Quality-based VBR (-12-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 valueMay cause VBV underflows!--qpmin <integer>       Set min QP [0]--qpmax <integer>       Set max QP [81]--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- 3: Auto-variance AQ with bias to dark scenes--aq-strength <float>   Reduces blocking and blurring in flat andtextured 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 videoEach zone is of the form<start frame>,<end frame>,<option>where <option> is eitherq=<integer> (force QP)or  b=<float> (bitrate multiplier)--qpfile <string>       Force frametypes and QPs for some or all framesFormat of each line: framenumber frametype QPQP is optional (none lets x264 choose). Frametypes: I,i,K,P,B,b.K=<I or i> depending on open-gop settingQPs are restricted by qpmin/qpmax.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 worsenboth 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"]- flat, jvt--cqmfile <string>      Read custom quant matrices from a JM-compatible fileOverrides any other --cqm* options.--cqm4 <list>           Set all 4x4 quant matricesTakes a comma-separated list of 16 integers.--cqm8 <list>           Set all 8x8 quant matricesTakes 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 matricesVideo 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, bt2020, smpte428,smpte431, smpte432--transfer <string>     Specify transfer characteristics ["undef"]- undef, bt709, bt470m, bt470bg, smpte170m,smpte240m, linear, log100, log316,iec61966-2-4, bt1361e, iec61966-2-1,bt2020-10, bt2020-12, smpte2084, smpte428,arib-std-b67--colormatrix <string>  Specify color matrix setting ["???"]- undef, bt709, fcc, bt470bg, smpte170m,smpte240m, GBR, YCgCo, bt2020nc, bt2020c,smpte2085, chroma-derived-nc,chroma-derived-c, ICtCp--chromaloc <integer>   Specify chroma sample location (0 to 5) [0]--mastering-display <string> Specify 'G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)'for primaries, white point, and display brightness--cll <string>          Specify 'max_content,max_frame_average' contentlight levels--alternative-transfer <string> Specify an alternative transfercharacteristics ["undef"]- same values as --transfer--nal-hrd <string>      Signal HRD information (requires vbv-bufsize)- none, vbr, cbr (cbr not allowed in .mp4)--filler                Force hard-CBR and generate filler (implied by--nal-hrd cbr)--pic-struct            Force pic_struct in Picture Timing SEI--crop-rect <string>    Add 'left,top,right,bottom' to the bitstream-levelcropping rectangleInput/Output:-o, --output <string>       Specify output file--muxer <string>        Specify output container format ["auto"]- auto, raw, mkv, flv, mp4--demuxer <string>      Specify input container format ["auto"]- auto, raw, y4m, avs, lavf, ffms--input-fmt <string>    Specify input file format (requires lavf support)--input-csp <string>    Specify input colorspace format for raw input- valid csps for `raw' demuxer:i400, i420, yv12, nv12, nv21, i422, yv16, nv16, yuyv, uyvy, i444, yv24, bgr, bgra, rgb- valid csps for `lavf' demuxer:yuv420p, yuyv422, rgb24, bgr24, yuv422p, yuv444p, yuv410p, yuv411p, gray, monow, monob, pal8, yuvj420p, yuvj422p, yuvj444p, uyvy422, uyyvyy411, bgr8, bgr4, bgr4_byte, rgb8, rgb4, rgb4_byte, nv12, nv21, argb, rgba, abgr, bgra, gray16be, gray16le, yuv440p, yuvj440p, yuva420p, rgb48be, rgb48le, rgb565be, rgb565le, rgb555be, rgb555le, bgr565be, bgr565le, bgr555be, bgr555le, vaapi, yuv420p16le, yuv420p16be, yuv422p16le, yuv422p16be, yuv444p16le, yuv444p16be, dxva2_vld, rgb444le, rgb444be, bgr444le, bgr444be, ya8, bgr48be, bgr48le, yuv420p9be, yuv420p9le, yuv420p10be, yuv420p10le, yuv422p10be, yuv422p10le, yuv444p9be, yuv444p9le, yuv444p10be, yuv444p10le, yuv422p9be, yuv422p9le, gbrp, gbrp9be, gbrp9le, gbrp10be, gbrp10le, gbrp16be, gbrp16le, yuva422p, yuva444p, yuva420p9be, yuva420p9le, yuva422p9be, yuva422p9le, yuva444p9be, yuva444p9le, yuva420p10be, yuva420p10le, yuva422p10be, yuva422p10le, yuva444p10be, yuva444p10le, yuva420p16be, yuva420p16le, yuva422p16be, yuva422p16le, yuva444p16be, yuva444p16le, vdpau, xyz12le, xyz12be, nv16, nv20le, nv20be, rgba64be, rgba64le, bgra64be, bgra64le, yvyu422, ya16be, ya16le, gbrap, gbrap16be, gbrap16le, qsv, mmal, d3d11va_vld, cuda, 0rgb, rgb0, 0bgr, bgr0, yuv420p12be, yuv420p12le, yuv420p14be, yuv420p14le, yuv422p12be, yuv422p12le, yuv422p14be, yuv422p14le, yuv444p12be, yuv444p12le, yuv444p14be, yuv444p14le, gbrp12be, gbrp12le, gbrp14be, gbrp14le, yuvj411p, bayer_bggr8, bayer_rggb8, bayer_gbrg8, bayer_grbg8, bayer_bggr16le, bayer_bggr16be, bayer_rggb16le, bayer_rggb16be, bayer_gbrg16le, bayer_gbrg16be, bayer_grbg16le, bayer_grbg16be, xvmc, yuv440p10le, yuv440p10be, yuv440p12le, yuv440p12be, ayuv64le, ayuv64be, videotoolbox_vld, p010le, p010be, gbrap12be, gbrap12le, gbrap10be, gbrap10le, mediacodec, gray12be, gray12le, gray10be, gray10le, p016le, p016be, d3d11, gray9be, gray9le, gbrpf32be, gbrpf32le, gbrapf32be, gbrapf32le, drm_prime, opencl, gray14be, gray14le, grayf32be, grayf32le, yuva422p12be, yuva422p12le, yuva444p12be, yuva444p12le, nv24, nv42, vulkan, y210be, y210le, x2rgb10le, x2rgb10be, x2bgr10le, x2bgr10be, p210be, p210le, p410be, p410le, p216be, p216le, p416be, p416le, vuya, rgbaf16be, rgbaf16le, vuyx, p012le, p012be, y212be, y212le, xv30be, xv30le, xv36be, xv36le, rgbf32be, rgbf32le, rgbaf32be, rgbaf32le--output-csp <string>   Specify output colorspace ["i420"]- i400, i420, i422, i444, rgb--input-depth <integer> Specify input bit depth for raw input--output-depth <integer> Specify output bit depth--input-range <string>  Specify input color range ["auto"]- auto, tv, pc--input-res <intxint>   Specify input resolution (width x height)--index <string>        Filename for input index file--sar width:height      Specify Sample Aspect Ratio--fps <float|rational>  Specify framerate--seek <integer>        First frame to encode--frames <integer>      Maximum number of frames to encode--level <string>        Specify level (as defined by Annex A)--bluray-compat         Enable compatibility hacks for Blu-ray support--avcintra-class <integer> Use compatibility hacks for AVC-Intra class- 50, 100, 200, 300, 480--avcintra-flavor <string> AVC-Intra flavor ["panasonic"]- panasonic, sony--stitchable            Don't optimize headers based on video contentEnsures ability to recombine a segmented encode-v, --verbose               Print stats for each frame--no-progress           Don't show the progress indicator while encoding--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--lookahead-threads <integer> Force a specific number of lookahead threads--sliced-threads        Low-latency but lower-efficiency threading--thread-input          Run Avisynth in its own thread--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--opencl                Enable use of OpenCL--opencl-clbin <string> Specify path of compiled OpenCL kernel cache--opencl-device <integer> Specify OpenCL device ordinal--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--tcfile-in <string>    Force timestamp generation with timecode file--tcfile-out <string>   Output timecode v2 file from input timestamps--timebase <int/int>    Specify timebase numerator and denominator<integer>    Specify timebase numerator for input timecode fileor specify timebase denominator for other input--dts-compress          Eliminate initial delay with container DTS hackFiltering:--vf, --video-filter <filter0>/<filter1>/... Apply video filtering to the input fileFilter options may be specified in <filter>:<option>=<value> format.Available filters:crop:left,top,right,bottomremoves pixels from the edges of the frameresize:[width,height][,sar][,fittobox][,csp][,method]resizes frames based on the given criteria:- resolution only: resizes and adapts sar to avoid stretching- sar only: sets the sar and resizes to avoid stretching- resolution and sar: resizes to given resolution and sets the sar- fittobox: resizes the video based on the desired constraints- width, height, both- fittobox and sar: same as above except with specified sar- csp: convert to the given csp. syntax: [name][:depth]- valid csp names [keep current]: i400, i420, yv12, nv12, nv21, i422, yv16, nv16, yuyv, uyvy, i444, yv24, bgr, bgra, rgb- depth: 8 or 16 bits per pixel [keep current]note: not all depths are supported by all csps.- method: use resizer method ["bicubic"]- fastbilinear, bilinear, bicubic, experimental, point,- area, bicublin, gauss, sinc, lanczos, splineselect_every:step,offset1[,...]apply a selection pattern to input framesstep: the number of frames in the patternoffsets: the offset into the step to select a framesee: http://avisynth.nl/index.php/Select#SelectEvery

5.x264常用的参数,以及说明

5.1 预设参数


–profile:设置H264视频的配置,设置成功会覆盖所有的参数设置。可选参数有:
         baseline:无损,非隔行扫描,–no-8x8dct --bframes 0 --no-cabac --cqm flat --weightp 0;
         main:–no-8x8dct --cqm flat,无损;
         high:无损;
         high10:支持8-10bit,无损;
         high422:支持8-10bit,YUV420和YUV422;
         high444:支持8-10bit,YUV420、YUV422和YUV444。
–present:压缩效率和运算时间中平衡的预设值。如果指定了一个预设值,它会在其它选项生效前生效。可选的值有:ultrafast、superfast、veryfast、faster、fast、medium、slow、slower、veryslow和placebo。


–tune:上一个选项基础上进一步优化输入。如果定义了一个tune值,它将在preset之后,其它选项之前生效。可选:film、animation、grain、stillimage、psnr、ssim、fastdecode、zerolatency和touhou。


–slow-firstpass:使用–pass 1会在解析命令行时增加一些设置。如果设置preset=placebo则自动关闭此特性。如果想显式关闭此特性,使用slow-firstpass。


5.2 帧类型选项


-I, --keyint<integer or "infinite">:设置GOPSize,默认值为250;

IDR帧是视频流的“分隔符”,所有帧都不可以使用越过关键帧的帧作为参考帧。
IDR帧是I帧的一种,所以它们也不参照其它帧。
这意味着它们可以作为视频的搜索(seek)点。
通过这个设置可以设置IDR帧的最大间隔帧数(亦称最大图像组长度)。
较大的值将导致IDR帧减少(会用占用空间更少的P帧和B帧取代),
也就同时减弱了参照帧选择的限制。
较小的值导致减少搜索一个随机帧所需的平均时间。

-i,  --min-keyint<integer> :最小的GPOSize,默认为auto
     --no-scenecut:完全关闭自适应I帧决策;
     -- scenecut<integer> :设置决策使用I帧、IDR帧的阈值(场景变换检测);

x264会计算每一帧与前一帧的不同程度并得出一个值。
如果这个值低于scenecut,那么就算检测到一个“场景变换”。
如果此时距离上一帧的距离小于 min-keyint则插入一个I帧,反之则插入一个IDR帧。
较高的值会增加侦测到“场景变换”概率。

        --intra-refresh 让x264为每keyint数量的帧使用宏块内部编码取代IDR帧;

块以水平移动列的方式更新,也叫刷新波。
对于低延迟的流,这样可以让帧的尺寸比使用标准的IDR帧更加保持恒定。
而且这样可以增强视频流对丢包的容错能力。
这个选项会降低压缩率,所以在确实需要的时候才选择它。

-b,   --bframes<integer> :设置x264可使用的B帧的最大连续数量,默认3;
        --b-adapt<integer> :设置B帧决策算法,这个选项会影响到x264使用P帧或者B帧;

                        0:关闭。总是使用B帧。和以前的 no-b-adapt选项效果相同;
                        1:‘快速’算法。快速,–b-frames越大速度越快;
                        2:‘最佳’算法,慢速,–b-frames越大速度越慢;
       --b-bias<integer> :调节使用B帧的力度。越大的值越偏向B帧,可以在-100和100之间选择。100或-100不能保证完全或是全是B帧(使用 –b-adapt 0);

        –b-pyramid<string>:允许B帧作为参照帧。如果关闭,那么只有I帧和P帧才能作为参照帧。可以作为参照帧的B帧的量化参数会介于P帧和普通B帧之间。只在–b-frames设置大于等于2时此选项才生效。如果是在为蓝光光盘编码,请使用none或者strict。

                        none:不允许B帧作为参照帧;
                        strict:一个图像组内只允许一个B帧参照帧,这是蓝光编码强制要求的标准;
                        normal:任意使用B帧参照帧;
        –open-gop:Open-GOP是一个提升压缩效率的编码技术,有些解码器不能完全支持open-GOP流,因此这个选项默认关闭;

                        none:关闭
                        normal:开启
                        bluray:开启。一个稍低效的open-GOP版本,因为normal模式不能用于蓝光编码。
                        open and closed gops all you need to know

        –no-cabac:关闭CABAC (Context Adaptive Binary Arithmetic Coder)压缩,使用较为低效的CAVLC (Context Adaptive Variable Length Coder)。这两者在压缩效率和解码效率上有10%-20%的差别;

-r     --ref<integer>:控制DPB (Decoded Picture Buffer)的大小。可以在0-16之间选择。简单地说,就是设置P帧可以选择它之前的多少帧作为参照帧(B帧的值要小1-2,取决于那个B帧能不能作为参照)。最小可以选择值1,只参照自己前面的那帧。注意H.264标准限制了每个level可以参照的帧的数量。如果选择level4.1,1080p最大选4,720p最大选9;
        --no-deblock:完全关闭内置去块滤波器;


-f     --deblock<alpha:beta>:调节H.264标准中的内置去块滤波器。这是个性价比很高的选择;
        --slices<integer> :设置每帧的分片数,强制使用矩形分片;

        --slices-max <integer> :每帧的绝对最大切片数,在必要时会覆盖lice-max-size/slice-max-mbs

        --slice-max-size<integer> :设置每个分块包括NAL头的最大大小(bytes);
        --slice-max-mbs<integer> :设置每个分块包含的最大宏块数量;
        --slice-min-mbs<integer> :设置每个分块包含的最小宏块数量;
        --tff:开启隔行编码并设置上半场在前。x264的隔行编码使用MBAFF,因此效率不如逐行扫描。所以,仅在需要在隔行显示的设备上显示时才开启这个选项;
        --bff:开启隔行编码并设置下半场在前;
        --constrained-intra:开启SVC编码的底层要求的强制帧内预测;
        --pulldown<string> :为你的输入流(逐行扫描的,固定帧率的)使用一组预设的“soft pulldown”;可选的参数有:none、22、32、64、double、triple、euro;
        --fake-interlaced:把流标志为隔行的但不按隔行编码。用于编码25p和30p的蓝光兼容视频;
        --frame-packing<integer>:对于立体视频,定义帧排列方式:
                                0:棋盘格 - 像素交替来自左眼和右眼
                                1:列交替 - 左眼和右眼通过列交替交织
                                2:行交替 - 左眼和右眼通过行交替交织
                                3:左右并排 - 左眼在左侧,右眼在右侧
                                4:上下并排 - 左眼在上方,右眼在下方
                                5:帧交替 - 每帧显示一个视图
                                6:单眼 - 2D帧,没有任何帧包装
                                7:平铺格式 - 左眼在左上方,右眼分割在其余区域


5.3 码率控制


-q,     --qp<integer>  :强制使用恒定的QP值(0-81,0=无损);
-B,    --bitrate<integer>  :设置比特率(kbit/s);
        --crf<float> :基于质量的可变比特率(-12-51)[23.0];
        --rc-lookahead<integer>  :预测帧类型的帧数 [40];
        --vbv-maxrate<integer>  :最大本地比特率(kbit/s)[0];
        --vbv-bufsize<integer>  :设置VBV缓冲区大小(kbit)[0];
        --vbv-init<float> :初始VBV缓冲区占用率 [0.9];
        --crf-max<float> :使用CRF+VBV时,限制RF到此值可能导致VBV下溢!;
        --qpmin<integer>:设置最小QP值 [0];
        --qpmax<integer>:设置最大QP值 [81];
        --qpstep<integer>:设置最大QP步长 [4];
        --ratetol<float>:ABR速率控制和VBV的容差 [1.0];
        --ipratio<float>:I和P之间的QP因子 [1.40];
        --pbratio<float>:P和B之间的QP因子 [1.30];
        --chroma-qp-offset<integer> :色度与亮度之间的QP差异 [0];
        --aq-mode<integer> :AQ方法 [1];
                                0: 禁用;
                                1: 方差AQ(复杂度掩码);
                                2: 自动方差AQ;
                                3: 自动方差AQ,并偏向于暗场景;
        –aq-strength<float>:减少平坦和纹理区域中的块和模糊 [1.0];


-p,     --pass<integer>:启用多通道速率控制;
                                1: 第一遍,创建统计文件;
                                2: 最后一遍,不覆盖统计文件;
                                3: 第N遍,覆盖统计文件;
        --stats<string> :用于两遍统计的文件名 [“x264_2pass.log”];
        --no-mbtree:禁用mb-tree速率控制;
        --qcomp<float> :QP曲线压缩 [0.60];
        --cplxblur<float> :减少QP的波动(曲线压缩之前) [20.0];
        --qblur<float> :减少QP的波动(曲线压缩之后) [0.5];
        --zones:调整视频区域的比特率;每个区域的格式为<起始帧数>,<结束帧数>,<选项>,其中<选项>可以是q=<整数>(强制QP)或 b=<浮点数>(比特率倍增器);
       --qpfile<string>   :强制一些或所有帧的帧类型和QP值;每行的格式:帧号 帧类型 QPQP是可选的(none表示由x264选择)。帧类型:I,i,K,P,B,b。K=<I或i>取决于open-gop设置QP受qpmin/qpmax的限制。


5.4 分析


-A,–partitions:要考虑的分区。可选值为[“p8x8, b8x8, i8x8, i4x4”],表示考虑的分区类型,包括p8x8、p4x4、b8x8、i8x8、i4x4、none和all。
–direct:直接运动矢量(MV)预测模式。可选值为[“spatial”],表示直接MV预测模式,包括none、spatial、temporal和auto。
–no-weightb:禁用B帧的加权预测。
–weightp:P帧的加权预测。可选值为[2],表示加权预测的类型,包括0(禁用)、1(加权参考帧)和2(加权参考帧+复制帧)。
–me:整数像素运动估计方法。可选值为[“hex”],表示整数像素运动估计方法,包括dia(钻石搜索,半径1,快速)、hex(六边形搜索,半径2)、umh(不均匀多六边形搜索)、esa(穷举搜索)和tesa(哈达玛穷举搜索,慢)。
–merange:最大运动矢量搜索范围,默认值为16。
–mvrange:最大运动矢量长度,默认值为-1(自动)。
–mvrange-thread:线程之间的最小缓冲区,默认值为-1(自动)。
-m, --subme:亚像素运动估计和模式决策。可选值为[7],表示亚像素运动估计和模式决策的级别,包括0(仅全像素,不推荐使用)、1(SAD模式决策,一次qpel迭代)、2(SATD模式决策)等。
–psy-rd:心理视觉优化的强度,默认值为"1.0:0.0"。其中,#1表示RD(需要subme>=6),#2表示Trellis(需要trellis,实验性)。
–no-psy:禁用所有恶化PSNR和SSIM的视觉优化。
–no-mixed-refs:不基于每个分区来决定引用帧。
–no-chroma-me:忽略运动估计中的色度。
–no-8x8dct:禁用自适应空间变换大小。
-t, --trellis:Trellis RD量化,默认值为1。可选值为0(禁用)、1(仅在MB的最终编码中启用)、2(在所有模式决策中启用)。
–no-fast-pskip:在P帧上禁用早期SKIP检测。
–no-dct-decimate:在P帧上禁用系数阈值。
–nr:降噪,默认值为0。
–deadzone-inter:设置互帧亮度量化deadzone的大小,默认值为21。
–deadzone-intra:设置帧内亮度量化deadzone的大小,默认值为11。deadzone的大小应在0到32之间。
–cqm:预设量化矩阵。可选值为[“flat”],表示预设的量化矩阵类型,包括flat和jvt。
–cqmfile:从与JM兼容的文件中读取自定义的量化矩阵。会覆盖其他–cqm*选项。
–cqm4:设置所有的4x4量化矩阵。需要提供一个由16个整数组成的逗号分隔列表。
–cqm8:设置所有的8x8量化矩阵。需要提供一个由64个整数组成的逗号分隔列表。
–cqm4i, --cqm4p, --cqm8i, --cqm8p:同时设置亮度和色度的量化矩阵。
–cqm4iy, --cqm4ic, --cqm4py, --cqm4pc:设置单独的亮度和色度量化矩阵。


5.5 设置视频可用性信息


  VUI设置不被编码器使用,只是对播放设备的建议。

–overscan:指定裁剪超扫描设置。可选值为[“undef”],表示裁剪超扫描的设置,包括undef、show和crop。
–videoformat:指定视频格式。可选值为[“undef”],表示视频格式,包括component、pal、ntsc、secam、mac和undef。
–range:指定颜色范围。可选值为[“auto”],表示颜色范围,包括auto、tv和pc。
–colorprim:指定颜色原色。可选值为[“undef”],表示颜色原色,包括undef、bt709、bt470m、bt470bg、smpte170m、smpte240m、film、bt2020、smpte428、smpte431和smpte432。
–transfer:指定传输特性。可选值为[“undef”],表示传输特性,包括undef、bt709、bt470m、bt470bg、smpte170m、smpte240m、linear、log100、log316、iec61966-2-4、bt1361e、iec61966-2-1、bt2020-10、bt2020-12、smpte2084、smpte428和arib-std-b67。
–colormatrix:指定颜色矩阵设置。可选值为[“???”],表示颜色矩阵设置,包括undef、bt709、fcc、bt470bg、smpte170m、smpte240m、GBR、YCgCo、bt2020nc、bt2020c、smpte2085、chroma-derived-nc、chroma-derived-c和ICtCp。
–chromaloc:指定色度采样位置(0到5)。默认值为0。
**–mastering-display :指定主显示器的亮度、白点和显示亮度。格式为’G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)'。
–cll:指定内容光亮度的最大值和最大帧平均值。格式为’max_content,max_frame_average’。
–alternative-transfer:指定备用传输特性。可选值与–transfer相同。
–nal-hrd:信号HRD信息(需要vbv-bufsize)。可选值为none、vbr、cbr(.mp4中不允许使用cbr)。
–filler:强制使用硬CBR并生成填充数据(隐含–nal-hrd cbr)。
–pic-struct:强制在图像定时SEI中使用pic_struct。
–crop-rect:将’left,top,right,bottom’添加到比特流级别的裁剪矩形。


 

相关文章:

音视频开发32 FFmpeg 编码- 视频编码 h264 参数相关

1. ffmpeg -h 这个命令总不会忘记&#xff0c;用这个先将ffmpeg所有的help信息都list出来 C:\Users\Administrator>ffmpeg -h ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developersbuilt with gcc 12.2.0 (Rev10, Built by MSYS2 pro…...

标准版小程序订单中心path审核不通过处理教程

首先看自己小程序是不是已经审核通过并上线状态才在站内信里面提醒的&#xff1f; 如果没有提交过审核&#xff0c;请在提交的时候填写。path地址为&#xff1a;pages/goods/order_list/index 如果是已经上线的小程序&#xff0c;当时没要求填这个&#xff0c;但新的政策要求填…...

移植对话框MFC

VC版 MFC程序对话框资源移植 以下均拷贝自上面&#xff0c;仅用来记录 &#xff08;部分有删除&#xff09; 法1&#xff1a; Eg&#xff1a;将B工程调试好的对话框移植到A工程中 1.资源移植 1.1 在2017打开B工程,在工作区Resource标签页中选中Dialog文件夹下的资源文件,按…...

【开源的字典项目】【macOS】:在macOS上能打开mdd and mdx 的github开源项目

【开源的字典项目】【macOS】 在macOS上能打开mdd and mdx 的github开源项目 Here are some GitHub repositories that provide code for opening and reading mdd and mdx files in macOS: 1. MdxEdit: Repository: https://github.com/mdx-editorDescription: A free and …...

已解决javax.security.auth.login.LoginException:登录失败的正确解决方法,亲测有效!!!

已解决javax.security.auth.login.LoginException&#xff1a;登录失败的正确解决方法&#xff0c;亲测有效&#xff01;&#xff01;&#xff01; 目录 问题分析 出现问题的场景 报错原因 解决思路 解决方法 1. 检查用户名和密码 用户名和密码验证 2. 验证配置文件 …...

2741. 特别的排列 Medium

给你一个下标从 0 开始的整数数组 nums &#xff0c;它包含 n 个 互不相同 的正整数。如果 nums 的一个排列满足以下条件&#xff0c;我们称它是一个特别的排列&#xff1a; 对于 0 < i < n - 1 的下标 i &#xff0c;要么 nums[i] % nums[i1] 0 &#xff0c;要么 nums[…...

读AI新生:破解人机共存密码笔记15辅助博弈

1. 辅助博弈 1.1. assistance game 1.2. 逆强化学习如今已经是构建有效的人工智能系统的重要工具&#xff0c;但它做了一些简化的假设 1.2.1. 机器人一旦通过观察人类学会了奖励函数&#xff0c;它就会采用奖励函数&#xff0c;这样它就可以执行相同的任务 1.2.1.1. 解决这…...

C++ 因项目需求,需要将0~2的32次方这个区间的数字保存到内存当中(内存大小为4G),并且可以实现对任意一个数字的增删。(先叙述设计思路,再写岀代码)

问题&#xff1a; C 因项目需求&#xff0c;需要将0~2的32次方这个区间的数字保存到内存当中(内存大小为4G),并且可以实现对任意一个数字的增删。(先叙述设计思路&#xff0c;再写岀代码) 解答 设计思路代码实现说明 为了在有限的内存&#xff08;4GB&#xff09;中存储和操作 …...

Linux 下的性能监控与分析技巧

在日常的服务器管理和问题诊断过程中&#xff0c;Linux 命令行工具提供了强大的支持。本文通过几个常用的示例&#xff0c;介绍如何快速定位问题、监控服务器性能。 无论你是编程新手还是有一定经验的开发者&#xff0c;理解和掌握这些命令&#xff0c;都将在你的工作中大放异…...

不可复制网站上的文字——2种方法

禁用javascript或Console控制台代码 &#xff08;1&#xff09;F12键——设置——勾选禁用javascript &#xff08;2&#xff09;Console控制台敲如下代码&#xff1a; var allowPaste function(e){ e.stopImmediatePropagation(); return true; }; document.addEventListe…...

Ubuntu 22.04上编译安装c++ spdlog library

Very fast, header-only/compiled, C logging library. 请以root身份或sudo执行。 1. 安装必需的依赖项&#xff1a; sudo apt-get update sudo apt-get install git g cmake 2. 克隆 spdlog 仓库&#xff1a; cd /opt git clone https://github.com/gabime/spdlog.git …...

ESP32代码开发入门

ESP-IDF ESP-ADF开发 开发概要 编译环境及SDK搭建 整个开发流程是:下载ESP-IDF, ESP-ADF(按需下载),并安装, 编写hello world工程,编译并烧录到主板验证 可参照ESP32 esp-idf esp-adf环境安装及.a库创建与编译api大部分可以用glibc的接口 做了封装,时间time(NULL), 创建线程p…...

“势”是“态”的偶然性减少

“态势感知”中的“势”指的是一种趋势或倾向性&#xff0c;而“态”则表示状态或局势。这个术语常用于描述在一段时间内系统或事件显示出来的方向性变化或发展趋势。因此&#xff0c;可以将“态势”理解为系统或事件状态变化的趋势&#xff0c;这种变化通常反映出偶然性减少的…...

人脑计算机技术与Neuroplatform:未来计算的革命性进展

引言 想象一下&#xff0c;你在某个清晨醒来&#xff0c;准备开始一天的工作&#xff0c;而实际上你的大脑正作为一台生物计算机的核心&#xff0c;处理着大量复杂的信息。这并非科幻电影的情节&#xff0c;而是人脑计算机技术即将带来的现实。本文将深入探讨FinalSpark公司的…...

新版周易测算系统源码 去授权完美运行

已经去掉授权可以完美运行 更新了三个模板市面上都是几千几千的卖 更新了三套首页新ui 自己后台切换就行 源码大小&#xff1a;338M 源码下载&#xff1a;https://download.csdn.net/download/m0_66047725/89447857 更多资源下载&#xff1a;关注我....

【PYTHON】力扣刷题笔记 -- 0053. 最大子数组和【中等】

题目描述&#xff1a;给你一个整数数组 array: nums &#xff0c;请你找出一个具有最大和的连续子数组 sub-array&#xff0c;返回其最大和 子数组&#xff08;最少包含一个元素&#xff09;: 是数组中的一个连续部分 示例 1&#xff1a; 输入&#xff1a;nums [-2,1,-3,4,-1…...

Linux启动elasticsearch,提示权限不够

Linux启动elasticsearch&#xff0c;提示权限不够&#xff0c;如下图所示&#xff1a; 解决办法&#xff1a; 设置文件所有者&#xff0c;即使用户由权限访问文件 sudo chown -R 用户名[:新组] ./elasticsearch-8.10.4 //切换到elasticsearch-8.10.4目录同级 chown详细格式…...

css 布局出现无法去除的空白

案件介绍&#xff1a;在没有设置任何的css样式的情况下 文字顶部出现无法去除的空白 源代码 <div click"onClick" ><div class"tableTextButton--container"></div><Icon v-if"loading || thisLoading" type"ios-lo…...

使用SpringBoot整合filter

SpringBoot整合filter&#xff0c;和整合servlet类似&#xff0c;也有两种玩儿法 1、创建一个SpringBoot工程&#xff0c;在工程中创建一个filter过滤器&#xff0c;然后用注解WebFilter配置拦截的映射 2、启动类还是使用ServletComponentScan注解来扫描拦截器注解WebFilter 另…...

Python酷库之旅-第三方库openpyxl(15)

目录 一、 openpyxl库的由来 1、背景 2、起源 3、发展 4、特点 4-1、支持.xlsx格式 4-2、读写Excel文件 4-3、操作单元格 4-4、创建和修改工作表 4-5、样式设置 4-6、图表和公式 4-7、支持数字和日期格式 二、openpyxl库的优缺点 1、优点 1-1、支持现代Excel格式…...

葡萄串目标检测YoloV8——从Pytorch模型训练到C++部署

文章目录 软硬件准备数据准备数据处理脚本模型训练模型部署数据分享软硬件准备 训练端 PytorchultralyticsNvidia 3080Ti部署端 fastdeployonnxruntime数据准备 用labelimg进行数据标注 数据处理脚本 xml2yolo import os import glob import xml.etree.ElementTree as ETxm…...

OpenAI推出自我改进AI- CriticGPT

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…...

springboot系列七: Lombok注解,Spring Initializr,yaml语法

老韩学生 LombokLombok介绍Lombok常用注解Lombok应用实例代码实现idea安装lombok插件 Spring InitializrSpring Initializr介绍Spring Initializr使用演示需求说明方式1: IDEA创建方式2: start.spring.io创建 注意事项和说明 yaml语法yaml介绍使用文档yaml基本语法数据类型字面…...

专访ATFX首席战略官Drew Niv:以科技创新引领企业高速发展

在金融科技创新的浪潮中&#xff0c;人才是推动企业高速发展的核心驱动力&#xff0c;优质服务是引领企业急速前行的灯塔。作为差价合约领域的知名品牌&#xff0c;ATFX高度重视人才引进工作&#xff0c;秉持“聚天下英才而用之”的理念&#xff0c;在全球范围内广揽科技精英&a…...

关于FPGA对 DDR4 (MT40A256M16)的读写控制 4

关于FPGA对 DDR4 &#xff08;MT40A256M16&#xff09;的读写控制 4 语言 &#xff1a;Verilg HDL 、VHDL EDA工具&#xff1a;ISE、Vivado、Quartus II 关于FPGA对 DDR4 &#xff08;MT40A256M16&#xff09;的读写控制 4一、引言二、DDR4 SDRAM设备中模式寄存器重要的模式寄存…...

android——Livedata、StateFlow、ShareFlow和Channel的介绍和使用

目录 一、LiveData介绍 二、StateFlow介绍 三、ShareFlow介绍 四、Channel介绍 小结 一、LiveData介绍 LiveData是一种在Android开发中用于观察数据变化的组件。它可以被观察者注册并在数据变化时通知观察者&#xff0c;从而实现数据的实时更新。LiveData具有生命周期感知能力&…...

Debezium 同步 MySQL 实时数据并解决数据重复消费问题

我们使用 Debezium 实时同步一个 MySQL 的数据到另一个 MySQL&#xff0c;代码网上基本都有&#xff0c;都是在引入 debezium-api&#xff0c;debezium-embedded 后写 Java 代码&#xff0c;做好了基本配置后启动程序&#xff0c;Debezium 会自动读取 MySQL 的实时 binlog&…...

【图像处理】1、使用OpenCV库图像轮廓的检测和绘制

OpenCV (Open Source Computer Vision Library) 是一个用于计算机视觉和图像处理的开源库。它提供了数百种用于图像和视频分析的算法&#xff0c;并被广泛应用于研究和商业领域。OpenCV 支持多种编程语言&#xff0c;包括 C、Python、Java 等&#xff0c;具有跨平台的特性&…...

【AI编译器】triton学习:矩阵乘优化

Matrix Multiplication 主要内容&#xff1a; 块级矩阵乘法 多维指针算术 重新编排程序以提升L2缓存命 自动性能调整 Motivations 矩阵乘法是当今高性能计算系统的一个关键组件&#xff0c;在大多数情况下被用于构建硬件。由于该操作特别复杂&#xff0c;因此通常由软件提…...

动静分离网络

动静分离网络的主要目的是分别处理视频帧中的静止区域和运动区域&#xff0c;以便对不同区域采用不同的去噪策略。这里提供一个实现思路&#xff0c;通过两个分支网络分别处理静止区域和运动区域&#xff0c;然后将两者的输出融合起来。 实现步骤 帧差图生成&#xff1a;计算…...

Python商务数据分析知识专栏(三)——Python数据分析的应用①Matplotlib数据可视化基础

Python商务数据分析知识专栏&#xff08;三&#xff09;——Python数据分析的应用①Matplotlib数据可视化基础 Matplotlib数据可视化基础1.掌握绘图基本语法与常用绘图2.分析特征间关系3.分析特征内部数据分布与分散情况 Matplotlib数据可视化基础 1.掌握绘图基本语法与常用绘…...

DataV大屏组件库

DataV官方文档 DataV组件库基于Vue &#xff08;React版 (opens new window)&#xff09; &#xff0c;主要用于构建大屏&#xff08;全屏&#xff09;数据展示页面即数据可视化&#xff0c;具有多种类型组件可供使用&#xff1a; 源码下载...

paraview跨节点并行渲染

参考&#xff1a; https://cloud.tencent.com/developer/ask/sof/101483588 ParaView 支持使用其内置的网络拓扑来进行跨节点的并行渲染。以下是一个简单的步骤来设置和运行跨节点的并行渲染&#xff1a; 确保你的计算环境支持多节点计算&#xff0c;比如通过SSH、MPI或其他集…...

Java中相等比较详解

本文对Java中的相等判断进行详细解释&#xff0c;包括&#xff0c;equals和compareTo等。 一、 运算符 1. 用途 基本数据类型&#xff1a;用于比较两个基本数据类型的值是否相等。 引用类型&#xff1a;用于比较两个对象引用是否指向同一个对象。 2. 示例 // 基本数据类型比…...

HBuilder X 小白日记01

1.创建项目 2.右击项目&#xff0c;可创建html文件 3.保存CtrlS&#xff0c;运行一下 我们写的内容&#xff0c;一般是写在body里面 注释的快捷键&#xff1a;Ctrl/ h标签 <h1> 定义重要等级最高的(最大)的标题。<h6> 定义最小的标题。 H标签起侧重、强调的作用…...

使用Protocol Buffers优化数据传输

使用Protocol Buffers优化数据传输 大家好&#xff0c;我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01; 什么是Protocol Buffers&#xff1f; Protocol Buffers&#xff08;简称P…...

如何把mkv转成mp4?介绍一下将mkv转成MP4的几种方法

如何把mkv转成mp4&#xff1f;如果你有一个MKV格式的视频文件&#xff0c;但是需要将其转换为MP4格式以便更广泛地在各种设备和平台上播放和共享&#xff0c;你可以通过进行简单的文件格式转换来实现。转换MKV到MP4格式可以提供更好的兼容性&#xff0c;并确保你的视频文件能够…...

PHP语言学习02

好久不见&#xff0c;学如逆水行舟&#xff0c;不进则退&#xff0c;真是这样。。。突然感觉自己有点废。。。 <?php phpinfo(); ?> 新生第一个代码。 要想看到运行结果&#xff0c;打开浏览器&#xff08;127.0.0.1/start/demo01.php&#xff09; 其中&#xff0c…...

PX2资料及问题记录

PX2的一些资料 官方论坛&#xff1a;https://devtalk.nvidia.com/default/board/182/drive-px2/ 官方网站&#xff1a;https://www.nvidia.com/en-us/self-driving-cars/ap2x/ 开发网站&#xff1a;https://developer.nvidia.com/drive/downloads docker docker run --devic…...

Jenkins容器的部署

本文主要是记录如何在Centos7上安装docker,以及在docker里面配置tomcat、mysql、jenkins等环境。 一、安装docker 1.1 准备工作 centos7、VMware17Pro 1.2 通过yum在线安装dokcer yum -y install docker1.3 启动docker服务 systemctl start docker.service1.4 查看docke…...

QT 自绘树形控件

资源来自:https://gitee.com/qt-open-source-collection/NavListView/blob/master/navlistview.h 1、解决的问题:一处编译报错;空白区域绘制背景;点击页面崩溃 2、源码: #ifndef NAVLISTVIEW_H #define NAVLISTVIEW_H/*** 作者:feiyangqingyun(QQ:517216493) 2016-10-1…...

axios之CancelToken取消请求

从 v0.22.0 开始&#xff0c;Axios 支持以 fetch API 方式—— AbortController 取消请求 此 API 从 v0.22.0 开始已被弃用&#xff0c;不应在新项目中使用 官网链接 1. 背景 最近项目中遇到一个场景&#xff0c;当连续触发一个请求时&#xff0c;如果是同一个接口&#xf…...

Unity | API鉴权用到的函数汇总

目录 一、HMAC-SHA1 二、UriEncode 三、Date 四、Content-MD5 五、参数操作 六、阿里云API鉴权 一、HMAC-SHA1 使用 RFC 2104 中定义的 HMAC-SHA1 方法生成带有密钥的哈希值&#xff1a; private static string CalculateSignature(string secret, string data){byte[] k…...

【python】socket通信代码解析

目录 一、socket通信原理 1.1 服务器端 1.2 客户端 二、socket通信主要应用场景 2.1 简单的服务器和客户端通信 2.2 并发服务器 2.3 UDP通信 2.4 文件传输 2.5 HTTP服务器 2.6 邮件发送与接收 2.7 FTP客户端 2.8 P2P文件共享 2.9 网络游戏 三、python中Socket编…...

FastGPT 手动部署错误:MongooseServerSelectionError: getaddrinfo EAI_AGAIN mongo

在运行 FastGPT 时&#xff0c;mongodb 报如下错误&#xff1a; MongooseServerSelectionError: getaddrinfo EAI_AGAIN mongo 这是因为 mongo 没有解析出来&#xff0c;在 hosts 文件中添加如下信息&#xff1a; 127.0.0.1 mongo 重新运行 FastGPT 即可。 参考链接&#xff…...

用英文介绍芝加哥(1):Making Modern Chicago Part 1 Building a Boomtown

Making Modern Chicago | Part 1: Building a Boomtown Link: https://www.youtube.com/watch?vpNdX0Dm-J8Y&listPLmSQiOQJmbZ7TU39cyx7gizM9i8nOuZXy&index4 Summary Summary of Chicago’s History and Development Urban Planning and Growth Chicago, often r…...

【启明智显分享】低成本RISC-V工业级HMI方案推荐

伴随着工业4.0的迅猛发展&#xff0c;工业HMI以方便、快捷的特点逐渐成为工业的日常应用&#xff0c;成为备受追捧的全新多媒体交互设备。 什么是工业HMI&#xff1f;工业HMI是用于工业自动化系统中的人机交互界面&#xff0c;通常由触摸屏、按钮、指示灯、显示器等组成&#…...

深入探索STM32的SPI功能:W25Q64 Flash存储器全攻略

摘要 随着嵌入式系统对存储需求的增长&#xff0c;选择合适的存储设备变得尤为重要。W25Q64 Flash存储器以其8Mbit的存储容量和SPI接口的便捷性&#xff0c;成为STM32微控制器项目中的优选存储方案。本文将深入探索STM32的SPI功能&#xff0c;提供W25Q64 Flash存储器的全面集成…...

【SQL Server数据库】带函数查询和综合查询(1)

目录 1&#xff0e;统计年龄大于30岁的学生的人数。 2&#xff0e;统计数据结构有多少人80分或以上。 3.查询“0203”课程的最高分的学生的学号。 4&#xff0e;统计各系开设班级的数目(系名称、班级数目)&#xff0c;并创建结果表。 5&#xff0e;选修了以“01”开头的课…...

使用WebService接口进行数据通信

使用WebService接口进行数据通信 大家好&#xff0c;我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01;今天我们将探讨如何使用WebService接口进行数据通信。WebService是一种基于Web…...

python 中的 下划线_ 是啥意思

在 Python 中&#xff0c;_&#xff08;下划线&#xff09;通常用作占位符&#xff0c;表示一个变量名&#xff0c;但程序中不会实际使用这个变量的值。 目录 忽略循环变量&#xff1a;忽略函数返回值&#xff1a;在解释器中使用&#xff1a;举例子1. 忽略循环变量2. 忽略不需…...

31 C++11

本节目标 c11简介列表初始化变量类型推导范围for循环新增加容器右值新的类功能可变参数模板 1. c11简介 在2003年标准委员会提交了一份计数勘误表&#xff08;简称TC1&#xff09;&#xff0c;使得c03这个名字已经取代了c98称为c11之前的最新的c标准名称。不过由于c03&#x…...

css高度0到高度auto,过渡的设置

1.css从高度0到高度auto,过渡设置 方法(vue代码) 你可以通过设置transform: scale(0);到 transform: scale(1); 来实现,具体代码 你也可以通过设置transform: scaleY(0);到 transform: scaleY(1); 这两种展示的效果不一样,你可以看看你喜欢那种 // css代码// 原来的css类 .s…...

泰迪智能科技实验室产品-云计算资源管理平台介绍

云计算资源管理平台是一款集群应用程序管理平台&#xff0c;以Docker、Kubernetes为核心引擎的容器化应用部署、运行环境&#xff0c;对数据中心的物理服务器、网络、存储、虚拟服务器等基础架构资源进行集中统一的管理、分配、监控等。平台旨在围绕行业应用逐步由“虚拟化”向…...

电子商务营销中大数据分析的应用|| 电商大数据的采集

电子商务营销中大数据分析的应用 △ 点击注册主流电商平台API接口 △ 随着经济的不断发展&#xff0c;网络信息技术不断加强&#xff0c;电子商务和大数据的蓬勃发展极大地方便了人们的生活。本文章主要阐述大数据分析与电商营销的含义、大数据分析在电子商务营销中的应用&…...

单链表的实现

单链表的实现 前言单链表的实现 前言 Hello,亲爱的CSDN的小伙伴们&#xff0c;你们好&#xff01;今天我来给大家分享单链表的实现&#xff0c;希望能够帮助大家。 单链表的实现 前面&#xff0c;我们学习了顺序表的实现&#xff0c;我们知道顺序表是在数组的基础上进行的。…...

满油满电综合续航2100公里!秦L起售价9.98万!

友商表示已疯!馈电油耗2.9L、满油满电综合续航2100公里,关键起售价9.98万,秦L是懂消费者的。大家好,我是车评小怪兽!秦L是比亚迪旗下全新中型轿车,提供插电式混合动力,5款车型配置,售价区间是9.98-13.98万元。最大的亮点应该是馈电油耗2.9L,满油满电综合续航2100公里,…...

安全是对家人最强的守护!看星海V9如何锻造安全壁垒和不破金身

如今国产车的市场前景是越来越好了,特别是东风汽车。凭借着出色的造车技术在市场上混得风生水起。今天我们说的这款车也是来自东风汽车旗下,豪华智电头等舱MPV 星海V9全新上市。东风风行首款豪华新能源旗舰MPV——星海V9全新上市,预售价19.99万起,购车立享九重礼!东风风行…...

【好书分享第十三期】AI数据处理实战108招:ChatGPT+Excel+VBA

文章目录 一、内容介绍二、内页插图三、作者简介四、前言/序言五、目录 一、内容介绍 《AI数据处理实战108招&#xff1a;ChatGPTExcelVBA》通过7个专题内容、108个实用技巧&#xff0c;讲解了如何运用ChatGPT结合办公软件Excel和VBA代码实现AI办公智能化、高效化。随书附赠了…...

win10如何查看本机ip地址?三招搞定,快来试试吧

在数字化时代&#xff0c;IP地址作为网络设备的唯一标识&#xff0c;对于计算机使用者来说具有重要意义。无论是为了进行网络设置、远程连接&#xff0c;还是解决网络问题&#xff0c;了解如何查看本机IP地址都是一项必备技能。对于使用Windows 10操作系统的用户来说&#xff0…...

软件架构设计之质量属性浅析

引言 在数字化浪潮席卷而来的今天&#xff0c;软件已经渗透到我们生活的方方面面&#xff0c;从手机APP到大型企业级系统&#xff0c;无一不彰显着软件技术的魅力。然而&#xff0c;在这背后&#xff0c;软件架构设计作为软件开发的基石&#xff0c;其质量属性的重要性不言而喻…...

巨额分红与大幅下调募资金额,小方制药注册生效半年后仍无进展

《港湾商业观察》施子夫 2022年7月1日&#xff0c;上海小方制药股份有限公司&#xff08;以下简称&#xff0c;小方制药&#xff09;递表上交所板&#xff0c;2023年9月1日公司提交了注册申请&#xff0c;并于同年12月19日获得生效。 离挂牌上市仅有一步之遥的小方制药注册生…...