MistySOM / rzv2l

MH11-V2L-1
MIT License
0 stars 0 forks source link

Re: Misty gstreamer drpai plugin #17

Closed mistyron closed 1 year ago

mistyron commented 1 year ago

This is for record keeping: Hey Ron,

After a few busy weeks I'm looking at the MistySOM in earnest for running our model. Going through some of the wiki materials and ran into one blocker

The SOM board we have was kindly shipped with all the scripts and binaries to get going. The issue is the gstreamer drpai plugin appears to be invalid somehow. Trying to run the example below

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, format=BGR \
    ! drpai show-fps=true log-detects=true smooth-video-rate=30 \
    ! vspmfilter dmabuf-use=true ! video/x-raw, format=NV12 \
    ! omxh264enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 periodicty-idr=2 \
    ! video/x-h264,profile=\(string\)high,level=\(string\)4.2 \
    ! rtph264pay ! udpsink host={SINKHOST} port=51372

Exits and prints the following warning:

WARNING: erroneous pipeline: no property "show-fps" in element "drpai0"

Inspecting the plugin indicates the warning is valid - the plugin doesn't have the properties specified in the . Maybe this is just an old version of the plugin?

gst-inspect-1.0 /usr/lib64/gstreamer-1.0/libgstdrpai.so

[[33mPlugin Details[[0m:

  [[94mName                     [[0m[[0mdrpai[[0m

  [[94mDescription              [[0m[[0mDRP-AI Plug-in[[0m

  [[94mFilename                 [[0m[[0m/usr/lib64/gstreamer-1.0/libgstdrpai.so[[0m

  [[94mVersion                  [[0m[[0m1.19.0.1[[0m

  [[94mLicense                  [[0m[[0mLGPL[[0m

  [[94mSource module            [[0m[[0mgst-drpai-plugin[[0m

  [[94mBinary package           [[0m[[0mGStreamer DRP-AI Plug-in[[0m

  [[94mOrigin URL               [[0m[[0mhttps://[mistysom.com](http://mistysom.com/)[[0m

  [[32mdrpai[[0m: [[0mDRP-AI[[0m

  [[33m1 features[[0m:

  [[95m+--[[0m [[94m1 elements[[0m

Pardon the formatting.

Any suggestions to resolve this?

Regards Jotham

mistyron commented 1 year ago

Matin responded with: Hi Jothan,

I can definitely help you with the error. You are absolutely right. The version of the plugin that you have is old. Hence, the properties that are mentioned in the most recent wiki don't apply.

To fix this, you can either remove drpai properties (i.e. show-fps=true log-detects=true smooth-video-rate=30 ) and run the gstreamer like:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, format=BGR \
    ! drpai \
    ! vspmfilter dmabuf-use=true ! video/x-raw, format=NV12 \
    ! omxh264enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 periodicty-idr=2 \
    ! video/x-h264,profile=\(string\)high,level=\(string\)4.2 \
    ! rtph264pay ! udpsink host={SINKHOST} port=51372

Or you can update the plugin by downloading the latest version from here: https://github.com/MistySOM/gstreamer1.0-drpai/releases I compiled the plugin just now and provided an RPM file that you can copy to the SD card and install with the command: dnf install ./gstreamer1.0-drpai-1.0-r0.aarch64.rpm

Best, Matin

mistyron commented 1 year ago

Jotham's response: Thanks Matin! I'll give this a try tomorrow and let you know how it goes

mistyron commented 1 year ago

Jotham's response: Worked like a charm - thanks again.

I'll be trying to build a gst plugin with a different ai model, so I will likely be in touch with more questions later.

Regards J