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.

Error in video streaming



Hi,

I am playing a .mp4 file on TI DM8148 board , and required to play only video from it. Pipeline used is shown below with error logs.

gst-launch filesrc location=/home/sample1/Holy.mp4 ! decodebin2 name=dec ! queue !
ffmpegcolorspace ! autovideoconvert ! autovideosink

But issue is video not playing, below is the logs..

Setting pipeline to PAUSED ...

** (gst-launch-0.10:2343): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &c
ontrol) >= 0' failed

** (gst-launch-0.10:2343): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &c
ontrol) >= 0' failed

** (gst-launch-0.10:2343): CRITICAL **: gst_v4l2sink_sync_flip: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &contr
ol) >= 0' failed
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSyVPSS_VIDEO: Buffer format (-22) not supported!!
stemClock
t81xx_vidout t81xx_vidout: VIDOUT0: setup failed enable=0 width=1248
 height=696 color_mode=-22
pix_width = 1280 pix_height=720 pos=0x0 out_width=1280 out_height=720 screen_width=2560
t81xx_vidout t81xx_vidout: VIDOUT0: apply_changes failed
ERROR: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstV4l2Sink:
autovideosink0-actual-sin k-v4l2: Error starting streaming on device '/dev/video1'. Additional debug info: gstv4l2object.c(2228): gst_v4l2_object_start_streaming (): /GstPipeline:pipeline0/GstAutoVideoSink:
autovideosink 0/GstV4l2Sink:autovideosink0-actual-sink-v4l2: system error: Invalid argument Execution ended after 34283000 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... !!!!!!!!!unrefert81xx_vidout t81xx_vidout: VIDOUT0: invalid dequeue ence all the remaining buffers!!!!!!!!!Setting pipeline to NULL ... Freeing pipeline ...

Please correct me if my pipeline has any flaws.

Also kindly tell me the reason behind "unrefert81xx_vidout t81xx_vidout: VIDOUT0: invalid dequeue" error ?

I need to play only video from .mp4 file.

Is it possible to have graphical view of pipeline as done with xDot and GraphViz ?

