我需要 Ubuntu 22.04 上 AMD AMF 硬件加速的 FFMPEG 语法示例

我需要 Ubuntu 22.04 上 AMD AMF 硬件加速的 FFMPEG 语法示例

我构建了启用 AMD AMF 的 FFMPEG。似乎所有东西都使用 AMD AMF 标头正确编译。

现在我从未通过 Ubuntu 终端执行过 FFMPEG 命令。

我进行了一些谷歌搜索,但没有找到任何关于如何使用 AMD AMF 硬件加速来让 FFMPEG 进行一些视频 H.264 编码或转换的适当指南。

我只找到了 VAAPI 的指南,但没有找到 AMD AMF 的指南。

使用 AMD AMF 硬件加速的 FFMPEG 基本语法有哪些?

这是我在 Ubuntu 22.04 终端输入以下内容时获得的输出:

$ ffmpeg -h encoder=hevc_amf

ffmpeg version N-107316-gf9dd8fcf9b Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/home/user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/user/ffmpeg_build/include --extra-ldflags=-L/home/user/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/home/user/bin --enable-gpl --enable-gnutls --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libaom --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-shared --disable-static --enable-amf --enable-nonfree
  libavutil      57. 27.100 / 57. 27.100
  libavcodec     59. 36.100 / 59. 36.100
  libavformat    59. 26.100 / 59. 26.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter     8. 41.100 /  8. 41.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample   4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Encoder hevc_amf [AMD AMF HEVC encoder]:
    General capabilities: dr1 delay hardware 
    Threading capabilities: none
    Supported pixel formats: nv12 yuv420p
hevc_amf AVOptions:
  -usage             <int>        E..V....... Set the encoding usage (from 0 to 3) (default transcoding)
     transcoding     0            E..V....... 
     ultralowlatency 1            E..V....... 
     lowlatency      2            E..V....... 
     webcam          3            E..V....... 
  -profile           <int>        E..V....... Set the profile (default main) (from 1 to 1) (default main)
     main            1            E..V....... 
  -profile_tier      <int>        E..V....... Set the profile tier (default main) (from 0 to 1) (default main)
     main            0            E..V....... 
     high            1            E..V....... 
  -level             <int>        E..V....... Set the encoding level (default auto) (from 0 to 186) (default auto)
     auto            0            E..V....... 
     1.0             30           E..V....... 
     2.0             60           E..V....... 
     2.1             63           E..V....... 
     3.0             90           E..V....... 
     3.1             93           E..V....... 
     4.0             120          E..V....... 
     4.1             123          E..V....... 
     5.0             150          E..V....... 
     5.1             153          E..V....... 
     5.2             156          E..V....... 
     6.0             180          E..V....... 
     6.1             183          E..V....... 
     6.2             186          E..V....... 
  -quality           <int>        E..V....... Set the encoding quality (from 0 to 10) (default speed)
     balanced        5            E..V....... 
     speed           10           E..V....... 
     quality         0            E..V....... 
  -rc                <int>        E..V....... Set the rate control mode (from -1 to 3) (default -1)
     cqp             0            E..V....... Constant Quantization Parameter
     cbr             3            E..V....... Constant Bitrate
     vbr_peak        2            E..V....... Peak Contrained Variable Bitrate
     vbr_latency     1            E..V....... Latency Constrained Variable Bitrate
  -header_insertion_mode <int>        E..V....... Set header insertion mode (from 0 to 2) (default none)
     none            0            E..V....... 
     gop             1            E..V....... 
     idr             2            E..V....... 
  -gops_per_idr      <int>        E..V....... GOPs per IDR 0-no IDR will be inserted (from 0 to INT_MAX) (default 1)
  -preanalysis       <boolean>    E..V....... Enable preanalysis (default false)
  -vbaq              <boolean>    E..V....... Enable VBAQ (default false)
  -enforce_hrd       <boolean>    E..V....... Enforce HRD (default false)
  -filler_data       <boolean>    E..V....... Filler Data Enable (default false)
  -max_au_size       <int>        E..V....... Maximum Access Unit Size for rate control (in bits) (from 0 to INT_MAX) (default 0)
  -min_qp_i          <int>        E..V....... min quantization parameter for I-frame (from -1 to 51) (default -1)
  -max_qp_i          <int>        E..V....... max quantization parameter for I-frame (from -1 to 51) (default -1)
  -min_qp_p          <int>        E..V....... min quantization parameter for P-frame (from -1 to 51) (default -1)
  -max_qp_p          <int>        E..V....... max quantization parameter for P-frame (from -1 to 51) (default -1)
  -qp_p              <int>        E..V....... quantization parameter for P-frame (from -1 to 51) (default -1)
  -qp_i              <int>        E..V....... quantization parameter for I-frame (from -1 to 51) (default -1)
  -skip_frame        <boolean>    E..V....... Rate Control Based Frame Skip (default false)
  -me_half_pel       <boolean>    E..V....... Enable ME Half Pixel (default true)
  -me_quarter_pel    <boolean>    E..V....... Enable ME Quarter Pixel  (default true)
  -aud               <boolean>    E..V....... Inserts AU Delimiter NAL unit (default false)
  -log_to_dbg        <boolean>    E..V....... Enable AMF logging to debug output (default false)

谢谢。

相关内容