Welcome to Firefly
Switch language
Firefly Docsss
Last Updated: 2026-08-27 07:36:09

MPP Hardware Encoding

Rockchip Platform Support

7.5 MPP Hardware Encoding

Encode H.264 and mux it into MP4:

gst-launch-1.0 videotestsrc num-buffers=600 \
  ! 'video/x-raw,format=NV12,width=640,height=320,framerate=60/1' \
  ! mpph264enc \
  ! h264parse \
  ! qtmux \
  ! filesink location=h264.mp4

Encode H.265 and mux it into MP4:

gst-launch-1.0 videotestsrc num-buffers=600 \
  ! 'video/x-raw,format=NV12,width=640,height=320,framerate=60/1' \
  ! mpph265enc \
  ! h265parse \
  ! qtmux \
  ! filesink location=h265.mp4

JPEG encoding:

gst-launch-1.0 videotestsrc num-buffers=1 \
  ! 'video/x-raw,format=NV12,width=640,height=320' \
  ! mppjpegenc \
  ! filesink location=output.jpg

Common video encoder properties:

PropertyDescription
rc-modeBitrate control mode: vbr, cbr, or fixqp
bpsTarget bitrate; ignored in fixqp mode
bps-min, bps-maxMinimum and maximum bitrates
gopI-frame interval; when the default is -1, it is normally set according to the frame rate
qp-init, qp-min, qp-maxQuantization parameters; a lower QP generally means higher quality and a higher bitrate
profile, levelH.264/H.265 profile and level
width, height, rotationScaling or rotation may be performed through RGA
arm-afbcEnable when the input data is AFBC

Check properties and their accepted values with gst-inspect-1.0 <encoder> on the target system.

On this page