Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepstream gstreamer plugin for V4L2 jpeg decoder #104

Closed
bchoineubility opened this issue Oct 23, 2023 · 12 comments
Closed

deepstream gstreamer plugin for V4L2 jpeg decoder #104

bchoineubility opened this issue Oct 23, 2023 · 12 comments

Comments

@bchoineubility
Copy link

Hi,

I am testing with deepstream with gstream plugin but, following code is return NULL.

gst_element_factory_make("nvv4l2decoder", jpeg_decoder_name.c_str());

I think deepstream of yocto version would not include plugin.

Can you please let me know deepstream of yocto version support all gstreamer plugins as well?

BR,
Mark

@dwalkes
Copy link
Member

dwalkes commented Oct 23, 2023

Hi Mark,

The nvv4l2decoder is tested with the sintel test as a part of the gstreamer-tests package. You can find the combinations we've tested with tegra-demo-distro on the Releases Validation Sheet.

You'll need to include the gstreamer1.0-plugins-nvvideo4linux2 recipe, which in included in gstreamer-1.0-plugins-tegra.

You may want to test drive the tegra-demo-distro demo-image-full image for the corresponding MACHINE and use this to compare to your image content.

@bchoineubility
Copy link
Author

bchoineubility commented Oct 23, 2023

Hi Dan,

Thanks for reply.

By the way, Release Validation Sheet show L4T looks like test is not done completely test item.

Is it not seems to be formal QA test, right?

BR,
Mark

@dwalkes
Copy link
Member

dwalkes commented Oct 24, 2023

Hi Mark
That's correct, this is not formal QA and we don't test everything. It's the effort of volunteers attempting to ensure we have some coverage of major components between releases. Any help in additional coverage is welcome and appreciated. Request edit access on the sheet if you'd like to make changes.

@bchoineubility
Copy link
Author

bchoineubility commented Oct 24, 2023

I can run sintel_test but, It still can not find it.

I tried with gst-inspect but, it does not display any.

jetson-agx-xavier-devkit:/opt/nvidia/deepstream/deepstream/lib$ gst-inspect-1.0 nvv4l2decoder

by the way, if I tried to gst-inspect-1.0 nvv4l2decoder with sudo, it output correctly.

BR,
Mark

@dwalkes
Copy link
Member

dwalkes commented Oct 24, 2023

Did you try with tegra-demo-distro and image demo-image-full? If so, which branch are you using?

@bchoineubility
Copy link
Author

bchoineubility commented Oct 24, 2023

I don't use tegra-demo-distro layer now. sintel_test and gstreamer can be accessed only with sudo now.

I added a new user account and give the new user sudo access to test my applications. these application are running well on the nvidia ubuntu system.

Is there any information that I give you if you need?

I will loot into tegra-demo-distro to find a hint.

@bchoineubility
Copy link
Author

bchoineubility commented Oct 25, 2023

Hi Dan,

If I run, gst-inpsect-1.0 , following error is occurred by normal user after clear gstreamer cache,

NvRmMemInitNvmap failed with Permission denied
549: Memory Manager Not supported



****NvRmMemInit failed**** error type: 196626

I found libgstnvvideo4linux2 is in the black list as well.

when I run the command:
gst-inspect-1.0 -b

I can get the black list. I am not sure why they are in the blacklist for my new account.

[[33mBlacklisted files:[[0m
  libcustom2d_preprocess.so
  libgstnvarguscamerasrc.so
  libgstnvcompositor.so
  libgstnvdrmvideosink.so
  libgstnvivafilter.so
  libgstnvv4l2camerasrc.so
  libgstnvvidconv.so
  libgstnvvideo4linux2.so
  libgstnvvideoconvert.so
  libnvdsgst_deepstream_bins.so
  libnvdsgst_dewarper.so
  libnvdsgst_dsexample.so
  libnvdsgst_infer.so
  libnvdsgst_multistream.so
  libnvdsgst_multistreamtiler.so
  libnvdsgst_preprocess.so
  libnvdsgst_tracker.so


[[94mTotal count[[0m: [[0m17 blacklisted files[[0m

and when I run it with sudo, it is not in the blacklist.

jetson-agx-xavier-devkit:~/.cache/gstreamer-1.0$ sudo gst-inspect-1.0 | grep nvv4l2decoder
nvvideo4linux2:  nvv4l2decoder: NVIDIA v4l2 video decoder
jetson-agx-xavier-devkit:~/.cache/gstreamer-1.0$

Can you let me know how to resolve it?

BR,
Mark

@madisongh
Copy link
Member

I added a new user account and give the new user sudo access to test my applications. these application are running well on the nvidia ubuntu system.

Generally, if something works when run as root (or under sudo), but not under another user account, you have a permissions problem. Check the list of groups for the user account you added. At the very least, users need to be in the video group to access the video-related devices exported by the NVIDIA drivers.

@bchoineubility
Copy link
Author

bchoineubility commented Oct 26, 2023

Hi Matt,

Even I tried to add all groups listed in the /etc/groups to my non-root user, it does not work.

Looking into device files in the /dev have no permission and group for video and trying to change permission and owner of group to 660 and video respectly. then, error message is changing to

jetson-agx-xavier-devkit:~/.cache/gstreamer-1.0$ gst-inspect-1.0
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624
nvbufsurftransform:cuInit failed : 999
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=196624

It means non-root user do not access nvidia driver node.

I can resolve it with :
sudo chmod -R 777 /dev

BR,
Mark

@madisongh
Copy link
Member

I don't know what's gone wrong in your setup, but it is certainly possible to configure your system to have processes run as non-root users and still have access to the GPU and other video hardware. I've done so in several projects; NVIDIA sets this up in their JetPack/Jetson Linux Ubuntu also.

For troubleshooting, you might want to try running your program under strace for the working and non-working cases and compare the output between the two to see what's different.

@bchoineubility
Copy link
Author

bchoineubility commented Oct 27, 2023

OK, I will check my setup.

BR,
Mark

@bchoineubility
Copy link
Author

I found core-image-sato image correct permission and ownership after rebuild it.

Actually, I have used ros-image-world image and it would occur this issue.

I closed this issue.

Thanksm Matt and Dan.

BR,
Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants