Deepstream-nvof-app with usb camera

Hi,

When i try to run optical flow with a usb camera (it runs successfully on the sample video file) using the command:

$ deepstream-nvof-app v4l2:///dev/video0

I get the following error:

stream-nvof-test$ deepstream-nvof-app v4l2:///dev/video0
Now playing: v4l2:///dev/video0,

Using winsys: x11
Device Number: 0
Device name: Xavier
Device Version 7.2
Device Supports Optical Flow Functionality

Decodebin child added: source
Decodebin child added: decodebin0
Running…
In cb_newpad
Error: Decodebin did not pick nvidia decoder plugin.
ERROR from element source: Internal data stream error.
Error details: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:nvof-test-pipeline/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstV4l2Src:source:
streaming stopped, reason not-linked (-1)
Returned, stopping playback
Deleting pipeline

Is this not supported, or (probably) something I’m missing?

Thanks

Hi,
deepstream-nvof-test uses uridecodebin which does not work with v4l2 sources. You need to replace it with

v4l2src ! videoconvert ! nvvideoconvert ! ...

For you reference, below is a sample based on deepstream-test1:
https://devtalk.nvidia.com/default/topic/1066418/deepstream-sdk/use-yuy2-format-as-input/post/5404526/#5404526

Thanks very much for your help. Unfortunately my knowledge of c isn’t up to these levels. If you get a chance to post the amended code like you did for deepstream-test1, that would be an enormous help!

Hi,
Samples are for reference and not able to cover all cases. We would encourage users on customization and integration.