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.

AM625: How to do camera view using gstreamer

Part Number: AM625

Tool/software:

Hello TI, 

I am using AM6254 with MCU+SDK 9.0.

My USB-Web Camera works fine if i used TI-APP-Launcher demo app.

Now, i want to view the camera using gst-launcher-1 command , but fail. Please guide. Thanks.

Below are steps I did:

#weston &  -> weston gray screen display, it looks fine

# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw, width=1024, height=576, framerate=15/1 ! waylandsink
Setting pipeline to PAUSED ...
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

root@am62xx-evm:/dev# ls video*
video0 video1
root@am62xx-evm:/dev#

  • Hi Paul,

    Does adding a videoconvert in the pipeline help like below?

     gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw, width=1024, height=576, framerate=15/1 ! videoconvert ! waylandsink

    Best Regards,

    Suren

  • Hello Suren

    I run the given command, then no camera output and it shows difference error.

    root@am62xx-evm:~# gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw, width=1024, height=576, framerate=15/1 ! videoconvert !

    (gst-launch-1.0:749): GStreamer-CRITICAL **: 00:01:14.091: gst_element_link_pads_filtered: assertion 'GST_IS_BIN (parent)' failed
    ERROR: pipeline could not be constructed: syntax error.

    Below log is power on log, and run the command's log.

    power_on_weston_gst_camera_fail_log.txt 

  • Hi Paul,

    I just followed these steps on my AM62 board with a USB camera connected.

    1. v4l2-ctl --list-devices
    2. v4l2-ctl -d /dev/video0 --list-formats-ext
    3. systemctl stop weston
    4.  gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=1024, height=576, framerate=15/1 ! waylandsink

    I was able to capture from camera and display without having to use the videoconvert.

    Can you try and do the same steps and share your output?

    Best Regards,

    Suren

  • Hello Suren

    I followed the given 4 steps on both AM62x EVK and our custom board. Results are the same; no camera view display.

    1) Our custom board, after run cmd in 3., weston gray screen is off, then cmd 4, nothing is shown (no weston gray screen also.) . (Note display output is changed to CSI-2, not HDMI).

    2. On AM62x EVK, after run cmd in 3., weston gray screen is ON, then cmd 4, no Camera view display. (Note display thought HDMI)

    Please check below logs. Thanks.

    .EVK_Log.txt4331.Custom_board.txt

  • "EVK_Demo.mp4", No camera view display on EVK. FYI.

  • Hi Paul,

    Your EVK_log.txt shows these resolutions are supported:

    And the pipeline that you are creating doesn't support 1024x576 resolution.

    Can you try and create the pipleline as below and see if it helps:

    gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=1024, height=768, framerate=10/1 ! waylandsink

    Best Regards,

    Suren

  • Hi Suren

    Thank for your support. the issue is clear.

  • Hi Paul,

    Happy to be of help. I am going to close this thread. Feel free to reach out for any further assistance.

    Best Regards,

    Suren