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.

Linux/AM5728: MPEG4 issue with UDP

Part Number: AM5728

Tool/software: Linux

Hi,

I tried to reference : http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Multimedia.html to transmit H264 video with UDP correctly .

But if I use mpeg4 decoder like  :

Tran :gst-launch-1.0 -e v4l2src device=/dev/video6 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1920,height=1080' ! vpe num-input-buffers=8 ! queue ! ducatimpeg4enc bitrate=4000 ! mpeg4videoparse ! rtpmp4gpay ! udpsink host=127.0.0.1 port=1234

Recv :gst-launch-1.0 -v udpsrc port=1234 ! 'application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96' ! rtpmp4gdepay ! mpeg4videoparse ! ducatimpeg4dec ! vpe ! 'video/x-raw,format=(string)NV12, width=1920,height=1080' ! waylandsink sync=false

I got the error :

ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format
Additional debug info:
../../../gstreamer-1.8.3/plugins/elements/gstcapsfilter.c(454): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
Output caps are unfixed: application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)MPEG4-GENERIC, mode=(string){ generic, CELP-cbr, CELP-vbr, AAC-lbr, AAC-hbr }

I think that error is due to recv client.

I tried to play mp4 udp stream with VLC. Fail too.

  • Hello,

    What is the PSDK version that you are using here?

    Please try to extent the caps filter with encoding-name, mode .

    This is network loopback that is working on my side but with h264 enc&dec:
    Sender:
    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1280,height=720,framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! queue ! ducatih264enc intra-interval=1 ! h264parse ! rtph264pay mtu=200 ! udpsink host=127.0.0.1 port=5000 &
    Receiver:
    gst-launch-1.0 -v udpsrc port=5000 ! 'application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96' ! rtph264depay ! h264parse ! ducatih264decvpe ! 'video/x-raw,format=(string)NV12, width=320,height=240' ! waylandsink sync=false

    You could try with rtpmp4vpay and rtpmp4vdepay .



    BR
    Margarita

  • Hi,
    Thanks for your reply.
    My sdk is 4.2.
    I tried to use :
    gst-launch-1.0 -e v4l2src device=/dev/video6 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1920,height=1080' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 level=51 profile=100 bitrate=16000 ! h264parse ! mpegtsmux ! udpsink host=192.168.20.242 port=1234 t. ! queue ! waylandsink sync=false
    I got the h264 stream successful.
    But I can't use kmssink to display and get some error:
    gst-launch-1.0 -e v4l2src device=/dev/video6 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1920,height=1080' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 level=51 profile=100 bitrate=16000 ! h264parse ! mpegtsmux ! udpsink host=192.168.20.242 port=1234 t. ! queue ! kmssink

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock

    ** (gst-launch-1.0:1181): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1181): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1181): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1181): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    EOS on shutdown enabled -- waiting for EOS after Error
    Waiting for EOS...
    Got EOS from element "pipeline0".
    EOS received - stopping pipeline...
    Execution ended after 0:00:00.589189726
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
  • Hello,

    I tried on my side with PSDK4.3 on EVM+camera module.
    Here are the results.
    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1280,height=720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 ! h264parse ! mpegtsmux ! fakesink t. ! queue ! kmssink
    Setting pipeline to PAUSED ...
    [ 446.951364] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    EOS on shutdown enabled -- Forcing EOS on the pipeline
    Waiting for EOS...
    Got EOS from element "pipeline0".
    EOS received - stopping pipeline...
    Execution ended after 0:00:09.469907072
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...


    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1280,height=720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 ! h264parse ! mpegtsmux ! udpsink host=127.0.0.1 port=5000 t. ! queue ! kmssink
    Setting pipeline to PAUSED ...
    [ 485.066726] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    EOS on shutdown enabled -- Forcing EOS on the pipeline
    Waiting for EOS...
    Got EOS from element "pipeline0".
    EOS received - stopping pipeline...
    Execution ended after 0:00:04.070345525
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1280,height=720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 ! h264parse ! mpegtsmux ! udpsink host=127.0.0.1 port=5000 t. ! queue ! kmssink scale=true
    Setting pipeline to PAUSED ...
    [ 522.804122] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    EOS on shutdown enabled -- Forcing EOS on the pipeline
    Waiting for EOS...
    Got EOS from element "pipeline0".
    EOS received - stopping pipeline...
    Execution ended after 0:00:13.433034768
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=1280,height=720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatih264enc intra-interval=1 ! h264parse ! mpegtsmux ! udpsink host=127.0.0.1 port=5000 t. ! queue ! kmssink scale=true sync=false
    Setting pipeline to PAUSED ...
    [ 583.756069] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    EOS on shutdown enabled -- Forcing EOS on the pipeline
    Waiting for EOS...
    Got EOS from element "pipeline0".
    EOS received - stopping pipeline...
    Execution ended after 0:00:03.259170130
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Hope this helps.

    BR
    Margarita
  • Hi,
    Thanks.
    I update to sdk4.3 and work well .
  • Hello,

    Thank you for verifying the thread!
    If you have new issues/questions you could open new topic.

    Best Regards,
    Margarita