Thanks,
Arunaa



  • Hello,

    I would recommend you to not use ffmpegcolorspace element.

    Could you try:

    gst-launch filesrc location=XX.mp4 ! qtdemux  ! h264parse ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! omx_videosink

    or

    gst-launch filesrc location=XX.mp4 ! qtdemux !  h264parse ! omx_h264dec ! omx_scaler ! 'video/x-raw-yuv,width=(int)1920,height=(int)1080'  ! v4l2sink

    For the second pipeline you should load vpss_v4l2 firmware.

    Could you provide more information about the video file also.

    Best Regards,

    Margarita

  • Hi Margarita,

    Thank you for your reply. Please find the results on trial with the given pipeline.

    gst-launch-0.10 filesrc location=/home/sample1/Holy.mp4 ! qtdemux  ! h264parse ! omx_h264dec ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! omx_videosink

    >> error :: gst-launch-0.10: OmxRpc.c:624: OmxRpc_Instance_init: Assertion `(OmxRpc_errorNone == retVal)' failed.
    Aborted

    Can you please direct me how to load vpss_v4l2 firmware.

    Info on video file :

    Dimensions : 1280 x 720 ; Codec : H.264 / AVC ; Framerate : 24 frames per second;  Bitrate: 1237 kbps.

    I cannot use OMX components in this pipeline, because one more pipeline will use it. So here in this pipeline video has to be played without OMX components.

    I have tried playing .mp4 to get only video without OMX, which is shown below. But video is not playing, kindly show me how to correct pipeline to get video.

    root@dm814x-evm:/dev# gst-launch-0.10 --gst-debug-level=2  filesrc location=/home/sample1/Holy.mp4 ! qtdemux name=demux. ! queue ! h264parse ! ffdec_h264 ! v4l2sink device=/dev/video1 demux.


    0:00:00.343432659  2951    0x16050 WARN   default ./grammar.y:889:_gst_parse_yyerror: Error during
     parsing: sVPSS_FVID2: create handle is NULL
     Error during parsing:Syntax error, unexpected $end, expecting LINK
    Setting pipeline to PAUSED ...
    0:00:00.361184437  2951    0x16050 WARN  v4l2 v4l2_calls.c:507:gst_v4l2_open:<v4l2sink0> error
    : Could not open device '/dev/video1' for reading and writing.
    0:00:00.361297837  2951    0x16050 WARN  v4l2 v4l2_calls.c:507:gst_v4l2_open:<v4l2sink0> error
    : system error: No such device
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Could not open device '/dev/video1' for reading and writing.
    Additional debug info:
    v4l2_calls.c(507): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
    system error: No such device
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Also can you please tell where device=/dev/video1 in v4l2sink will point to.

    Is it possible to view graph of the pipeline created through .dot files in TI board.

    Thanks,

    Arunaa

  • Hello,

    Arunaa CN said:
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Could not open device '/dev/video1' for reading and writing.

    You should load the v4l2 firmware. Here are the steps:

    /etc/init.d/matrix-gui-e stop

    /etc/init.d/pvr-init stop

    cd /usr/share/ti/ti-media-controller-utils/

    ./load-hd-firmware.sh stop

    ./load-hd-v4l2-firmware.sh start

    BR

    Margarita

  • Hi Margarita,

    Thank you for your reply,

    Now error with v4l2sink is removed by loading the firmware but, could not able to play the pipeline.

    Below is the pipeline used.

    gst-launch filesrc location=/home/sample1/Holy.mp4 ! qtdemux name=demux ! queue ! h264parse ! ffdec_h264 ! v4l2sink
    Setting pipeline to PAUSED ...
    ** (gst-launch-0.10:3658): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &c
    ontrol) >= 0' failed
    ** (gst-launch-0.10:3658): CRITICAL **: gst_v4l2sink_sync_rotation: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &c
    ontrol) >= 0' failed
    ** (gst-launch-0.10:3658): CRITICAL **: gst_v4l2sink_sync_flip: assertion `v4l2_ioctl (fd, VIDIOC_S_CTRL, &contr
    ol) >= 0' failed
    Pipeline is PREROLLING ...
    ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
    Additional debug info:
    qtdemux.c(3838): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
    streaming stopped, reason error
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    !!!!!!!!!unreference all the remaining buffers!!!!!!!!!Freeing pipeline ...

    Please provide suggestions to disable OMX (hardware) encoders on TI board and only use software encoders.

    Thanks,

    Arunaa.

  • Hello,

    Arunaa CN said:
    gst-launch filesrc location=/home/sample1/Holy.mp4 ! qtdemux name=demux ! queue ! h264parse ! ffdec_h264 ! v4l2sink

    This is not correct in case that you are using ffdec_h264.

    Could you try with:

    -in case omx_videosink

    gst-launch --gst-debug=3 --verbose -e filesrc location=xx.mp4 ! qtdemux ! queue ! h264parse  access-unit=true ! ffdec_h264 ! ffmpegcolorspace ! omx_scaler ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60 ! gstperf ! omx_videosink

    -in case v4l2sink

    gst-launch --gst-debug=3 --verbose -e filesrc location=xx.mp4 ! qtdemux ! queue ! h264parse  access-unit=true ! ffdec_h264 ! ffmpegcolorspace ! omx_scaler ! v4l2sink

    Keep in mind that ffmpegcolorspace probably will cause CPU load and fps drop.

    I would suggested you to use omx_h264dec not ffdec_h264 on DM8148.

    Best Regards,

    Margarita

  • Hi Margarita,

    Thank you for quick reply,

    Yes I tried with above pipelines they are working. Thank you.

    But there is an issue in using omx_scaler in this pipeline.

    As the requirement given to me was, two pipelines individually play ./mp4 files. First pipeline will stream both audio and video to one client which works fine and uses OMX elements.

    Second (current) pipeline will stream only video to different client. As in TI DM 8148, though it is possible to run multiple pipelines, only one pipeline can use OMX elements. (Please correct my understanding here)

    This is the reason OMXscaler cannot be used in this current pipeline.

    Please provide me clarification on this, which will be more helpful.

    Thanks,

    Arunaa.

  • Hello,

    Which pipeline you are pointing that doesn't use omx_scaler?

    Your pipeline wasn't correct because the output of ffdec_h264 mismatch with input of the v4l2sink that is why you need to use in this case ffmpegcolorspace.

    ffmpegcolorspace converts video from one colorspace to another. It is part of  gstreamer base plugin, so it doesn't use hardware acceleration.

    Best Regards,

    Margarita

  • Hi Margarita,
    Thank you for your reply.

    Yes my pipeline wasn't correct, now according to your suggestion it is working when tested individually.

    But both of your suggested pipelines with omx_videosink and v4l2sink uses omx_scaler element.
    I have issue in using  omx_ elements which is described below.

    I have 3 TI DM8148 boards, T1, T2 and T3.
    T1     acts as SERVER
    T2, T3 acts as CLIENT

    CLIENT:
    T2 will run pipeline to get both audio and video
    T3 will run pipeline to get only video

    SERVER:
    According to the given requirement, in T1 two pipelines(P1,P2) should run simultaneously.
    i.e P1 will run in background and P2 will run in foreground.
    Pipeline: P1 => It will stream both audio and video of a .mp4 file to T2 board, as shown below.
    In T2 board will receive audio and video which works fine.

    root@dm814x-evm:/home# gst-launch filesrc location= /home/sample1/Holy.mp4 !decodebin2 name=dec ! queue ! omx_h264enc  !mpegtsmux name=mux ! udpsink host=192.168.10.11 port=5553 dec. ! queue ! audioconvert ! lamemp3enc ! mux. &
    root@dm814x-evm:/home# Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    Redistribute latency...

    Pipeline: P2 => It will stream only video of .mp4 file to T3 board, with the pipeline below.
    root@dm814x-evm:/home# gst-launch filesrc location= /home/sample1/monk.mp4 ! qtdemux name=demux. ! queue ! omx_h264enc ! mpegtsmux name=mux1 ! udpsink host=192.168.10.11 port=5554 demux.
    Setting pipeline to PAUSED ...
    Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_0
    2_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed
    Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02
    _20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) :
    failed
    ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
    Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_0

    .........................................................
    Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02
    _20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) :
    failed
    Caught SIGSEGV accessing address 0xe
    #0  0x405abea4 in ?? ()
    #1  0x405ea1f4 in ?? ()
    #2  0x405ea1f4 in ?? ()
    Spinning.  Please run 'gdb gst-launch 2682' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
    Assertion at Line no: 500 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02
    _20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: ((handlePtr != NULL) && (*handlePtr != N
    ULL)) : failed
    Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02
    _20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) :
    failed
    ServiceMgr_stop: MessageQ_put failed: status = 0xfffffffe

    Whether two pipelines cannot use OMX_encoder simultaneously ?

    I tried using ffenc_mpeg4 element, but couldnot stream the video. Below is the pipeline. Please verify it and help me to stream video without OMX_ elements for pipeline2.


    root@dm814x-evm:/home/WCF/bin#  gst-launch-0.10 -v filesrc location=/home/sample1/Holy.mp4 ! qtdemux name=demux demux.video_00 ! queue ! ffenc_mpeg4 ! mpegtsmux name=mux1 ! udpsink host=192.168.10.11 port=5554 demux.
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: GStreamer encountered a general stream error.
    Additional debug info:
    qtdemux.c(3838): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
    streaming stopped, reason not-linked
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    /GstPipeline:pipeline0/GstQTDemux:demux.GstPad:video_00: caps = NULL
    /GstPipeline:pipeline0/GstQTDemux:demux.GstPad:audio_00: caps = NULL
    Freeing pipeline ...


    Kindly clarify me, which will be more helpful.

    Thanks,
    Arunaa

  • Hello,

    These pipelines working for me:

    gst-launch videotestsrc ! fakesink silent=true

    gst-launch videotestsrc ! videoscale  ! omx_ctrl display-mode=OMX_DC_MODE_1080P_60  ! gstperf ! omx_videosink -v

    Arunaa CN said:
    root@dm814x-evm:/home# gst-launch filesrc location= /home/sample1/monk.mp4 ! qtdemux name=demux. ! queue ! omx_h264enc ! mpegtsmux name=mux1 ! udpsink host=192.168.10.11 port=5554 demux.

    This pipeline seems wrong.

    Are you trying just to stream the mp4 file or you are trying to re-encoded it in different format?

    If you need just to stream the video from board to PC:

    gst-launch filesrc location= /home/sample1/monk.mp4 typefind=true ! qtdemux  ! queue ! h264parse  ! udpsink host=192.168.10.11 port=5554

    Let me know.

    Best Regards,

    Margarita

  • Hello Margarita,

    I am trying to stream only video part of .mp4.

    Yes it works fine now.

    Thank you.

    Arunaa.

  • Hello,

    I am glad that is working now.

    Please let me know if you have  further questions.

    Best Regards,

    Margarita