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.

Processors forum

Part Number: TDA4VM

H264 hardware decoder is normal supported? gstreamer command should be what? for example, I have a rtsp stream, how should I decode it , or what preconditions
I want to save the video and put the watermark on it.

  • Hi,

    This thread has been assigned. Please expect a delay in response as the assigned engineer is on a business travel till Apr-15.
    Thank you for your patience.

    Regards,
    Parth

  • Hi,
    I would like to know when I can receive your further reply.

    Thank you,
    Makoto

  • Hi Makoto, 

    The engineer who this thread has been assigned to has been out of office for business travel. They will return next week, so please wait until then for further response. 

    Thanks,

    Brandon

  • Hi Makoto, 

    Thanks for your patience, I have been out of office past two weeks. Yes, the TDA4VM VPU supports decoding H264 streams. For clarification, are you asking to decode a stream on board and stream it on to a host machine through RTSP? Or do you have a source with an encoded stream and are asking how to grab it via rtspsrc and decode in a single pipeline?

    Regards,
    Sarabesh S.

  • Hi Sarabesh S,

    Yes, I have an encoded rtsp stream and I need a single pipeline, how do I do it, what commands do I need to do it, and what are the requirements for encoding the rtsp stream?

    Regards,
    Makoto.

  • Hi Makoto, 

    Let me look into, I will respond to you shortly.

    Thanks,
    Sarabesh S.

  • Hi Makoto, 

    Thanks for your patience. I haven't gotten a chance to set up the environment and test, but the GStreamer command should look like below: 

    gst-launch-1.0 rtspsrc location=rtsp://<ip_address> latency=10 ! rtph264depay ! h264parse ! v4l2h264dec ! videoconvert ! video/x-raw,format=NV12 ! fakesink sync=true

    I would also refer you to GStreamer documentation to determine plugin functionality to help construct your pipelines (HERE).

    Regards,
    Sarabesh S.

  • Hi Sarabesh S,
    First I executed this command, I received this error report

    1.
    root@tda4vm-sk:~# gst-launch-1.0 rtspsrc location=rtsp://192.168.15.81:8088/live/stream2 latency=10 ! rtph264depay ! h264parse ! v4l2h264dec ! videoconvert ! video/x-raw,format=NV12 ! fakesink sync=true
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Progress: (open) Opening Stream
    Pipeline is PREROLLED ...
    Prerolled, waiting for progress to finish...
    Progress: (connect) Connecting to rtsp://192.168.15.81:8088/live/stream2
    Progress: (open) Retrieving server options
    Progress: (open) Retrieving media info
    Progress: (request) SETUP stream 0
    Progress: (open) Opened Stream
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Progress: (request) Sending PLAY request
    Redistribute latency...
    Progress: (request) Sending PLAY request
    Redistribute latency...
    Progress: (request) Sent PLAY request
    Redistribute latency...
    Redistribute latency...
    ** (gst-launch-1.0:1685): CRITICAL **: 14:43:53.922: gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed
    Redistribute latency...
    Redistribute latency...
    [ 424.175894] [USERSID=0x00000006] [TID 0x00610001] There are missing references for the current frame. May have corruption
    [ 424.331668] Picture decoded using corrupted reference: 0x00610001 0x00000020
    [ 424.366091] Picture decoded using corrupted reference: 0x00620002 0x00000100
    [ 424.542455] Picture decoded using corrupted reference: 0x00630003 0x00000100
    [ 424.567816] Picture decoded using corrupted reference: 0x00640004 0x00000100
    [ 424.844965] Picture decoded using corrupted reference: 0x00650005 0x00000100
    [ 424.853035] Picture decoded using corrupted reference: 0x00660006 0x00000100
    [ 424.861379] Picture decoded using corrupted reference: 0x00670007 0x00000100
    Redistribute latency...
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:30.917999467
    Setting pipeline to NULL ...
    Freeing pipeline ..

    In the second part, I wanted to save it as a video, but it still reported wrong
    2.
    root@tda4vm-sk:~# gst-launch-1.0 rtspsrc location=rtsp://192.168.15.81:8088/live/stream2 latency=10 ! rtph264depay ! h264parse ! v4l2h264dec ! videoconvert ! video/x-raw,format=NV12 ! v4l2h264enc ! filesink location=output2.h264
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Progress: (open) Opening Stream
    Pipeline is PREROLLED ...
    Prerolled, waiting for progress to finish...
    Progress: (connect) Connecting to rtsp://192.168.15.81:8088/live/stream2
    Progress: (open) Retrieving server options
    Progress: (open) Retrieving media info
    Progress: (request) SETUP stream 0
    Progress: (open) Opened Stream
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Progress: (request) Sending PLAY request
    Redistribute latency...
    Progress: (request) Sending PLAY request
    Redistribute latency...
    Progress: (request) Sent PLAY request
    Redistribute latency...
    Redistribute latency...
    ** (gst-launch-1.0:1738): CRITICAL **: 14:57:25.845: gst_v4l2_buffer_pool_orphan: assertion 'bpool' failed[ 949.355066] [USERSID=0x00000009] [TID 0x00950001] There are missing references for the current frame. May have corruption
    Redistribute latency...
    Redistribute latency...
    ERROR: from element /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0: Failed to allocate required memory.
    Additional debug info:
    ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2videoenc.c(849): gst_v4l2_video_enc_handle_frame (): /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0:
    Buffer pool activation failed
    Execution ended after 0:00:00.120963868
    Setting pipeline to NULL ...
    ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
    Additional debug info:
    ../gst-plugins-good-1.20.7/gst/rtsp/gstrtspsrc.c(6634): gst_rtspsrc_try_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
    Could not send message. (Received end-of-file)
    ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not write to resource.
    Additional debug info:
    ../gst-plugins-good-1.20.7/gst/rtsp/gstrtspsrc.c(9105): gst_rtspsrc_pause (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
    Could not send message. (Received end-of-file)
    Freeing pipeline ...

    Regards,
    Makoto.

  • Hi Makoto, 

    I should have asked this earlier but what SDK are you working on? 

    I will try to replicate the environment and test here.

    Regards,
    Sarabesh S.

  • Hi Sarabesh S,

    The SDK version is 09.01.00.06.

    Regards,
    Makoto.

  • Hi Makoto, 

    Please refer to this FAQ about Encoding not working on Edge-AI SDK 9.1 (HERE). Additionaly, there may be other problems with SDK 9.1 that may cause unexpected errors with memory allocations. Would you be able to migrate to the latest SDK 9.2?

    Thanks,
    Sarabesh S.

  • Hi Sarabesh S,

    Thanks for your response!
    In addition, I also want to ask about the example use of rtsp. Is it also solved in SDK 9.2, or will it be in a later version?
    I asked this question at this address before.
    e2e.ti.com/.../5075973

    Regards,
    Makoto.

  • Hi Makoto,

    Streaming via rtsp should be supported in SDK 9.2. I will ask internally and run some tests to confirm. Will come back to you in a day. 

    Thanks,
    Sarabesh S.

  • Hi Sarabesh S,
    How about the SDK 9.2?
    If the SDK 9.2 supported Streaming via rtsp?

    Regards,
    Makoto.

  • Hi Makoto, 

    Yes, RTSP streaming on the TDA4VM is supported. The RTSP streaming is a GStreamer layer, so as long as the encoded stream is correct then there should be no problems.

    Best,
    Sarabesh S.

  • Hi Sarabesh S,

    Thank you for the good message about SDK 9.2.
    I've seen the way how to change to SDK 9.2.
    It seems that I need to use the new SD card image.
    But I've deployed many programs and changed much on my SD card which is SDK 9.0 in it.
    If there is any way to update to SDK 9.2 and keep my own work?

    Regards,
    Makoto.

  • Hi Makoto,

    I believe you would have to migrate your work from 9.0 to 9.2 by copying the customized programs, configuration files, etc. to the new environment and verify them there. But let me check internally if there are any tools to make the porting effort easier.

    Best,
    Sarabesh S.

  • Hi Makoto, 

    There currently is not a migration guide available for porting. You would have to copy over your programs and verify functionality. You can check the release notes between 9.1 (here) and 9.2 (here) SDKs to see what all is different from your current environment. If you have any questions about the porting specifically, you can post a new E2E and it will get assigned to the responsible TI engineer.

    BR,
    Sarabesh S.