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/TMDXEVM8148: Gstreamer videotestsrc and pipelines not working

Part Number: TMDXEVM8148
Other Parts Discussed in Thread: TVP7002, TVP5147

Tool/software: Linux

Hello,

Im trying to run the Gstreamers examples on the TMDXEVM8148 board and unable to get the expected outputs.

1) I tried to run the videotestsrc which comes with Gstreamer, but was unsuccessfull. As given in the Software Developers Guideline doc, under section  "Running GStreamer pipelines",

I stopped the matrix application, then i disabled the Graphics plane 0 by echo 0 > /sys/devices/platform/vpss/graphics0/enabled, and the planes 1 and 2 were already disabled(echo'd and verified).

then i run the command gst-launch-0.10 videotestsrc ! autovideoconvert ! autovideosink ,but the test pattern video is not displayed on LCD. The process is suspended after "Setting pipeline to PAUSED..." .

As another try, then i enabled the graphics plane by echo'ing 1 (matrix application is in stopped state)and tried the same command for which the error ERROR:Pipeline doesn't want to pause. Attached the image for reference.

Can someone help in guiding me in resolving this? Am i missing any steps ?

2)To construct my own pipelines, the software dev guide directs to http://processors.wiki.ti.com/index.php/DM81xx_Gstreamer_Pipelines.

In this webpage, there are few env variable to be exported in the target. But those files are not present in my target build nor in my SDK. How do i get these files which are being exported?

3) There are few more examples given in http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines 

These examples mentioned in the above link uses TI GStreamer DMAI Plug-In like TIDmaiVideoSink,TIViddec2 etc which are not available in the EZSDK of DM8148. Is my assumption correct ?

