GNOME Bugzilla – Bug 763433
Failed to encode a 480p stream in raw I420 format into H.264
Last modified: 2017-03-07 16:49:39 UTC
Command line: -------------- ubuntu@ubuntu-lenovo:~$ GST_DEBUG=*:3 gst-launch-1.0 filesrc location=/home/ubuntu/Videos/video1.yuv ! videoparse format=i420 width=640 height=480 framerate=30/1 ! vaapiencode_h264 ! qtmux ! filesink location=/home/ubuntu/Videos/encoded_video.mp4 Log info: -------------- Setting pipeline to PAUSED ... libva info: VA-API version 0.35.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_0_32 libva info: va_openDriver() returns 0 0:00:00.031196868 11170 0x163a860 WARN basesrc gstbasesrc.c:3486:gst_base_src_start_complete:<filesrc0> pad not activated yet Pipeline is PREROLLING ... 0:00:00.031515132 11170 0x163a860 WARN structure gststructure.c:1935:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gst.vaapi.Display' of type 'GstVaapiDisplay' Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)NULL; 0:00:00.031574211 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 64 0:00:00.031600437 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 128 0:00:00.034489488 11170 0x163af20 ERROR vaapivideomemory gstvaapivideomemory.c:778:gst_vaapi_video_allocator_new: failed to allocate VA image pool 0:00:00.034530786 11170 0x163af20 ERROR vaapivideopool gstvaapivideobufferpool.c:222:gst_vaapi_video_buffer_pool_set_config: failed to create GstVaapiVideoAllocator object 0:00:00.034539233 11170 0x163af20 ERROR vaapiencode gstvaapipluginbase.c:471:ensure_sinkpad_buffer_pool: failed to reset buffer pool config 0:00:00.034567888 11170 0x163af20 WARN videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.034637340 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 64 0:00:00.034646573 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 128 0:00:00.037345743 11170 0x163af20 ERROR vaapivideomemory gstvaapivideomemory.c:778:gst_vaapi_video_allocator_new: failed to allocate VA image pool 0:00:00.037393929 11170 0x163af20 ERROR vaapivideopool gstvaapivideobufferpool.c:222:gst_vaapi_video_buffer_pool_set_config: failed to create GstVaapiVideoAllocator object 0:00:00.037403857 11170 0x163af20 ERROR vaapiencode gstvaapipluginbase.c:471:ensure_sinkpad_buffer_pool: failed to reset buffer pool config 0:00:00.037428920 11170 0x163af20 WARN videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.037456378 11170 0x163af20 WARN GST_PADS gstpad.c:4059:gst_pad_peer_query:<videoparse0:src> could not send sticky events 0:00:00.037531122 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 64 0:00:00.037540907 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 128 0:00:00.040480038 11170 0x163af20 ERROR vaapivideomemory gstvaapivideomemory.c:778:gst_vaapi_video_allocator_new: failed to allocate VA image pool 0:00:00.040510032 11170 0x163af20 ERROR vaapivideopool gstvaapivideobufferpool.c:222:gst_vaapi_video_buffer_pool_set_config: failed to create GstVaapiVideoAllocator object 0:00:00.040519002 11170 0x163af20 ERROR vaapiencode gstvaapipluginbase.c:471:ensure_sinkpad_buffer_pool: failed to reset buffer pool config 0:00:00.040540366 11170 0x163af20 WARN videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.040880681 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 64 0:00:00.040893424 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 128 0:00:00.043734850 11170 0x163af20 ERROR vaapivideomemory gstvaapivideomemory.c:778:gst_vaapi_video_allocator_new: failed to allocate VA image pool 0:00:00.043759174 11170 0x163af20 ERROR vaapivideopool gstvaapivideobufferpool.c:222:gst_vaapi_video_buffer_pool_set_config: failed to create GstVaapiVideoAllocator object 0:00:00.043767469 11170 0x163af20 ERROR vaapiencode gstvaapipluginbase.c:471:ensure_sinkpad_buffer_pool: failed to reset buffer pool config 0:00:00.043786293 11170 0x163af20 WARN videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 0:00:00.043845335 11170 0x163af20 WARN rawparse gstrawparse.c:487:gst_raw_parse_loop:<videoparse0> error: Internal data stream error. 0:00:00.043853102 11170 0x163af20 WARN rawparse gstrawparse.c:487:gst_raw_parse_loop:<videoparse0> error: stream stopped, reason not-negotiated ERROR: from element /GstPipeline:pipeline0/GstVideoParse:videoparse0: Internal data stream error. 0:00:00.043933228 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 64 Additional debug info: gstrawparse.c(487): gst_raw_parse_loop (): /GstPipeline:pipeline0/GstVideoParse:videoparse0: stream stopped, reason not-negotiated 0:00:00.043958838 11170 0x163af20 ERROR vaapi gstvaapiutils.c:573:to_GstVaapiRateControl: unsupported VA-API Rate Control value 128 ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... 0:00:00.046597522 11170 0x163af20 ERROR vaapivideomemory gstvaapivideomemory.c:778:gst_vaapi_video_allocator_new: failed to allocate VA image pool 0:00:00.046622730 11170 0x163af20 ERROR vaapivideopool gstvaapivideobufferpool.c:222:gst_vaapi_video_buffer_pool_set_config: failed to create GstVaapiVideoAllocator object 0:00:00.046632170 11170 0x163af20 ERROR vaapiencode gstvaapipluginbase.c:471:ensure_sinkpad_buffer_pool: failed to reset buffer pool config 0:00:00.046652545 11170 0x163af20 WARN videoencoder gstvideoencoder.c:674:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)30/1 Freeing pipeline ...
I have never heard of this vaapi backend: iHD_drv_video.so Searching it looks like part of https://software.intel.com/en-us/intel-media-server-studio Can you paste the output of the command vainfo ???
Command line: -------------- ubuntu@ubuntu-lenovo:~$ vainfo Log info: -------------- libva info: VA-API version 0.35.0 libva info: va_getDriverName() returns 0 libva info: User requested driver 'iHD' libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so libva info: Found init function __vaDriverInit_0_32 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.35 (libva 1.3.1) vainfo: Driver version: 16.4.2.1.39163-ubit vainfo: Supported profile and entrypoints VAProfileNone : VAEntrypointVideoProc VAProfileNone : <unknown entrypoint> VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264Baseline : VAEntrypointEncSlice VAProfileH264Baseline : <unknown entrypoint> VAProfileH264Baseline : <unknown entrypoint> VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : <unknown entrypoint> VAProfileH264Main : <unknown entrypoint> VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : <unknown entrypoint> VAProfileH264High : <unknown entrypoint> VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: <unknown entrypoint> VAProfileH264ConstrainedBaseline: <unknown entrypoint> VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : <unknown entrypoint>
Finally we have someone who trying the driver with mediasdk, cool :) Primary customers of IHD driver is windows , there should be linux version too... Few questions: --Is it free to download the driver binary?? --Did you manage to get any pipeline working with this :),, I mean any of the decoding/encoding/postprocessing scenarios.
I'm not sure whether the driver binary is free to download or not. I only do sudo apt-get install gstreamer1.0-vaapi libva-intel-vaapi-driver to get the required gstreamer vaapi plugins. So far I only done the testing on encoding scenario. I will do other testing once I have free time. I was testing this pipeline on --Lenovo laptop (Intel i7 with AMD Radeon graphics) --Ubuntu 14.04 --Gstreamer 1.2.4 I also tried to use Intel Atom with Ubuntu 14.04 and I found that command vainfo will try to open iHD_drv_video.so while the gstreamer pipeline will try to open /usr/lib/x86_64-linux-gnu/dri/i915_drv_video.so. Anyway, the gstreamer pipeline failed to open i915_drv_video.so due to no dri file in /usr/lib/x86_64-linux-gnu directory. I found the i915_drv_video.so is located at another directory so I use command mkdir to create dri in /usr/lib/x86_64-linux-gnu and then link the i915_drv_video.so to /usr/lib/x86_64-linux-gnu/dri. After I run the gstreamer pipeline, the log info show Segmentation fault (core dumped).
I afraid there is a mess-up! There are few things: -- the iHd driver(which is usually come up with media-sdk) is something we never tested with gstreamer-vaapi. But I did some testing few years ago, but the driver was doing things in non-conventional way. Eventually I made gstreamer-vaapi work with this driver with at least half a dozen of hacks in gstremaer-vaapi to fool the driver. -- Our main target is the open source driver and opensource version of libva: https://cgit.freedesktop.org/vaapi/libva/ https://cgit.freedesktop.org/vaapi/intel-driver/ According to my perspective, It is difficult for you to get support for other drivers in the opensource community. And these other drivers are not well tested with gstreamer-vaapi too. -- AFAIK, all distributions (ubuntu/fedora etc) are shipping the opensource driver: https://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/ -- I have no guarantee for non-intel graphics cards + gstreamer-vaapi use case :)
Hi, For media SDK driver will not work in gstreamer-vaapi. You can using gstreamer-mediasdk for iHD driver. Currently the gstreamer-mediasdk only support on a few platform. Details please check on the link below for the platform support: Here is the link: https://github.com/01org/gstreamer-media-SDK The libva and Intel VA driver using the for media SDK is not same code base from open source libva and open source intel-VA driver.
Closing this bug report as no it is related with a backed not related directly with VAAPI. Thanks!