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.

PROCESSOR-SDK-AM62X: Camera performance Issue

Part Number: PROCESSOR-SDK-AM62X


Hi Team,

I am trying to add ar1335 camera support on AM62X Starter kit. I have added dts entry and driver.

The driver loaded and the following nodes are created successfully

# ls /dev/video*
/dev/video0  /dev/video1  /dev/video2  /dev/video3
# ls /dev/media*
/dev/media0
# ls /dev/v4l-subdev*
/dev/v4l-subdev0  /dev/v4l-subdev1  /dev/v4l-subdev2

When I tried to preview the camera stream in FHD (1920x1080 @ 64fps) resolution 2 lane, I got very less fps around 15-20 fps.

Then I checked with v4l2-ctl and gstreamer fakesink commands.
v4l2-ctl streamed more than 60fps

# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
# v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 62.97 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.29 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.40 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 63.61 fps

But fakesink and gstremer preview give only 15 - 20 fps.

Fakesink command:

# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=64/1 ! fpsdisplaysink video-sink=fakesink -v
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:SystemMemory, meta:GstVideoOverlayComposition), width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)progressive

/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 33, dropped: 0, current: 64.32, average: 64.32
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 33, dropped: 0, current: 64.32, average: 64.32
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 42, dropped: 0, current: 17.52, average: 40.91
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 42, dropped: 0, current: 17.52, average: 40.91
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 52, dropped: 0, current: 19.59, average: 33.83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 52, dropped: 0, current: 19.59, average: 33.83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 62, dropped: 0, current: 19.73, average: 30.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 62, dropped: 0, current: 19.73, average: 30.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 72, dropped: 0, current: 19.70, average: 28.22
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 72, dropped: 0, current: 19.70, average: 28.22
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 83, dropped: 0, current: 20.09, average: 26.78
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 83, dropped: 0, current: 20.09, average: 26.78
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 93, dropped: 0, current: 19.89, average: 25.82
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 93, dropped: 0, current: 19.89, average: 25.82
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 103, dropped: 0, current: 19.93, average: 25.10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 103, dropped: 0, current: 19.93, average: 25.10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 113, dropped: 0, current: 19.88, average: 24.53
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 113, dropped: 0, current: 19.88, average: 24.53
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 123, dropped: 0, current: 19.81, average: 24.07
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 123, dropped: 0, current: 19.81, average: 24.07
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 133, dropped: 0, current: 19.66, average: 23.67
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 133, dropped: 0, current: 19.66, average: 23.67
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 143, dropped: 0, current: 19.66, average: 23.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 143, dropped: 0, current: 19.66, average: 23.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 153, dropped: 0, current: 19.65, average: 23.05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 153, dropped: 0, current: 19.65, average: 23.05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 163, dropped: 0, current: 19.89, average: 22.83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 163, dropped: 0, current: 19.89, average: 22.83
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 173, dropped: 0, current: 19.92, average: 22.64
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 173, dropped: 0, current: 19.92, average: 22.64
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 183, dropped: 0, current: 19.82, average: 22.46
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 183, dropped: 0, current: 19.82, average: 22.46
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 193, dropped: 0, current: 19.77, average: 22.31

Gstreamer Command:

# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'

# gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1920,height=1080,format=UYVY" ! fpsdisplaysink video-sink=autovideosink -v

Do I need to do any other configurations in the SDK side to achieve supported resolution by the camera sensor ?

