首页 > 解决方案 > 在 Linux (WSL2) 中使用 Windows 子系统在 OpenVino 中运行 gstreamer 应用程序

问题描述

我的系统主操作系统是 Windows-10 操作系统,并在子系统中安装了 WSL2。

Openvino 安装在 Linux 下的 WSL2 下。原因是 dlstreamer-gst 仅在 linux 中受支持。

当我测试以下测试应用程序时,它仅适用于 fps 并且显示不起作用。

如果我运行应用程序

./vehicle_pedestrian_tracking.sh person-bicycle-car-detection.mp4 10 CPU fps

我可以看到输出为

FpsCounter(1sec): total=346.54 fps, number-streams=1, per-stream=346.54 fps
FPSCounter(average): total=340.06 fps, number-streams=1, per-stream=340.06 fps
Got EOS from element "pipeline0".
Execution ended after 0:00:02.456260800
Setting pipeline to NULL ...
Freeing pipeline ...

当我为展示而奔跑时,

./vehicle_pedestrian_tracking.sh person-bicycle-car-detection.mp4 10 CPU dispaly

我有错误

ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
../sys/xvimage/xvimagesink.c(1778): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstXvImageSink:xvimagesink0:
Could not open display (null)
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

 

是否显示在 WSL 子系统中不可用?

标签: openvino

解决方案


我的解决方案是我无法显示,但我可以将文件另存为

gst-launch-1.0 filesrc location=video1.avi ! decodebin ! video/x-raw ! queue ! gvadetect model=/home/nyan/intel/dl_streamer/models/intel/vehicle-detection/FP16/model_fp16.xml model-proc=./model_proc/vehicle-detection.json inference-interval=10 threshold=0.6 device=CPU ! queue ! gvafpscounter ! filesink location=output.avi

推荐阅读