Skip to content

Can these images be used with the gstreamer vaapi plugin in a non-interactive shell? #99

@saites

Description

@saites

Maybe I'm missing something obvious, but if I try to use this image without first initializing an interactive bash session, I cannot use the vaapi plugins. Compare the output of the following, executed on an Ubuntu 18 host:

Creating a container based on the data_dev image and directly running gst-inspect-1.0:

docker run -it --rm --device '/dev/dri:/dev/dri' \
        openvino/ubuntu20_data_dev:latest \
        gst-inspect-1.0 vaapih264enc
error: XDG_RUNTIME_DIR not set in the environment.
No such element or plugin 'vaapih264enc'

Doing the same, but running the command within the context of an "interactive" bash shell:

docker run -it --rm --device '/dev/dri:/dev/dri' \
        openvino/ubuntu20_data_dev:latest \
        /bin/bash -i -c "gst-inspect-1.0 vaapih264enc"
error: XDG_RUNTIME_DIR not set in the environment.
[setupvars.sh] OpenVINO environment initialized
Factory Details:
  Rank                     primary (256)
  Long-name                VA-API H264 encoder
  Klass                    Codec/Encoder/Video/Hardware
  Description              A VA-API based H264 video encoder
  Author                   Wind Yuan <feng.yuan@intel.com>
  
# <etc...>

As I understand it, using the -i flag when starting bash has many effects, including reading startup files. I can see in the output that [setupupvars.sh] runs in the interactive session. However, there seems to be something more going on. I tried creating a new derived image with an ENTRYPOINT script that sources /opt/intel/openvino/setupvars.sh (and/or .bashrc or .profile files), then execing the original command, but that is not sufficient to make the vaapi plugin available (and this may just be my misunderstanding about how bash's environment propagates -- suggestions are welcome).

Obviously, the command above (using /bin/bash -i -c) works around this issue, but it is not ideal. Is there a way to run a gstreamer command that uses the vaapi plugin within a container based on this image without using an interactive bash session?

Thanks!

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions