Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Manpearl__David
Beginner
167 Views

VAAPI video VBR encoding feature fails on Intel Atom X5-Z8000 CherryTrail

I am using GStreamer-vaapi on Intel Atom x5-Z8550. I cannot access the encoding feature called "variable bitrate" (VBR) which is available as a "rate-control" option for the GStreamer vaapih264enc plugin like this: "vaapih264enc rate-control=vbr"

 

Our questions:

1. Is variable bitrate supported on our processor?

2. Where can I find documentation that indicates support or the lack thereof for this feature?

I am building GStreamer-vaapi from source. I have been able to trace the problem into a VA-API library call: vaGetConfigAttributes().

For our processor, vaGetConfigAttributes() indicates support for only CBR 0x02 (constant-bitrate) and CQP 0x10 (constant-quality). vaGetConfigAttributes comes from the core VA-API library as documented here: http://intel.github.io/libva/group__api__core.html#gae51cad2e388d6cc63ce3d4221798f9fd. We need access to VBR 0x04 (variable-bitrate).

 

Environment:

Linux kernel: v4.9.115

vainfo
libva info: VA-API version 0.39.4
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.3)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.7.3

 

Replication Steps:

This problem can be demonstrated by using the standard GStreamer command line application: "gst-launch-1.0".

I have tried similar pipelines in GStreamer 1.14.1, 1.14.5, and 1.16.0 with identical results.

This pipeline works with rate-control=constant bitrate (CBR):

gst-launch-1.0 -v videotestsrc num-buffers=1000 ! videoconvert ! vaapipostproc width=1280 height=720 ! vaapih264enc rate-control=cbr bitrate=8000 ! mp4mux ! filesink location=video.mp4

This pipeline fails with rate-control=variable bitrate (VBR):

gst-launch-1.0 -v videotestsrc num-buffers=1000 ! videoconvert ! vaapipostproc width=1280 height=720 ! vaapih264enc rate-control=vbr bitrate=8000 ! mp4mux ! filesink location=video.mp4
    ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.
    streaming stopped, reason not-negotiated (-4)
    ERROR: pipeline doesn't want to preroll.

 

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
167 Views

Hi David,

Apologized for the late response. Did you resolve the issue yet?

Please make sure you are following the instructions in the following Intel website to install GStreamer VAAPI:

https://01.org/linuxmedia/quickstart/overview

From here, you can access help information about usages. Could you look at the following page for the GStreamer command line examples:

https://01.org/node/30756

Help this would help you.

Mark

Manpearl__David
Beginner
167 Views

Hi Mark, Thanks for the reply. No, unfortunately we have not yet resolved this issue. I am familiar with the quick start guide and GStreamer examples in the two links you provided. We have correctly installed the linux GStreamer environment for VAAPI and are successfully using many of the VAAPI features. My two questions in the original post still stand:

1. Is variable bitrate (vaapih264enc rate-control=vbr) supported on our processor (Intel Atom x5-Z8550)?

2. Where can I find documentation that indicates support or the lack thereof for this feature?

 - Thanks, David

Mark_L_Intel1
Moderator
167 Views

Hi David,

Apologized for late response, I was busying on other projects.

To your question, I z5-z8550 has very confused document but after checked around, I think it should have hardware codec. If it doesn't have hardware encoder, it should be failed at very beginning.

I am not sure if gst plugin used full BRC function, so I suggest to use our sample code to try the same usage and see if you get any errors.

https://github.com/Intel-Media-SDK/MediaSDK/tree/master/samples

Mark

Reply