-
-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Hey, I am trying to get gstreamer to stream an mpegts stream over udp with hardware accelerated encoding on video using VAAPI. With intel integrated GPU.
Basically I can run this command in command line to do this and it works without any problems.
gst-launch-1.0 ximagesrc ! video/x-raw,framerate=30/1 ! timeoverlay ! videoconvert ! vaapih264enc ! queue ! mpegtsmux name=m ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1234 sync=false alsasrc device=hw:0 ! audioconvert ! fdkaacenc ! m.
But when I am using gstreamer-java with a simple parselaunch test:
Gst.init(Version.BASELINE);
Pipeline pipeline = (Pipeline) Gst.parseLaunch("ximagesrc ! video/x-raw,framerate=30/1 ! timeoverlay ! videoconvert ! vaapih264enc ! queue ! mpegtsmux name=m ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1234 sync=false alsasrc device=hw:0 ! audioconvert ! fdkaacenc ! m.");
pipeline.play();As you can see both pipelines are identical.
However I am getting an error from gstreamer:
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
Now my idea is that, somehow VAAPI is using the wrong driver while working in JVM but the correct one in command line.
There is this Environment variable that needs to be set for the VAAPI to tell which driver to use:
LIBVA_DRIVER_NAME, which I have set to correct value for my GPU, as, LIBVA_DRIVER_NAME=iHD.
Is there a possibility that when gstreamer is ran through this library, this environment variable is not passed to the gstreamer process?
I can see the environment variable using System.getenv("LIBVA_DRIVER_NAME")
OR Is this absolutely unrelated to this?