AM625: Need to record video from 2 RTSP sources.

Part Number: AM625
Other Parts Discussed in Thread: SK-AM62-LP, , AM62P

Hi TI Community,

Greetings of the day, we are evaluating AM625 processor using SK-AM62-LP EVM. We are trying to record 2 videos that are being streamed from 2 RTSP servers. We installed linux and were able to record by running a gstreamer command. We are wondering if we can achieve this using FreeRTOS in Code Composer Studios. 

Our final objective involves utilizing other peripherals like SD Card, SPI, I2C and UART. It is a complex project that involves many state machines. We are looking for a development environment where we can debug our code for e.g. in Visual studio code. 

My request is to guide us for setting up the development environment either using linux or RTOS(Android is not an option). 

  • Hi Sunil,

    Currently the  Video Encode/Decode on AM62x is done on the ARM cores (A53 cores) using the Gstreamer  software plugins in our Linux SDK offering. 

    There is no support for Video encode/decode on the RTOS ( which primarily runs on cortex M4 core on AM62x).

    can you elaborate more on your usecase/application that you are evaluating AM62x for?

    Best Regards,

    Suren 

  • Hi Suren Porwar,

    Thank you for your quick response.

    We are currently developing a data recorder device designed to capture three distinct video streams. Two of these streams originate from RTSP server sources, while the third is sourced from a MIPI CSI-2 port. In addition to video, the device records audio from an input port and collects data from multiple sensors, which are interfaced using SPI or I2C protocols. All recorded data is stored on an SD card.

  • Hi Sunil,

    Could you share the pipeline for your use-case of three distinct video stream capture? What's the end result in rendering them on the display or re-encode and transmit? 

    Best Regards,

    Suren

  • Hi Suren,

    The requirement is to record the captured video stream into a .MP4 file. Preferably in non-H.264 MP4 format (MPEG-4 Part 4). 
    However, we are also evaluating AM62 processor for capturing video over MIPI interface and running a RTSP server to stream the captured video. 

  • Hi Sunil,

    What Camera are you planning to use? 

    There is no dedicated hardware for video encode/decode available on AM625. In summary, you would need to use the ARM cores for encode/decode.

    AM625 is capable of performing SW based encode/decode and your performance will be limited by the A53 cores. The AM625 SDK supports Gstreamer and it has ARM plugins for encode/decode. However, the plugins are designed by the open source community and I am not sure if they are optimized for performance. My recommendation would be to evaluate the open source plugins for encode/decode to understand their limitations.

    Here is a sample video encode and decode using libav gstreamer plugins:

    root@am62xx-evm:~# gst-launch-1.0 -v videotestsrc pattern=ball num-buffers=100 ! avenc_mpeg4 ! queue ! avdec_mpeg4 ! videoconvert ! kmssink driver-name=tidss

    With OV5640 camera connnected on my AM62x board

    # media-ctl --set-v4l2 "'ov5640 4-003c':0 [fmt:UYVY8_1X16/1920x1080@1/30 field:none]"

    Camera + Display: 
    # gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw, format=1920, height=1080, format=UYVY, framerate=30/1 ! kmssink driver-name=tidss sync=false plane-id=31

    Camera + Encode + streaming:

    # gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw, format=1920, height=1080, format=UYVY, framerate=30/1 ! videoconvert ! avenc_mpeg4 ! rtpmp4pay ! udpsink port=5000 host=<IP address>

    Let me know if these help. Also, if you want HW accelerators then recommend you to look at AM62P/AM62Ax as options to AM62x.

    Best Regards,

    Suren

  • Hi Suren,

    You are right, we have not finalized to use AM625, we are evaluating. As we are not intending to use cameras that use H.264/H.265 encryption, the software based decryption might work for us. We have AM62A series also in our options. 

    I appreciate you effort to provide us the gstreamer commands and insight on processor cores to use for video encryption/decryption. However, my intention to post question in TI community is to setup a development environment in our PC. I kindly request you to guide us to setup IDE where we can develop and debug our project. 

  • It was nice talking to you Sunil. Let me know how it goes after installing the SDK. 

    Best Regards,

    Suren