I want to use gstreamer to open the /dev/video0 in my tx1.
I get black screen when i type :
gst-launch-0.10 -v v4l2src device=/dev/video0 ! video/x-raw-yuv,framerate=30/1,width=1280,height=720 ! xvimagesink
in my terminal.
I install the good,bad,ugly,base plugins and the nvgstcapture works great with my camera.
Could anyone can help?
Not sure what you’re trying to do, but here are some advices:
-
You’re mixing gstreamer-1.0 (in topic title) and gstreamer-0.10 (in posted command). Unless you have good reasons for using gstreamer-0.10, I’d advise to use gstreamer-1.0. Installing plugins is also version dependent, there are plugins for 0.10 and plugins for 1.0.
-
If you’re trying to use onboard camera, you may read this post: https://devtalk.nvidia.com/default/topic/1028611/jetson-tx2/is-there-a-parameter-for-enable-disable-the-tx2-on-board-camera-/post/5232247/#5232247.
-
If you’re trying to use a USB camera, be sure it is /dev/video0. If you have the onboard camera working, this should be /dev/video0. Pluging the USB camera should lead to /dev/video1 to be created. Check to be sure you give the right device node.
-
In your gstreamer pipeline, the caps between plugins should be single quoted when used from shell with gst-launch-1.0:
'video/x-raw-yuv,framerate=30/1,width=1280,height=720'
- Use gst-inspect-1.0 to get for each plugin its source (ie output) and sink (input) capabilities.
gst-inspect-1.0 v4l2src
gst-inspect-1.0 xvimagesink
Find which source caps from a plugin can match sink caps of following plugin in the pipeline.
- I don’t think capability ‘video/x-raw-yuv’ is correct. Should be rather something like:
'video/x-raw, format=UYVY, framerate=30/1, width=1280, height=720'
The exact format depends on what your camera provides. You may try:
gst-launch-1.0 -v v4l2src device=/dev/video1 ! fakesink
check the output format of your cam and build the pipeline.