Decoder - hbiyik/ffmpeg-rockchip GitHub Wiki

Decoder

Overview

The codecs, profiles, levels, bitrates, resolutions, FPS, AFBC, etc. supported by MPP decoders depend on the specific chip capabilities. This chapter uses RK3588 for demonstration.

 V..... av1_rkmpp            Rockchip MPP (Media Process Platform) AV1 decoder (codec av1)
 V..... h263_rkmpp           Rockchip MPP (Media Process Platform) H263 decoder (codec h263)
 V..... h264_rkmpp           Rockchip MPP (Media Process Platform) H264 decoder (codec h264)
 V..... hevc_rkmpp           Rockchip MPP (Media Process Platform) HEVC decoder (codec hevc)
 V..... mpeg1_rkmpp          Rockchip MPP (Media Process Platform) MPEG1VIDEO decoder (codec mpeg1video)
 V..... mpeg2_rkmpp          Rockchip MPP (Media Process Platform) MPEG2VIDEO decoder (codec mpeg2video)
 V..... mpeg4_rkmpp          Rockchip MPP (Media Process Platform) MPEG4 decoder (codec mpeg4)
 V..... vp8_rkmpp            Rockchip MPP (Media Process Platform) VP8 decoder (codec vp8)
 V..... vp9_rkmpp            Rockchip MPP (Media Process Platform) VP9 decoder (codec vp9)

Query decoders

  • Query MPP decoders
./ffmpeg -hide_banner -decoders | grep rkmpp
  • Query MPP decoder options by name
./ffmpeg -hide_banner -h decoder=h264_rkmpp
Decoder h264_rkmpp [Rockchip MPP (Media Process Platform) H264 decoder]:
    General capabilities: delay avoidprobe hardware
    Threading capabilities: none
    Supported hardware devices: rkmpp
    Supported pixel formats: nv12 nv16 nv15 nv20le drm_prime
h264_rkmpp_decoder AVOptions:
  -deint             <boolean>    .D.V....... Enable IEP (Image Enhancement Processor) for de-interlacing (default true)
  -afbc              <int>        .D.V....... Enable AFBC (Arm Frame Buffer Compression) to save bandwidth (from 0 to 2) (default off)
     off             0            .D.V....... Disable AFBC support
     on              1            .D.V....... Enable AFBC support
     rga             2            .D.V....... Enable AFBC if capable RGA is available
  -fast_parse        <boolean>    .D.V....... Enable fast parsing to improve decoding parallelism (default true)
  -buf_mode          <int>        .D.V....... Set the buffer mode for MPP decoder (from 0 to 1) (default half)
     half            0            .D.V....... Half internal mode
     ext             1            .D.V....... Pure external mode

Test decoders

You are free to choose sample videos. If none are available, you can try Jellyfish Video Bitrate Test Files.

The -c:v h264_rkmpp -i INPUT can be omitted since in FFmpeg 6.0 and up, -hwaccel rkmpp will pick up the required decoder automatically.

  • Decode but not copy-back. Without AFBC (ARM Frame Buffer Compression).
./ffmpeg -stream_loop -1 -hwaccel rkmpp -hwaccel_output_format drm_prime -i /path/to/any-h264-video.mp4 -an -sn -vframes 5000 -f null -

  • Decode and copy-back. Without AFBC. (AFBC cannot be used with copy-back or hwdownload filter)
./ffmpeg -stream_loop -1 -hwaccel rkmpp -i /path/to/any-h264-video.mp4 -an -sn -vframes 5000 -f null -

  • Decode but not copy-back. With AFBC.
./ffmpeg -stream_loop -1 -hwaccel rkmpp -hwaccel_output_format drm_prime -afbc 1 -i /path/to/any-h264-video.mp4 -an -sn -vframes 5000 -f null -
  • Decode but not copy-back. With AFBC if RGA3 is available.
./ffmpeg -stream_loop -1 -hwaccel rkmpp -hwaccel_output_format drm_prime -afbc rga -i /path/to/any-h264-video.mp4 -an -sn -vframes 5000 -f null -
⚠️ **GitHub.com Fallback** ⚠️