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.

SK-TDA4VM: Issue with setting lower resolution on Gstreamer Pipeline

Part Number: SK-TDA4VM
Other Parts Discussed in Thread: TDA4VM

Issue : I am unable to read or set a lower resolution on the GStreamer pipeline to read from the Pi v2 Camera

I have a TDA4VM Starter which I want to use for a custom application. I need to read the video stream at a resolution of 640x480. However, If I set it to anything below 1920x1080, it is not able to get the buffer for the frames.

Gstreamer src string:   "v4l2src device=/dev/video2 ! queue leaky=2 ! video/x-bayer, width=1920, height=1080, format=rggb, framerate=250/1 ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging/imx219/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a.bin format-msb=7 ! video/x-raw, format=NV12 ! tiovxcolorconvert target=0 in-pool-size=4 out-pool-size=4 ! video/x-raw,format=RGB ! appsink name=sen_0 max-buffers=4 drop=true" 

I am using the gstreamer wrapper buffer provided with the SDK. 

Could someone please help me with this?

  • I was edited the "setup_camera.sh" - inside /opt/edge_ai_apps/scripts - 
    Line 112 - CSI_CAM_0_FMT='[fmt:SRGGB8_1X8/1920x1080]' to CSI_CAM_0_FMT='[fmt:SRGGB8_1X8/640x480]'. 
    Doing so, I was able to change the resolution to 640 x 480. However, I cannot use "tiovxisp" - which necessitates that I capture in 1920 x 1080.

  • Hi Yogesh,

    If video needs to be downscaled there is a GStreamer plugin available that automatically uses TI's hardware accelerator: https://github.com/TexasInstruments/edgeai-gst-plugins/wiki/tiovxmultiscaler

    Let me know if the tiovxmultiscaler would work for your application.

    Also, tiovxisp should be able to do 640 x 480 as documented here: https://github.com/TexasInstruments/edgeai-gst-plugins/wiki/tiovxisp. Could you share any error logs?

    Regards,

    Takuma

  • Thank you for the reply!
    1) I need 640x480 for my application to run at fps > 90. However, tiovxisp fails to initialize if i use it at that resolution.
    2) I am unable to change the fps no matter what. It defaults to 30.303 frames/second. Could you please help me with this?

    As for the error logs - there seems to be none. It just does not start the stream. And because of this, I am unable to get any frames. I have attached the output here :

    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
      2909.335772 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
      2909.335815 s:  VX_ZONE_INIT:Enabled
      2909.335823 s:  VX_ZONE_ERROR:Enabled
      2909.335831 s:  VX_ZONE_WARNING:Enabled
      2909.336325 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
      2909.336530 s:  VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstKMSSink:fps-display-video_sink-actual-sink-kms: display-width = 1920
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstKMSSink:fps-display-video_sink-actual-sink-kms: display-height = 1080
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstKMSSink:fps-display-video_sink-actual-sink-kms: sync = true
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)640, height=(int)480, format=(string)rggb, framerate=(fraction)60/1, colorimetry=(string)sRGB, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)640, height=(int)480, format=(string)rggb, framerate=(fraction)60/1, colorimetry=(string)sRGB, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXIspPad:sink_0: caps = video/x-bayer, width=(int)640, height=(int)480, format=(string)rggb, framerate=(fraction)60/1, colorimetry=(string)sRGB, interlace-mode=(string)progressive
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)640, height=(int)480, format=(string)rggb, framerate=(fraction)60/1, colorimetry=(string)sRGB, interlace-mode=(string)progressive
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXMisoPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink.GstGhostPad:sink.GstProxyPad:proxypad1: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstKMSSink:fps-display-video_sink-actual-sink-kms.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink.GstGhostPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)60/1


    It is just stuck there and there is no display on the screen.

  • Hello.

    So I ran the demo application with the resolution of 640x480. It does not work there either. I edited the setup_cameras.sh script to set the input resolution to 640x480 and then I changed the configs script to input the same. The demo application provided by TI did not work.

    Could anyone help with this issue?