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.

Technical Support for live video streaming through DM365EVM using gstreamer

Other Parts Discussed in Thread: TVP5146

Hello,

 

Our requirement is to demonstrate composite Video input streaming from DM365EVM using gstreamer to a Ubuntu 10.04 host PC. The encoder we desire to use is H.264 HP.

 

To test gstreamer pipelines, we have setup our development envt. as per http://processors.wiki.ti.com/index.php/DMAI_GStreamer_Plug-In_Getting_Started_Guide

 

We have managed to test some gstreamer pipelines using gst-launch but were unable to stream video from a composite Video input source, this is where we need your support.

 

We have managed to run the following successfully using gstreamer.

 

1) Display of composite video input source on TV (TV's composite input) after resizing it.

2) Streaming of a MPEG4 file after H264 compression to a Host PC through LAN.

 

To test composite Video input streaming from DM365EVM using gstreamer we tried the following:

 

# gst-launch v4l2src always-copy=FALSE input-src=composite num-buffers=800 ! TIVidResize contiguousInputFrame=TRUE ! 'video/x-raw-yuv, format=(fourcc)NV12, width=352, height=288, framerate=30000/1001' ! TIVidenc1 codecName=h264enc engineName=encode ! rtph264pay ! udpsink host=192.168.1.24 port=10000 -v

 

The response of "gst-launch" was as follows:

 

                                (gst-launch-0.10:1535): GStreamer-WARNING **: Failed to load plugin '/opt/gstreamer/lib/gstreamer-0.10/libgstmad.so': /opt/gstreamer/lib/libid3tag.so.0: undefined symbol: id3_fr

                                ametype_obsolete

                                davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124

                                Setting pipeline to PAUSED ...

                                davinci_previewer davinci_previewer.2: ipipe_set_preview_config

                                vpfe-capture vpfe-capture: IPIPE Chained

                                vpfe-capture vpfe-capture: Resizer present

                                EVM: switch to tvp5146 SD video input

                                tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)

                                tvp514x 1-005d: invalid control id 9963780

                                tvp514x 1-005d: invalid control id 9963781

                                tvp514x 1-005d: invalid control id 9963782

                                tvp514x 1-005d: invalid control id 9963783

                                tvp514x 1-005d: invalid control id 9963784

                                tvp514x 1-005d: invalid control id 9963785

                                tvp514x 1-005d: invalid control id 9963786

                                tvp514x 1-005d: invalid control id 9963787

                                tvp514x 1-005d: invalid control id 9963788

                                tvp514x 1-005d: invalid control id 9963789

                                tvp514x 1-005d: invalid control id 9963790

                                tvp514x 1-005d: invalid control id 9963791

                                tvp514x 1-005d: invalid control id 9963792

                                tvp514x 1-005d: invalid control id 9963793

                                tvp514x 1-005d: invalid control id 9963795

                                tvp514x 1-005d: invalid control id 9963796

                                tvp514x 1-005d: invalid control id 9963797

                                tvp514x 1-005d: invalid control id 9963798

                                tvp514x 1-005d: invalid control id 9963799

                                tvp514x 1-005d: invalid control id 9963800

                                tvp514x 1-005d: invalid control id 9963801

                                tvp514x 1-005d: invalid control id 9963802

                                tvp514x 1-005d: invalid control id 9963803

                                tvp514x 1-005d: invalid control id 9963804

                                tvp514x 1-005d: invalid control id 9963805

                                tvp514x 1-005d: invalid control id 9963806

                                tvp514x 1-005d: invalid control id 9963807

                                tvp514x 1-005d: invalid control id 9963808

                                tvp514x 1-005d: invalid control id 9963809

                                vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2

                                vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64

                                vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2

                                vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672

                                vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1gst-launch udpsrc port=10000 ! application/x-rtp, clock-rate=90000,payload=96 ! gstrtpjitterbuffer latency=500 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! ximagesink -v

                                vpfe-capture vpfe-capture: adjusted width = 32, height = 2, bpp = 1, bytesperline = 32, sizeimage = 96

                                vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1

                                vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytesperline = 2176, sizeimage = 5013504

                                vpfe-capture vpfe-capture: width = 2176, height = 1536, bpp = 2

                                vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672

                                /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: queue-size = 3

                                /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)2176, height=(int)1536

                                Pipeline is live and does not need PREROLL ...

                                Setting pipeline to PLAYING ...

                                New clock: GstSystemClock

 

The above debug messages appeared 'OK' to us but as you can see the "caps = " messages is missing. Given below is an example of the "caps = " messages I am referring to.

 

                GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)576, framerate=(fraction)25/1

                /GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:src: caps = video/mpeg, mpegversion=(int)4, framerate=(fraction)25/1, width=(int)720, height=(int)576

                /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, framerate=(fraction)25/1, width=(int)720, height=(int)576

                /GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001010000012000845d4c28b42240a21f, payload=(int)96, ssrc=(guint)1721274077, clock-base=(guint)3555402096, seqnum-base=(guint)62368

                /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001010000012000845d4c28b42240a21f, payload=(int)96, ssrc=(guint)1721274077, clock-base=(guint)3555402096, seqnum-base=(guint)62368

 

We understand that to receive the streamed video the "caps =" string shown above needs to be passed to the "gst-launch" command on host PC but we are unable to find any "application/x-rtp" message in our current debug messages. Please let us know how could we sort out this issue.

 

  • Hello,

     

    We found that DM365EVM gets hung after printing “New clock: GstSystemClock”.

     

    I feel the problem is occurring due to unavailability of the memory required for H.264 encoding & streaming. Please send us the u-boot envt. Variable settings at your end with emphasis to “mem=” variable.

    Please also paste the contents of “loadmodules.sh” script available with you in “/opt/gstreamer_demo/dm365” folder of the target.

  • We finally managed to make it work.

    This is for those who may be facing the same problem:

    -----U-boot envt variable-------

    mem=70M

    ------------Working loadmodules.sh---------------

    #!/bin/sh
    rmmod cmemk 2>/dev/null
    rmmod irqk 2>/dev/null
    rmmod edmak 2>/dev/null
    rmmod dm365mmap 2>/dev/null

    # Pools configuration
    insmod cmemk.ko phys_start=0x87800000 phys_end=0x88000000 pools=1x16539648,1x4841472,4x1843200,14x1646592,1x282624,1x176128,1x147456,1x69632,1x61440,1x32768,2x20480,1x16384,1x12288,4x8192,69x4096

    insmod irqk.ko
    insmod edmak.ko
    insmod dm365mmap.ko

    rm -f /dev/dm365mmap
    mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0

    Also use the engine name as "codecServer" & not "encode". TI needs to correct this in their examples here http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines

    It's very misleading for first time users.