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.

Gstreamer not working in GLSDK 7.03

Other Parts Discussed in Thread: TDA2

Hi,

Can anybody please guide me in making gstreamer work on GLSDK 7.03? I am new to this and I feel some difficulties.

I use this command "gst-launch-1.0 filesrc location=sample.mpg ! mpegtsdemux name=dmux dmux. ! queue ! h264parse ! ducatih264dec ! kmssink connector=12 dmux. ! queue ! faad ! alsasink" where sample.mpg is the input file. But I get this error "WARNING: erroneous pipeline: no element "mpegtsdemux" ".

1. How should I check if any sample video is working fine with my J6 EVM Board (GLSDK 7.03)? Kindly help me out in this issue.

2. Please let me know, what kind of Video formats are supported in GLSDK v7.03. 

3. Supported Playback Application in GLSDK Data Sheet mentions that the Gstreamer version is 1.2. But I see that "gst" files in the installed files (GLSDK 7.03) are with version name (v1.0). Please clarify the version of the GStreamer for GLSDK 7.03. Does it require any downloading of Libraries ??



Thanks in Advance,
Shylesh S.

  • Hi Shylesh,

    Can you try with playbin first?

    gst-launch-1.0 playbin uri=file:///usr/share/sample.mpg video-sink=kmssink

    With explicit pipeline, try with qtdemux instead of mpeggstdemux

  • Hello Ramprasad,


    Thanks a lot for your reply.

    When I tried with the playbin, with the following command, "gst-launch-1.0 playbin uri=file:///usr/share/sample.mpg video-sink=kmssink"

    I get only the Audio working. But my video isn't playing.

    I get this message in my terminal:

    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    [  328.344357] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstAudioSinkClock


    When I tried with the explicit pipeline, using the following command
    "gst-launch-1.0 location=sample.mpg typefind=true ! qtdemux name=demux demux.video_00
    ! queue ! mpegvideoparse ! decodebin ! kmssink
    demux.audio_00 ! queue ! faad ! alsasink"

    I get the following error.

    ERROR: pipeline could not be constructed: Unrecoverable syntax error while parsing pipeline location=/opt/work/sample.mpg

     And also, please let me know whether I have to download any library files and cross compile them, so that my Application code works.

    Thanks in advance,

    Shylesh S

  • Hello,

    You could check this user guide:
    processors.wiki.ti.com/.../DRA7xx_GLSDK_Software_Developers_Guide

    Could you attach the full log by adding --gst-debug=3.

    Could you try in location=sample.mpg property to add the full path to the file?

    Could you try to play the video file without the audio part?

    Let us know the result.

    BR
    Margarita

  • Hello Margarita,

    Thanks for the support.

    I am new to GStreamer. So, Please guide me over this issue. Could you please tell me any video file source which will work with GLSDK 7.03 (GStreamer v1.2). Because, I keep testing with my same sample.mpg file.

    I have added the responses of the questions you asked in your last reply.

    1. When I add “--gst-debug=3”, I get the below ERROR.

    0:00:00.044078274  1760    0xb3380 WARN default ./grammar.y:902:priv_gst_parse_yyerror: Error during parsing: syntax error, 
    unexpected ASSIGNMENT, expecting LINK
    0:00:00.044245170 1760 0xb3380 ERROR GST_PIPELINE ./grammar.y:942:priv_gst_parse_launch: Unrecoverable
    syntax error while parsing pipeline location=sample.mpg typefind=true ! qtdemux name=demux demux.video_00 ! queue ! mpegvid ERROR: pipeline could not be constructed: Unrecoverable syntax error while parsing pipeline location=sample.mpg
    typefind=true ! qtdemux name=demux demux.video_00 ! queue ! mpegvideoparse ! decodebin ! kmssink demux.audio_00 ! queue ! Faad !.
    2. I went throught the USER's GUIDE for DRA7xx. And I ran these commands.
    i. gst-launch-1.0 playbin uri=file:///opt/work/sample.mpg
    video-sink=kmssink audio-sink=alsasink For which, I get these following prints with AUDIO ONLY Playing. Setting pipeline to PAUSED ... Pipeline is PREROLLING ... [ 1884.013897] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstAudioSinkClock ii. gst-launch-1.0 playbin uri=file:///opt/work/sample.mpg video-sink=waylandsink
    audio-sink=alsasink"
    For which, I get the following print with no response. Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. ERROR: from element /GstWaylandSink:waylandsink0: Could not initialise Wayland output Additional debug info:gstwaylandsink.c(973): gst_wayland_sink_start (): /
    GstWaylandSink:waylandsink0: Could not create Wayland display Setting pipeline to NULL ... Freeing pipeline ...

    3. When I try playing the video file without the Audio part with the following command,
    Even then I get the Audio only working.
    “ gst-launch-1.0 playbin uri=file:///opt/work/sample.mpg video-sink=waylandsink”
    4. When I tried to use the Location property with the following command, “gst-launch-1.0 location=/opt/work/sample.mpg video-sink=kmssink audio-sink=alsasink” I get an error with the following print, ERROR: pipeline could not be constructed: Unrecoverable syntax error
    while parsing pipeline location=/opt/work/sample.mpg

    video-sink=kmssink audio-sink=alsasink .


    Kindly help me,
    Thanks and Regards,
    Shylesh S
  • Hello,

    Could you try this pipeline:

    gst-launch-1.0 -v videotestsrc ! 'video/x-raw, format=(string)YUY2, width= (int)1280, height=(int)720' ! vpe ! 'video/x-raw, format=(string)NV12, width=(int)720, height=(int)480' ! kmssink

    Let me know the result.

    BR
    Margarita
  • Hi Margarita,

    Result:

    WARNING: erroneous pipeline: could not parse caps "video/x-raw,\ format=(string)YUY2,\ width=\ (int)1280,\ height=(int)720"

     

    Regards,

    Shylesh S

  • Hello,

    You could remove ! 'video/x-raw, format=(string)YUY2, width= (int)1280, height=(int)720' ! vpe and give a try.
    Please attach the full log from gst-debug = 3 not only the error.

    BR
    Margarita
  • Hi Margarita,

    I tried it.

    The output was,

    Setting pipeline to PAUSED ...

    Pipeline is PREROLLING ...

    0:00:00.054441768  1735    0xbcd20 FIXME                default gstutils.c:3648:gst_pad_create_stream_id_printf_valist:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id

    /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive

    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)720, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive

    0:00:00.056423861  1735    0xbcd20 WARN                 default gstvideopool.c:171:video_buffer_pool_set_config:<videobufferpool0> no caps in config

    Pipeline is PREROLLED ...

    Setting pipeline to PLAYING ...

    New clock: GstSystemClock

    ** (gst-launch-1.0:1735): CRITICAL **: gst_video_calculate_display_ratio: assertion 'num > 0' failed

    0:00:00.067030704  1735    0xbcd20 WARN                 kmssink gstkmssink.c:90:gst_kms_sink_calculate_aspect_ratio:<kmssink0> error: Error calculating the output display ratio of the video.

    ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer error: negotiation problem.

    Additional debug info:

    gstkmssink.c(90): gst_kms_sink_calculate_aspect_ratio (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:

    Error calculating the output display ratio of the video.

    Execution ended after 0:00:00.001001050

    Setting pipeline to PAUSED ...

    0:00:00.153609224  1735    0xbcd20 WARN                 kmssink gstkmssink.c:311:gst_kms_sink_show_frame:<kmssink0> error: drmModeSetPlane failed: No space left on device (28)

    Setting pipeline to READY ...

    0:00:00.154501288  1735    0xbcd20 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.

    0:00:00.154554642  1735    0xbcd20 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason error (-5)

    Setting pipeline to NULL ...

    Freeing pipeline ...

     

     

    Regards,

    Shylesh S.

  • Hello,

    Could you try :

    gst-launch videotestsrc ! 'video/x-raw-yuv,width=1280,height=720' ! kmssink

    The difference with the previous pipeline is in the caps video/x-raw-yuv . Please change the resolution according you display.

    Are you trying to play it on HDMI?

    BR
    Margarita
  • Hi Margarita,

    You've mentioned "yuv" but the old pipeline had "YUY2"? Which one to use?

    And, yes I use HDMI to play this. The same HDMI display works in GLSDK 6.04 booted SD Card. The working of it is already checked. But I find no video being played with this GLSDK 7.03 (GStreamer v1.2).

     Response of this pipeline is,

    (gst-launch-1.0:1748): GStreamer-WARNING **: 0.10-style raw video caps are being created. Should be video/x-raw,format=(string).. now.

    0:00:00.052456421  1748    0xc7160 ERROR           GST_PIPELINE ./grammar.y:624:gst_parse_perform_link: could not link videotestsrc0 to kmssink0

    WARNING: erroneous pipeline: could not link videotestsrc0 to kmssink0

     

    Thanks and Regards,

    Shylesh S

  • Hello,

    You could check these links:
    e2e.ti.com/.../1795564
    e2e.ti.com/.../1535855

    Hope this helps.

    BR
    Margarita
  • Hi Margarita,

    I did go through the threads that you sent.

    Today I did search for video sinks through gst-inspect-1.0 | grep "video sink". I happened to see one (fbdevsink).

    Then, I tried this pipeline. And saw that Audio worked perfectly. Video also played. But, with lots of glitches and very slow.

    gst-launch-1.0 playbin uri=file:///opt/work/sample.mpg 
    video-si
    nk= fbdevsink audio-sink=alsasink


    I do not know the reason why this Glitches occur. Kindly help me.
    I then tried to use this sink with the following pipeline.
    gst-launch-1.0 filesrc location=sample.mpg ! mpegpsdemux 
    name=dmux dmux. ! queue ! mpeg4videoparse !
    ducatimpeg4dec ! fbdevsink dmux. ! queue ! faad ! alsasink

    But, I get errors saying that the decoder, parser, and sink in various
    combinations don't link eachother.

    Please guide me through this.

    Thanks a lot,
    Shylesh S.


  • Hi Margarita,

    I did go through the threads that you sent.

    Today I did search for video sinks through gst-inspect-1.0 | grep "video sink". I happened to see one (fbdevsink).

    Then, I tried this pipeline. And saw that Audio worked perfectly. Video also played. But, with lots of glitches and very slow.

    gst-launch-1.0 playbin uri=file:///opt/work/sample.mpg video-sink= fbdevsink audio-sink=alsasink

    I do not know the reason why this Glitches occur. Kindly help me. I then tried to use this sink with the following pipeline.

    gst-launch-1.0 filesrc location=sample.mpg ! mpegpsdemux name=dmux dmux. ! queue ! mpeg4videoparse !  ducatimpeg4dec ! fbdevsink dmux. ! queue ! faad ! alsasink

    But, I get errors saying that the decoder, parser, and sink in various combinations don't link each other.

    Please guide me through this.

    Thanks a lot,

    Shylesh S.

  • I get continuous prints like this when I use that pipeline. Kindly help!

    WARNING: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstFBDEVSink:fbdevsink0: A lot of buffers are being drop.

    Additional debug info:

    gstbasesink.c(2791): gst_base_sink_is_too_late (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstFBDEVSink:fbdevsink0:

    There may be a timestamping problem, or this computer is too slow.

     

    Thanks & Regards,

    Shylesh  S

  • Hello,

    fbdevsink is using framebuffer (linux framebuffer).
    Could you grep for 'sink' or try to connect autovideosink in the pipeline?
    Autovideosink is a video sink that automatically detects an appropriate video sink to use.

    BR
    Margarita
  • Hello Margarita,
    These are the video sinks that are available.
    fbdevsink, waylandsink, autovideosink, kmssink, intervideosink, v4l2sink, autovideosink.

    I actually tried all of them. Even, autovideosink doesn't work out. I just see my pipeline getting struck with the PREROLLING State. It's not getting Prerolled.

    Kindly help me out.
    Regards,
    Shylesh.
  • Hello,

    Could you try to run Viddec3test demo. The demo currently runs on the kms display.
    Here you could check for more information:
    processors.wiki.ti.com/.../DRA7xx_GLSDK_Software_Developers_Guide

    If this demo is working could you try with kmssink but add property kmssink connector=xx.


    BR
    Margarita
  • Hi Margarita,
    I had already checked the viddec3test demo. It didn't workout.
    "viddec3test -s 4:1360*768 sample.mpg --fps 30"
    These were the log when I run the about line:

    root@dra7xx-evm:/opt/work# viddec3test -s 4:1360*768 sample.mpg --fps 30
    0x1c070: Opening Display..
    Forcing playback rate at 30 fps.
    using 1 connectors, 1280x800 display, multiplanar: 1
    0x1c070: Opening Demuxer..
    [mpegts @ 0x1d6e0] max_analyze_duration reached
    [mpegts @ 0x1d6e0] PES packet size mismatch
    Input #0, mpegts, from 'sample.mpg':
    Duration: 00:00:48.95, start: 5024.899489, bitrate: 1048 kb/s
    Program 1
    Stream #0.0[0x44]: Audio: aac, 44100 Hz, stereo, s16, 136 kb/s
    Stream #0.1[0x45]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
    0x1c070: infile=sample.mpg, width=1920, height=1080
    0x1c070: padded_width=2048, padded_height=1184, num_buffers=7
    [ 76.212476] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Setting mode 1360*768 on connector 4, crtc 10
    0x1c070: Opening Engine..
    displayBufsMode: 1
    ^C[ 91.858507] virtio_rpmsg_bus virtio1: msg received with no recipient

    But, the same pipeline works out when I run it in GLSDK 6.04.
    Note: When the board boots up, I see 2 colored Penguins on top for GLSDK 6.04. But the same is not visible for the GLSDK 7.03. Does this make any sense? Or gives any inference?

    Please let me know.
    Thanks!
    Shylesh S.
  • Hello,

    What about
    viddec3test -s 12:1360*768 sample.mpg --fps 30
    is it working?

    Are you using the default GLSDK or you made some changes?
    Are you using EVM or it is custom board?

    Did you try these pipelines:
    gst-launch -v filesrc location=input.mpg ! mpegtsdemux ! queue ! h264parse ! ducatih264dec ! kmssink connector=12

    filesrc location=input.mpg ! mpegtsdemux name=dmux dmux. ! queue ! h264parse ! ducatih264dec ! kmssink connector=12
    dmux. ! queue ! faad ! alsasink

    BR
    Margarita

  • Hello Margarita,

    None of these pipelines are working. When I use 4 instead of 12 in "viddec3test -s 12:1360*768 sample.mpg --fps 30", I get no errors. But my video is not getting played.
    Yes, I do use the default GLSDK only, and I didn't make any changes. I use EVM board only.

    mpegtsdemux plugin is not available in GLSDK 7.03. Only mpegpsdemux, tsdemux are available. But, the video is not working in any of the pipelines.

    BR
    Shylesh S

  • Hello,

    Could you try with elementary stream, h264 for example(not in container like ts)?
    In this case you will not need a demuxer.

    BR
    Margarita
  • You want me to change my source file to a .h264 format?
    Can I convert my video (.mpg) to .h264 online and use it?

    BR
    Shylesh S
  • Hello,

    You could try h264 elementary streamer or mpeg too.

    You could use ffmpeg on PC like :

    ffmpeg -i input.h264 -vcodec copy out.mp4

    This example h264->mp4

    BR
    Margarita
  • Hello,

    I have tried with h264 file also, by using " ffmpeg -i input.h264 -vcodec copy out.mp4"

    The output file is recognized as h264 video file. But it doesn't play. But, it just remains Idle, with these log.

    root@dra7xx-evm:/opt/work# viddec3test -s 4:1360*768 out.mp4 --fps 30

    0x1c070: Opening Display..

    Forcing playback rate at 30 fps.

    using 1 connectors, 1280x800 display, multiplanar: 1

    0x1c070: Opening Demuxer..

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':

     Metadata:

       major_brand     : isom

       minor_version   : 512

       compatible_brands: isomiso2avc1mp41

       encoder         : Lavf53.21.1

     Duration: 00:00:48.95, start: 0.000000, bitrate: 1010 kb/s

       Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 804 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc

       Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 199 kb/s

    initializing bitstream filter

    0x1c070: infile=out.mp4, width=1920, height=1080

    0x1c070: padded_width=2048, padded_height=1184, num_buffers=7

    Setting mode 1360*768 on connector 4, crtc 10

    0x1c070: Opening Engine..

    displayBufsMode: 1

    ^C[ 1082.408592] virtio_rpmsg_bus virtio1: msg received with no recipient

     

    In this pipeline, the Display itself get theaudio output. But the video doesn't play. The Audio plays through the display speakers.

    gst-launch-1.0 playbin uri=file:///opt/work/out.mp4 video-sink=kmssink audio-sink="alsasink device=hw:1,0"

     

     


    kindly help me,

    Shylesh S.

  • I experienced that same problems with GLSDK 7 on a TDA2 board. The solution was to specify the connector ID of the active video port as an attribute to the kmssink filter, as follows:

    > gst-launch-1.0 -v filesrc location=$HOME/tftp/atest2.mp4 ! qtdemux !  h264parse ! ducatih264dec ! vpe ! kmssink connector=16

    I could not find any mention of needing to specify the connector in the examples provided in the TI documentation. It would be very helpful if the docs were update to include it.

    HTH,

    Eric G

  • Hi Eric,
    Thank you very much for your help.
    My video is perfectly working now. I had misinterpreted about the connector ID. I had previously checked the Connector ID, but I didn't use 16.
    Anyways, It's fine now!! Thanks a lot.

    And, Margarita...
    You've been helping me since last month. Thanks a lot. Thanks a lot.

    Best Regards,
    Shylesh S