Why doesn't vaapih264enc support rate-control-vbr on our Intel
Cherry Trail processor (see new information below re gstreamer-vaapi mods) I have tried similar pipelines in 1.14.1, 1.14.5, and 1.16.0. This pipeline works with rate-control=constant bitrate: 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: 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. = = = UPDATE 7/30/2019 = = = The "Internal data stream error" problem can be
bypassed by a modification to gstvaapicontext.c in the function config_create()
of the gstreamer-vaapi code base. The fix is to remove the "goto cleanup;"
statement when the rate-control selection is excluded in this conditional:
"if ((value & va_rate_control) != va_rate_control) {" Now, I can process using "vaapih264enc bitrate=5000
rate-control=vbr" without error, but the controls such as changes in
bitrate do not affect output file size so I believe they are ignored. The reason for the conditional failing can be traced to
vaGetConfigAttributes() indicating 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.
Therefore, I can't think of how to follow the trail any further. Please share
your ideas, knowledge, and experience. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Tue, 30 Jul 2019 at 17:27, David Manpearl wrote:
> Why doesn't vaapih264enc support rate-control-vbr on our Intel Cherry Trail > processor (see new information below re gstreamer-vaapi mods) > > I have tried similar pipelines in 1.14.1, 1.14.5, and 1.16.0. > > > > This pipeline works with rate-control=constant bitrate: > > 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: > > 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. > > > > = = = UPDATE 7/30/2019 = = = > > The "Internal data stream error" problem can be bypassed by a modification to > gstvaapicontext.c in the function config_create() of the gstreamer-vaapi code > base. The fix is to remove the "goto cleanup;" statement when the rate-control > selection is excluded in this conditional: "if ((value & va_rate_control) != > va_rate_control) {" > > Now, I can process using "vaapih264enc bitrate=5000 rate-control=vbr" without > error, but the controls such as changes in bitrate do not affect output file > size so I believe they are ignored. > > The reason for the conditional failing can be traced to > vaGetConfigAttributes() indicating 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. Therefore, > I can't think of how to follow the trail any further. Please share your ideas, > knowledge, and experience. As you can read in the line before the "goto cleanup", there's an error message reporting that your hardware doesn't support that rate control. Which brings the fact that GST_ERROR should be changed to GST_ELEMENT_ERROR to post a clear message in the bus. vmjl > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |