gstvideoencoder error

Víctor Jáquez vjaquez at igalia.com
Sat Oct 27 10:37:39 UTC 2018


Hi Rand,

A couple comments:

1\ gst-mfx support happens in https://github.com/intel/gstreamer-media-SDK

2\ gst-mfx uses MediaSDK which is an Intel-only API above VA-API

3\ MediaSDK only works with iHD driver, not with i965 driver

4\ In headless systems you have to specify to the driver a drm render node,
rather than a display address (either X11 or Wayland)

for example, vainfo:

$ vainfo --display drm --device /dev/dri/renderD128

5\ in gst-plugins-bad there are a couple of elements called gst-msdk, which also
uses MediaSDK. They use drm backend, so headless shouldn't be a problem.

6\ you may also try gstreamer-vaapi, those plugins doesn't use MediaSDK but
libva. They work with i965 driver (and iHD but you need to export an environment
variable. See
https://blogs.igalia.com/vjaquez/2018/03/28/gstreamer-va-api-troubleshooting/)

good luck

vmjl


On Fri, 26 Oct 2018 at 11:35, Rand Graham wrote:
> Hi,
> 
> Is there a way to force libva to use a specific driver?
> 
> I am looking at the difference between the success case and the failure case.
> 
> What I notice is that in the success case that libva is loading iHD driver.
> 
> libva info: VA-API version 1.1.0
> libva info: va_getDriverName() returns 0
> libva info: User requested driver 'iHD'
> libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.s
> 
> In the failure case libva is loading i965
> 
> libva info: VA-API version 1.1.0
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
> libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_1_
> 
> Why is libva choosing i965 driver in one case and iHD in the other?
> 
> I do have an environment variable set in both environments as follows.
> 
> LIBVA_DRIVER_NAME=iHD
> 
> In order to verify libva, I tried to check the output of vainfo in the failing environment but vainfo won't run.
> 
> error: can't connect to X server!
> error: failed to initialize display
> 
> Thanks,
> Rand
> 
> From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Rand Graham
> Sent: Thursday, October 25, 2018 4:54 PM
> To: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
> Subject: RE: gstvideoencoder error
> 
> Hi,
> 
> I am still having problems with this.
> 
> Going on the theory that an environment variable was not set, I went ahead and set the GST_PLUGIN_PATH as follows
> 
> export GST_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0/
> 
> Now I am seeing strange errors as shown below. Some of the errors seem odd because they seem related to plugins  not used by the pipeline.
> 
> From my interactive shell where I can launch the pipeline I don't have GST_PLUGIN_PATH set and it somehow just works.
> 
> I don't have any of these variables set in my shell environment:
> 
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html
> 
> Are there any other environment variables that are important to gstreamer?
> 
> Errors that gstreamer is reporting when I set GST_PLUGIN_PATH:
> 
> (gst-plugin-scanner:6229): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgtksink.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgtksink.so: undefined symbol: gst_gl_display_wayland_new_with_display
> Failed to connect to Mir: Failed to connect to server socket: No such file or directory
> Unable to init server: Could not connect: Connection refused
> 
> (gst-plugin-scanner:6229): Clutter-CRITICAL **: Unable to initialize Clutter: Could not initialize Gdk
> 
> (gst-plugin-scanner:6229): Clutter-Gst-CRITICAL **: Unable to initialize Clutter
> 
> (gst-plugin-scanner:6229): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcompositor.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcompositor.so: undefined symbol: gst_videoaggregator_pad_get_type
> 
> (gst-plugin-scanner:6229): GLib-GObject-WARNING **: specified class size for type 'GstMssDemux' is smaller than the parent type's 'GstAdaptiveDemux' class size
> 
> (gst-plugin-scanner:6229): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
> 
> (gst-plugin-scanner:6229): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed
> 
> (gst-plugin-scanner:6229): GLib-GObject-WARNING **: specified class size for type 'GstHLSDemux' is smaller than the parent type's 'GstAdaptiveDemux' class size
> 
> (gst-plugin-scanner:6229): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
> 
> (gst-plugin-scanner:6229): GStreamer-CRITICAL **: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed
> 
> (gst-plugin-scanner:6229): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so: undefined symbol: gst_gl_filter_draw_textur
> 
> Thanks,
> Rand
> 
> From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Rand Graham
> Sent: Friday, October 19, 2018 3:36 PM
> To: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>>
> Subject: RE: gstvideoencoder error
> 
> Hi all,
> 
> I just received this error again on my machine this time.
> 
> The case where I receive this error on my machine is when running in a non-interactive environment. That is I am trying to call the gst-launch-1.0 pipeline from a php script using shell_exec.
> 
> Can someone tell me what environment variable needs to be set so that mfx264enc will work?
> 
> Thanks,
> Rand
> 
> From: Rand Graham/LGEUS Zenith R&D CSD(rand.graham at lge.com<mailto:rand.graham at lge.com>)
> Sent: Thursday, September 06, 2018 4:23 PM
> To: 'Discussion of the development of and with GStreamer' <gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>>
> Subject: gstvideoencoder error
> 
> Hello,
> 
> I am trying to run a pipe line that works on my machine on a colleague's machine with the same hardware and software set up, using Ubuntu 16.04 and compiling gstreamer from source.
> 
> The pipeline works on my machine but not on their machine.
> 
> There seems to be a problem with the mfxh264enc plugin.
> 
> I am getting the following error
> 
> gst-launch-1.0 -v -e mpegtsmux name=m ! hlssink target-duration=5  souphttpsrc location="http://127.0.0.1:8000/routestream/4" ! qtdemux ! h265parse ! mfxhevcdec ! videoconvert ! mfxvpp width=1280 height=720 !  mfxh264enc ! "video/x-h264, stream-format=byte-stream, profile=high" ! m.
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstMfxEncH264:mfxench264-0: Could not initialize supporting library.
> Additional debug info:
> gstvideoencoder.c(1627): gst_video_encoder_change_state (): /GstPipeline:pipeline0/GstMfxEncH264:mfxench264-0:
> Failed to open encoder
> Setting pipeline to NULL ...
> Freeing pipeline ..
> 
> I googled the error message. I found something about not having enough gpu memory. I used lspci to check the gpu information on both machines and lspci reports identical information for the intel GPU that is being used on both machines.
> 
> lspci -v -s 0:02.0
> 00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07) (prog-if 00 [VGA controller])
>         Subsystem: Intel Corporation Skylake Integrated Graphics
>         Flags: bus master, fast devsel, latency 0, IRQ 127
>         Memory at d0000000 (64-bit, non-prefetchable) [size=16M]
>         Memory at c0000000 (64-bit, prefetchable) [size=256M]
>         I/O ports at 1c00 [size=64]
>         [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
>         Capabilities: <access denied>
>         Kernel driver in use: i915
>         Kernel modules: i915
> 
> I suspect something is misconfigured but I am not sure what.
> 
> I run gnome on my machine but I am trying to run my colleague's system in a headless mode by using ssh to access the command line. I am not sure if that has anything to do with it but that is the main difference between how I am trying to run the pipeline.
> 
> Has anybody seen something like this before?
> 
> What support library does the x264 encoder need?
> 
> Any trouble shooting tips?
> 
> Thanks,
> Rand
> 

> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list