This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi,
We are integrating our ar0234 camera sensor with J784S4XG01EVM - TDA4VH. Here I can able to load the camera driver successfully.
After that I have set the formats with media-ctl command and after that when I try to stream the camera with the below given GStreamer command:
gst-launch-1.0 v4l2src num-buffers=-1 device=/dev/video4 ! "video/x-raw,width=1920,height=1080,format=UYVY" ! tiovxldc out-block-width=128 ! "video/x-raw,format=NV12" ! queue ! mosaic.sink_0 tiovxmosaic name=mosaic sink_0::startx="<0>" sink_0::starty="<0>" ! kmssink sync=false driver-name=tidss -v
I am getting the below errors:
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=6) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
1227.944797 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
1227.944847 s: VX_ZONE_INIT:Enabled
1227.944855 s: VX_ZONE_ERROR:Enabled
1227.944861 s: VX_ZONE_WARNING:Enabled
1227.945439 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0
1227.945549 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1
1227.945641 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2
1227.945747 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3
1227.945758 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
1227.946577 s: VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
Setting pipeline to PAUSED ...
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
../gst-plugins-bad-1.20.7/sys/kms/gstkmssink.c(907): gst_kms_sink_start (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer error: state change failed and some element failed to post a proper error m.
Additional debug info:
../gstreamer-1.20.7/libs/gst/base/gstbasesink.c(5878): gst_base_sink_change_state (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
Failed to start
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
1227.953791 s: VX_ZONE_ERROR:[vxGetStatus:1020] Reference is NULL
1227.954163 s: VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
1227.958529 s: VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit ... !!!
DDR_SHARED_MEM: Alloc's: 0 alloc's of 0 bytes
DDR_SHARED_MEM: Free's : 0 free's of 0 bytes
DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes
MEM: Deinit ... Done !!!
APP: Deinit ... Done !!!
Note:
1. I am using the second DisplayPort [J8] for connecting the kit to my LG monitor using DP cable.
2. I have used this same camera driver with my SK-TDA4VM kit and there I can able to stream the camera properly using the same above given GStreamer command.
I'm not sure where I am going wrong. Kindly help me rectify this?
Thanks,
Naveen.
Hi Naveen,
This error is usually seen when there is no display connected/detected. Since this is a problem with display rather than GStreamer, I will be closing this thread and suggest you continue the topic with our display expert in this thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1400412/j784s4xevm-j784s4xg01evm---tisdk-adas-image--machine-wic-xz-file-missing
If you face issues with GStreamer after sorting out the display issue, please let me know.
Thank you,
Fabiana
Hi Fabiana Jaimes,
suggest you continue the topic with our display expert in this thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1400412/j784s4xevm-j784s4xg01evm---tisdk-adas-image--machine-wic-xz-file-missing
In that thread, we were discussing the J9 connector, while here I am using the J8 connector. It seems that the J8 connector should work fine with GStreamer as mentioned in that thread (attached below).
Yes, the J8 connector can be used without any software changes, and GStreamer can be used to stream to the J8 connector. You may treat these two issues as separate while we debug the J9 connector.
If you face issues with GStreamer after sorting out the display issue, please let me know.
We are still encountering this issue. Kindly assist us with this. We are able to successfully get the stream via V4L2, but we are unable to push it to the display using the aforementioned GStreamer command.
Thanks,
Naveen
Hello
Our expert, Fabiana, who handles this thread, is out of the office until 25 September. Please expect a delay in responses.
Thanks.
Hi,
We have tried with the below command and can able to push the stream to display but we have so much latency in there.
gst-launch-1.0 v4l2src device=/dev/video8 num-buffers=-1 ! video/x-raw,width=1280,height=720,format=UYVY ! videoconvert ! waylandsink -e -v
Display log with kmsprint:
kmsprint
Connector 0 (40) DP-1 (disconnected)
Encoder 0 (39) NONE
Connector 1 (50) eDP-1 (connected)
Encoder 1 (49) NONE
Crtc 1 (48) 800x600@60.32 40.000 800/40/128/88/- 600/1/4/23/- 60 (60.32) 0xa 0x48
Plane 0 (31) fb-id: 67 (crtcs: 0 1) 0,0 800x600 -> 0,0 800x600 (AR12 AB12 RA12 RG16 BG16 AR15 AB15 AR24 AB24 RA24 BA24 RG24 BG24 AR30 AB30 XR12)
FB 67 800x600
Kindly help us with this.
Thanks,
Naveen.
Hi Naveen,
While Fabiana is out, let me see if I can make some suggestions.
GStreamer has a feature to see out-latency at a per element level. Could you try using the script mentioned in the SDK documentation to see which GStreamer element is causing the most latency: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-am69a/10_00_00/exports/edgeai-docs/common/measure_perf.html#parse-gst-tracers
From personal experience, I am suspecting videoconvert is taking up a lot of latency, since it runs on the CPU to do conversion of image format, resolution, etc, that are usually highly intensive for the CPU.
If you would like to see latency without display, you could pipe into a fakesink instead of waylandsink which takes in more formats and forgoes the need to do video conversion. The negative part of this is that you will not see things displayed for the eyes to see, but it is useful for dividing up capture and display pipelines during development.
Regards,
Takuma
Hi Takuma Fujiwara,
I'm encountering the following error while streaming from the camera:
[ 6775.730737] j721e-csi2rx 4520000.ticsi2rx: Failed to drain DMA. Next frame might be bogus.
I've reviewed discussions in other forums regarding similar issues, but I still don't have a clear understanding. I'm using SDK version 09_02_00_05.
What does this error mean, and how can I resolve it?
gst-launch-1.0 \ v4l2src device=/dev/video$1 io-mode=5 ! video/x-raw,format=UYVY, width=1920,height=1080 ! queue leaky=2 ! videoconvert ! \ tiovxmultiscaler ! video/x-raw, format=NV12, width=960, height=540 ! queue ! mosaic.sink_0 \ v4l2src device=/dev/video$2 io-mode=5 ! video/x-raw,format=UYVY, width=1920,height=1080 ! queue leaky=2 ! videoconvert ! \ tiovxmultiscaler ! video/x-raw, format=NV12, width=960, height=540 ! queue ! mosaic.sink_1 \ tiovxmosaic name=mosaic \ sink_0::startx="<0>" sink_0::starty="<0>" sink_0::widths="<960>" sink_0::heights="<540>" \ sink_1::startx="<0>" sink_1::starty="<540>" sink_1::widths="<960>" sink_1::heights="<540>" ! \ video/x-raw, width=1920, height=1080 ! queue ! | kmssink driver-name=tidss sync=false force-modesetting=true
gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -v
Hi Naveen,
I see that the first error is: "ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src1: Failed to allocate required memory."
I suspect this is the issue: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-am69a/10_00_00/exports/edgeai-docs/devices/AM69A/linux/faq.html#getting-error-when-trying-to-capture-from-multiple-usb-cameras-simultaneously
Regards,
Takuma
Hi Takuma Fujiwara,
I see that the first error is: "ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src1: Failed to allocate required memory."
I suspect this is the issue: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-am69a/10_00_00/exports/edgeai-docs/devices/AM69A/linux/faq.html#getting-error-when-trying-to-capture-from-multiple-usb-cameras-simultaneously
Thanks for the update, we will try that.
Additionally, could you please explain why the following error occurs and how we can resolve it?
So I am using this below command:Fullscreen1gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -vXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXFullscreen1gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -vXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXgst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -v
And it throws the above said [ 6775.730737] j721e-csi2rx 4520000.ticsi2rx: Failed to drain DMA. Next frame might be bogus error in between the stream.
Thanks,
Naveen
Hi Naveen,
"gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -v "
Do you mean to stream from /dev/video7 twice? Do you see the error when you change one of the "/dev/video7" instances with another unused sensor or when the repeated instance gets removed?
Thank you,
Fabiana
Hi Fabiana Jaimes,
Apologies. The command we have given above is wrong. We are not using the same device twice, it was supposed to be /dev/video8.
"gst-launch-1.0 v4l2src device="/dev/video5" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_0 v4l2src device="/dev/video6" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_1 v4l2src device="/dev/video7" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_2 v4l2src device="/dev/video8" ! video/x-raw,width=1920,height=1080 ! tiovxldc out-block-width=128 ! video/x-raw,format=NV12 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -v "
with this when we are streaming, we are getting the above said j721e-csi2rx 4520000.ticsi2rx: Failed to drain DMA. Next frame might be bogus error in between the stream
so to the question you have asked -> Do you see the error when you change one of the "/dev/video7" instances with another unused sensor or when the repeated instance gets removed?
Yes, we are getting the error.
Thanks,
Naveen.
Hi Naveen,
Thank you for clarifying. How are these sensors connected to the EVM? Are they connected via USB, CSI or fusion board?
Thanks,
Fabiana
Hi Fabiana Jaimes,
How are these sensors connected to the EVM? Are they connected via USB, CSI or fusion board?
We are using our own deserializer(ds90ub960) board and connecting it to the J55 connector of J784S4XG01EVM kit.
Thanks,
Naveen.
Hi Naveen,
Thank you for the information. Please allow me some time to run some tests with a fusion board on my end.
Thank you,
Fabiana
Hi Naveen,
I tried the following pipeline using the 10.0 version of the Edge AI image for j784s4. I used 4x imx390 connected via the Arducam V3Link mini fusion board and I was unable to reproduce the error message you are seeing.
gst-launch-1.0 -v v4l2src device=/dev/video-imx390-cam0 ! video/x-bayer, width=1936, height=1100, framerate=30/1, format=rggb12 ! queue leaky=2 ! tiovxisp sink_0::device=/dev/v4l-imx390-subdev0 sensor-name=SENSOR_SONY_IMX390_UB953_D3 dcc-isp-file=/opt/imaging/imx390/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx390/linear/dcc_2a.bin format-msb=11 ! tiovxldc dcc-file=/opt/imaging/imx390/linear/dcc_ldc.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 sink_0::pool-size=8 c::pool-size=8 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! queue ! mosaic.sink_0 v4l2src device=/dev/video-imx390-cam1 ! video/x-bayer, width=1936, height=1100, framerate=30/1, format=rggb12 ! queue leaky=2 ! tiovxisp sink_0::device=/dev/v4l-imx390-subdev1 sensor-name=SENSOR_SONY_IMX390_UB953_D3 dcc-isp-file=/opt/imaging/imx390/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx390/linear/dcc_2a.bin format-msb=11 ! tiovxldc dcc-file=/opt/imaging/imx390/linear/dcc_ldc.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 sink_0::pool-size=8 c::pool-size=8 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! queue ! mosaic.sink_1 v4l2src device=/dev/video-imx390-cam2 ! video/x-bayer, width=1936, height=1100, framerate=30/1, format=rggb12 ! queue leaky=2 ! tiovxisp sink_0::device=/dev/v4l-imx390-subdev2 sensor-name=SENSOR_SONY_IMX390_UB953_D3 dcc-isp-file=/opt/imaging/imx390/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx390/linear/dcc_2a.bin format-msb=11 ! tiovxldc dcc-file=/opt/imaging/imx390/linear/dcc_ldc.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 sink_0::pool-size=8 c::pool-size=8 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! queue ! mosaic.sink_2 v4l2src device=/dev/video-imx390-cam3 ! video/x-bayer, width=1936, height=1100, framerate=30/1, format=rggb12 ! queue leaky=2 ! tiovxisp sink_0::device=/dev/v4l-imx390-subdev3 sensor-name=SENSOR_SONY_IMX390_UB953_D3 dcc-isp-file=/opt/imaging/imx390/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx390/linear/dcc_2a.bin format-msb=11 ! tiovxldc dcc-file=/opt/imaging/imx390/linear/dcc_ldc.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 sink_0::pool-size=8 c::pool-size=8 ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! queue ! mosaic.sink_3 tiovxmosaic name=mosaic sink_0::startx="<0>" sink_0::starty="<0>" sink_1::startx="<1920>" sink_1::starty="<0>" sink_2::startx="<0>" sink_2::starty="<1080>" sink_3::startx="<1920>" sink_3::starty="<1080>" ! kmssink sync=false driver-name=tidss -e -v
The IMX390 sensor requires ISP binaries so you can ignore these. I also noticed you are missing sink_0::startx="<0>" right after tiovxmosaic name=mosaic in the last pipeline you shared.
Thank you,
Fabiana