Regards,
Ajith Kumaresh S.

  • Hello Ajith Kumaresh S.,

    Can you try to disable text-overlay in your gst pipeline? For example, 

    gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1920,height=1080,format=UYVY" ! fpsdisplaysink video-sink=autovideosink -v text-overlay=false

    Regards,

    Jianzhong

  • Hi Jianzhong Xu

    Thanks for your response,

    I have modified the commands as per your input.
    Now I am able to achieve the supported fps in fakesink command

    But I am still getting ~20fps in streaming

    Commands Used

    Fakesink:

    bash-5.0# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
    bash-5.0# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=64/1 ! fpsdisplaysink video-sink=fakesink -v text-overlay=false
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(string)pro
    gressive
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(stri
    ng)progressive
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry
    =(string)bt709, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(str
    ing)bt709, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interl
    ace-mode=(string)progressive
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)64/1, format=(string)YUY2, colorimetry=(string)bt709, interlace-mode=(str
    ing)progressive
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 33, dropped: 0, current: 64.92, average: 64.92
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 65, dropped: 0, current: 63.60, average: 64.27
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 97, dropped: 0, current: 63.60, average: 64.04
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 129, dropped: 0, current: 63.62, average: 63.94
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 161, dropped: 0, current: 63.62, average: 63.87
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 193, dropped: 0, current: 63.61, average: 63.83
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 225, dropped: 0, current: 63.64, average: 63.80
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 257, dropped: 0, current: 63.58, average: 63.77
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 289, dropped: 0, current: 63.59, average: 63.75
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 321, dropped: 0, current: 63.65, average: 63.74
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 353, dropped: 0, current: 63.61, average: 63.73
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 385, dropped: 0, current: 63.62, average: 63.72
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 417, dropped: 0, current: 63.59, average: 63.71
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 449, dropped: 0, current: 63.63, average: 63.71
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 481, dropped: 0, current: 63.61, average: 63.70
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 513, dropped: 0, current: 63.62, average: 63.69
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:09.107248188
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Camera Streaming:
    bash-5.0# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
    bash-5.0# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=64/1e
    [  152.631476]  ar1335_set_fmt
    [  152.661827]  stream config success
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: sync = false
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage: sync = false
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, colorimetry=(string)bt709, interlace-mode=(string)progre
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, colorimetry=(string)bt709, interlace-mode=(stringe
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, colorimetry=(e
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad1: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerae
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage.GstGhostPad:sink.GstProxyPad:proxypad2: caps = video/x-raw, width=(inte
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLUploadElement:gluploadelement0.GstPad:src: caps = video/x-raw(memD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLColorConvertElement:glcolorconvertelement0.GstPad:src: caps = vidD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLColorBalance:glcolorbalance0.GstPad:src: caps = video/x-raw(memorD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink.GstPad:sink: caps = video/x-raw(memory:GLMemory), D
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLColorBalance:glcolorbalance0.GstPad:sink: caps = video/x-raw(memoD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLColorConvertElement:glcolorconvertelement0.GstPad:sink: caps = viD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLUploadElement:gluploadelement0.GstPad:sink: caps = video/x-raw, we
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)108e
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, cole
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, colorimetry=(string)bt709, interlace
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)64/1, colorimetry=(string)bt709, interlace-mode=(strine
    [  153.853384]  mcu_cam_stream_on 1648
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLUploadElement:gluploadelement0.GstPad:src: caps = video/x-raw(memD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLColorConvertElement:glcolorconvertelement0.GstPad:sink: caps = viD
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLUploadElement:gluploadelement0.GstPad:sink: caps = video/x-raw, we
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: sync = false
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage: sync = false
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 12, dropped: 0, current: 22.61, average: 22.61
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 23, dropped: 0, current: 21.81, average: 22.22
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 35, dropped: 0, current: 22.11, average: 22.18
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 47, dropped: 0, current: 22.15, average: 22.17
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 59, dropped: 0, current: 22.09, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 71, dropped: 0, current: 22.17, average: 22.16
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 83, dropped: 0, current: 22.12, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 95, dropped: 0, current: 22.15, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 107, dropped: 0, current: 22.14, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 119, dropped: 0, current: 22.18, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 131, dropped: 0, current: 22.08, average: 22.15
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 143, dropped: 0, current: 22.11, average: 22.14
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 155, dropped: 0, current: 22.16, average: 22.14
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:08.005278966
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Regards,
    Ajith Kumaresh S.

  • Hello Ajith,

    Camera Streaming:
    bash-5.0# media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
    bash-5.0# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=64/1e

    The gst pipeline for streaming that you shared was not complete. Can you share it again?

    Can you also share the output of "media-ctl -p"?

    In addition, what are the supported frame rates of your display?

    Regards,

    Jianzhong

  • Hi Jianzhong Xu,

    Please find the media-ctl -p output

    # media-ctl -p

    Media controller API version 5.10.168

    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  5.10.168

    Device topology
    - entity 1: 30102000.ticsi2rx (5 pads, 5 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
        routes:
            0/0 -> 1/0 [ACTIVE]
        pad0: Sink
            [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
            <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
            [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
            -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
        pad2: Source
            -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
        pad3: Source
            -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
        pad4: Source
            -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]

    - entity 7: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 0 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
        pad0: Sink
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
            <- "ar1335 4-0042":0 [ENABLED,IMMUTABLE]
        pad1: Source
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
            -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
        pad3: Source
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
        pad4: Source
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]

    - entity 13: ar1335 4-0042 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev2
        pad0: Source
            [stream:0 fmt:UYVY8_2X8/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
            -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

    - entity 19: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video0
        pad0: Sink
            <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

    - entity 25: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video1
        pad0: Sink
            <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

    - entity 31: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
        pad0: Sink
            <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

    - entity 37: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
        pad0: Sink
            <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

    Camera Streaming:
    # media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
    # gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=64/1 ! fpsdisplaysink video-sink=autovideosink sync=false -v text-overlay=false

    And the display supports FHD @ 60 Hz

    Regards

    Ajith Kumaresh S.

  • Ok. Thanks for sharing the logs.

    Can you try kmssink: gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=64/1 ! fpsdisplaysink video-sink="kmssink driver-name=tidss sync=true show-preroll-frame=false" sync=true?

  • Hi Jianzhong Xu,

    I have tried the above command but it doesn't work

    # media-ctl -d /dev/media0 --set-v4l2 '"ar1335 4-0042":0[fmt:UYVY2X8/1920x1080 field:none]'
    # gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=64/1 ! fpsdisplaysink video-sink="kmssink driver-name=tidss sync=true show-preroll-frame=false" sync=true

    [ 1255.862549] Skipping Previous mode set ...
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    [ 1256.691775]  mcu_cam_stream_on 1647
    ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: GStreamer encountered a gener.
    Additional debug info:
    ../gst-plugins-bad-1.16.3/sys/kms/gstkmssink.c(1670): gst_kms_sink_show_frame (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsd:
    drmModeSetPlane failed: Permission denied (-13)
    Execution ended after 0:00:00.623982307
    Setting pipeline to NULL ...
    [ 1257.939259] ti-udma 485c0100.dma-controller: chan3 teardown timeout!
    Freeing pipeline ...

    Regards,
    Ajith Kumaresh S

  • Hi Jianzhong Xu,

    Thanks for your support, I have tried the following command and achieved the supported fps

    # gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,pixelformat=UYVY ! fpsdisplaysink video-sink=waylandsink sync=false -v text-overlay=false

    When I tried to unload the driver I am getting the following error

    # rmmod ar1335
    rmmod: ERROR: Module ar1335 is in use
    # rmmod cdns_csi2rx
    rmmod: ERROR: Module cdns_csi2rx is in use
    # rmmod v4l2_fwnode
    rmmod: ERROR: Module v4l2_fwnode is in use by: cdns_csi2rx ar1335

     Could you please point out the right procedure to unload the driver.

    Regards,
    Ajith Kumaresh S.

  • Hello Ajith Kumaresh S.,

    To use kmssink, you probably need to stop weston: root@am62xx-evm:~# /etc/init.d/weston stop.

    Could you please point out the right procedure to unload the driver.

    You'll need to first unload j721e_csi2rx. I would recommend to use "modprobe" which also removes dependent modules. For example,

    root@am62xx-evm:~# modprobe -r j721e_csi2rx cdns_csi2rx ov5640
    root@am62xx-evm:~# modprobe -a j721e_csi2rx cdns_csi2rx ov5640

    Regards,

    Jianzhong