i.MX8QM H264 encoder quality/performance tradeoff

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8QM H264 encoder quality/performance tradeoff

543 Views
isevcik
Contributor I

I'm using the encoder (Windsor) through gstreamer's v4l2 module and looking for ways to control quality/performance tradeoff. According to i.MX Gstreamer User Guide, one should be able to set desired bandwidth for the encoder unit like so: `extra-controls="controls,h264_entropy_mode=0,video_bitrate=245000`.

I've been experimenting with the various encoder properties, using GStreamer pipeline to stream from MEK to laptop via RTP, and then checking on receiving side the packet/frame size with ffprobe and changes in performance through gstreamer's `fpsdisplaysink` to display average FPS. Example producing pipeline:

gst-launch-1.0 gltestsrc pattern=smpte is-live=1 ! "video/x-raw(memory:GLMemory), width=1920, height=1080" ! gldownload ! queue ! v4l2convert output-io-mode=dmabuf-import ! v4l2h264enc output-io-mode=dmabuf-import extra-controls="controls,h264_entropy_mode=0,video_bitrate=16384;" ! rtph264pay ! udpsink host=192.168.0.1 port=50008

I don't see any effect on the produced stream setting the `video_bitrate` property or not. Same for `video_peak_bitrate`. The only setting that does have effect on the stream size (and performance) is `h264_profile`. This allows for less bandwidth using Main or High profile, the default value is Baseline, the fastest.

This poses two questions I'd appreciate answers for:

  • What are the bitrate properties for and how to control them to see an effect?
  • Is there way to further increase encoding speed without changing inputs?
0 Kudos
1 Reply

493 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

1 > High video bitrates usually gives high video quality, equally low bitrates result in low quality video.

2 > I don't think this may be possible.

Best regards,
Aldo.

0 Kudos