This can be downloaded from gstreamer.ti.com. This website request for user registration,but i didnt any confirmation email fot my account activitation. Can someone share me this plugin or alternate download source ? Also please help me on out on how to intergrate this plugin into the EZSDK DM8148 .

  • Hello,

    Gstreamer examples for EZSDK running on DM814x could be found here:
    processors.wiki.ti.com/.../DM81xx_Gstreamer_Pipelines

    The pipeline that you are running seems not correct. You should set caps filter between videotestsrc element and autovideoconvert element.
    Here is example with videotestsrc:
    gst-launch -e videotestsrc ! video/x-raw-yuv, format=\(fourcc\)NV12, width=1920, height=1080, framerate=\(fraction\)15/1 ! omx_h264enc force-idr-period=4 i-period=4 bitrate=10000000 profile=1 ! gstperf ! queue ! h264parse output-format=0 ! mp4mux ! filesink location= test.mp4

    You could try decode->display on HDMI:
    gst-launch filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink sync=false

    or decode->display on LCD:

    gst-launch --verbose filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264' ! h264parse access-unit=true ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)800,height=(int)480' ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 display-device=LCD ! gstperf ! omx_videosink sync=false display-device=LCD

    BR
    Margarita
  • Hi Margarita,

    Thanks for your immediate response. These commands work on the EVM.
    I would like to stream the /usr/share/ti/data/videos/dm816x_1080p_demo.264 file from the EVM to the Ubuntu machine. I tried the below command but was not successful.

    gst-launch --verbose filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! gstperf ! omx_scaler ! 'video/x-raw-yuv
    ,width=(int)800,height=(int)480' ! rtph264pay ! udpsink host=192.168.1.243 port=5000

    I had gone through the processors.wiki.ti.com/.../DM81xx_Gstreamer_Pipelines page but this page has only pipeline examples for client end and not the server end.
    Can you help me on what am i doing wrong? Kindly let me know the client pipeline too.

    Also from the Mutimedia capture and encode example present in the matrix application, the captured file is stored in /usr/share/ti/ti-omx as sample.h264. To make this run, is it ok if i just connect a component video input? or is there any other settings i have to take care of. Kindly let me know.
  • Hello,

    Here is example with udpsink. You also could use tcpserversink.

    >gst-launch -v filesrc location=xxx.264 ! 'video/x-h264,width=800,height=480,framerate=30/1' ! queue ! h264parse ! gstperf ! rtph264pay ! udpsink 192.168.0.1 port=5000

    Arunkumar Ravindranath said:
    Also from the Mutimedia capture and encode example present in the matrix application, the captured file is stored in /usr/share/ti/ti-omx as sample.h264. To make this run, is it ok if i just connect a component video input? or is there any other settings i have to take care of. Kindly let me know.

    You need a YpbPr source with component cable.
    Keep in mind that this demo is using OMX.
    I would recommend you to check the OMX user guide for more information.
    But if you plan to use gstreamer and v4l2src capture component additional steps are required.

    and http://processors.wiki.ti.com/index.php/DM814x_EZ_5.04.00_Software_Developers_Guide#How_to_change_from_OMX_to_V4L2_firmware_for_capture.2Fdisplay

    BR
    Margarita

  • Hi Margarita,

    Thanks , will try these options. Also im looking for to use the examples given in processors.wiki.ti.com/.../Example_GStreamer_Pipelines ? Will these work in the DM8148 EVM board as i dont see DM8148 in the webpage ?

    Also i want to download TI GStreamer DMAI Plug-In. This can be downloaded from gstreamer.ti.com. This website request for user registration,but i didnt any confirmation email fot my account activitation. Can someone share me this files or alternate download source ? Also please help me on out on how to intergrate this plugin into the EZSDK DM8148 .
  • Hello,

    These examples will not work.
    The examples there are for these platforms:
    DM355
    DM357
    DM644x
    DM365
    DM6467
    DM6467T
    OMAP35x

    In EZSDK we have gstreamer already.
    We also have OMX based element liks omx_h264dec, omx_noisefilter, omx_videosink, omx_videomixer.
    processors.wiki.ti.com/.../DM81xx_Gstreamer_Pipelines
    In the link you could find some pipelines.
    But you could link your own pipeline depending of the use case.

    BR
    Margarita

  • Hi Margarita,

    Thanks and I'm new to these Davinci and Multimedia Platform.
    I'm using this TMDXEVM8148 EVM board and My Objective is the get the video input from Component or VGA or DVI -> Encode it to H264 -> Scale it down to 640x480p and have to stream this via RTSP to a client(probably a PC with VLC or Gstreamer). I was planning to use the gstreamer and v4l2src as per processors.wiki.ti.com/.../Example_GStreamer_Pipelines

    gst-launch -v v4l2src always-copy=FALSE ! TIVidenc1 codecName=h264enc engineName=encode contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink host=<HOST_PC_IP> port=5000

    But looks like this needs GstTI Plugin and as you said it is not supported on DM8148 platform.Im a bit struck here.
    Can you please share me some design pointers on how to take up the design further? If this is possible with gstreamer, kindly share some sample commands for taking video input from component/VGA/DVI
  • Hello,

    As I said in EZSDK we have gstreamer.

    Regarding encoder you could use omx_h264enc which is hardware codec also but it is running on DM81x platforms.
    The pipeline will looks almost the same as the pipe that you posted but I would recommend you for add queue element and h264parse.
    gst-inspect omx_h264enc command you could check the properties of the encoder element.

    In EZSDK, the capture by tvp7002 is supported.
    In case different from component input you should check and follow this user guide:
    processors.wiki.ti.com/.../DM81xx_AM38xx_Adding_External_Decoders_to_V4L2_Capture_Driver
    e2e.ti.com/.../152272
    You could search in the e2e there are topics how could capture by using tvp5147 or else for example.

    Regarding v4l2src here is few steps that you must execute when you capture for component:
    1. Check and Add v4l2src capture driver to the kernel and rebuild the kernel. Copy the new kernel image and the modules;
    2. Load v4l2 firmware or you will observe error that /dev/video0 can not be open.
    (refer to video capture guide and ezsdk software guide under ezsdk/docs folder)


    BR
    Margarita

  • Hi Margarita,

    Below is one example which i tried to stream the demo video to a ubuntu PC.

    EVM Side(Server) :

    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! 'video/x-h264,width=800,height=480,framerate=30/1' ! queue ! h264parse ! gstperf ! rtph264pay ! gdppay ! tcpserversink host=192.168.1.186 port=5000

    Ubuntu PC(Client):

    gst-launch-0.10 -v tcpclientsrc host=192.168.1.186 port=5000 ! gdpdepay ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink sync=false

    The streaming starts from the server end and when i run the command in the client end , the video window open up and only the first frame is displayed. The video doesnt play. Can you please help on what is wrong?

  • Hello,

    The first pipeline seems incorrect. The caps filter is wrong.
    Here is example:

    EVM -> PC
    gst-launch filesrc location=/home/root/sample5.ts typefind=true ! mpegtsdemux ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mpegvideoparse ! gstperf ! tcpserversink -v

    gst-launch-0.10 tcpclientsrc host=10.0.0.2 typefind=true ! mpegvideoparse ! queue ! ffdec_mpeg2video ! videoscale ! autovideosink

    gst-launch -v filesrc location=/usr/share/ti/data/videos/sample5.ts typefind=true ! mpegtsdemux name=demux demux.audio_00 ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mad ! alsasink demux.video_00 ! mpegvideoparse ! omx_mpeg2dec ! omx_scaler ! tcpserversink



    PC->EVM(this includes audio)
    gst-launch-0.10 -v filesrc location=/home/users/mgashova/Desktop/streams/sample5.ts ! mpegtsdemux ! queue ! mpegvideoparse ! tcpserversink host=192.168.1.2

    gst-launch tcpclientsrc host=192.168.1.1 port=4953 typefind=true ! mpegtsdemux name=demux demux.audio_00 ! queue ! faad ! alsasink device="plughw:0,1" demux.video_00 ! mpegvideoparse ! queue ! omx_mpeg2dec ! omx_scaler ! queue ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink


    You could try:

    EVM Side(Server) :

    gst-launch -v filesrc location=/usr/share/ti/data/videos/dm816x_1080p_demo.264 ! queue ! h264parse ! gstperf ! queue ! tcpserversink host=192.168.1.186 port=5000

    Ubuntu PC(Client):

    gst-launch-0.10 -v tcpclientsrc host=192.168.1.186 port=5000 typefind=true ! h264parse ! ffdec_h264 ! videoscale ! autovideosink

    BR
    Margarita
  • Hi Margarita,

    I tried the below examples as you suggested, but at the client end the process waits at , as shown below and no video window is opened.

    gst-launch-0.10 -v tcpclientsrc host=192.168.1.186 port=5000 typefind=true ! h264parse ! ffdec_h264 ! videoscale ! autovideosink
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au
    /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au

    The server end seems to be streaming. As soon as server reached EOF, the client exits as shown below. But no video window is played

    gst-launch-0.10 -v tcpclientsrc host=192.168.1.186 port=5000 typefind=true ! h264parse ! ffdec_h264 ! videoscale ! autovideosink
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au
    /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 100033 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = NULL
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = NULL
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Kindly suggest

  • Hello,

    Could you ping the from PC the board and board to PC?
    Yes, it seems working on board.
    Could you try with different video file?
    You could try with VLC on you side also.

    On my side something like this was working:

    pc->stream->evm decode

    gst-launch-0.10 -v filesrc location=/home/users/mgashova/Desktop/streams/sample5.ts ! mpegtsdemux ! queue ! mpegvideoparse ! tcpsink host=192.168.1.2

    gst-launch tcpclientsrc host=192.168.1.1 port=4953 typefind=true ! mpegtsdemux name=demux demux.audio_00 ! queue ! faad ! alsasink device="plughw:0,1" demux.video_00 ! mpegvideoparse ! queue ! omx_mpeg2dec ! omx_scaler ! queue ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    EVM -> stream -> PC

    gst-launch filesrc location=/home/root/sample5.ts typefind=true ! mpegtsdemux ! queue max-size-buffers=1200 max-size-time=0 max-size-bytes=0 ! mpegvideoparse ! gstperf ! tcpserversink -v

    gst-launch-0.10 tcpclientsrc host=10.0.0.2 typefind=true ! mpegvideoparse ! queue ! ffdec_mpeg2video ! videoscale ! autovideosink

    Here is example command for VLC:
    vlc --demux rawvideo --rawvid-fps 30000/1001 --rawvid-width 720 --rawvid-height 480 --rawvid-chroma=YUY2 tcp://129.168.1.2:4953
    but the params should be change.

    Hope this helps.
    Let me know the results.

    BR
    Margarita
  • Hello,

    I am assuming you were able to resolve your issue so I am closing this thread.
    If not, just post a reply below.

    BR
    Margarita