简体   繁体   中英

Gstreamer problems network streaming with gst-launch

quite new to Gstreamer, but I'm trying to implement a network stream using the gst-launch command. So far I've managed to get the pipeline working with the videotestsrc but when I try to put a filesrc in it's place I have trouble. the following is what I've tried

  • Taking a .mov/.mkv file and streaming

     gst-launch -ve gstrtpbin name=rtpbin filesrc location=/home/user/Gstreamer_projects /test_videos/bbb_short_1080p.mkv ! matroskademux ! h264parse ! rtph264pay ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! queue ! udpsink host=192.168.1.21 port=5000 rtpbin.send_rtcp_src_0 ! udpsink host=192.168.1.21 port=5001 sync=false async=false udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 

the output on the terminal is

    Setting pipeline to PAUSED ...

    Pipeline is live and does not need PREROLL ...

     Setting pipeline to PLAYING ...

     New clock: GstSystemClock

     /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp

    /GstPipeline:pipeline0/GstRtpBin:rtpbin

    /GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp

    /GstPipeline:pipeline0/GstUDPSink:udpsink1.GstPad:sink: caps = application/x-rtcp

    /GstPipeline:pipeline0

    /GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad3: caps = application/x-rtcp

    ERROR: from element /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: GStreamer encountered a general stream error.

    Additional debug info:

    matroska-demux.c(4492): gst_matroska_demux_loop (): /GstPipeline:pipeline0
    /GstMatroskaDemux:matroskademux0:

    stream stopped, reason not-linked

    Execution ended after 1096585 ns.

    Setting pipeline to PAUSED ...

    Setting pipeline to READY ...

    /GstPipeline:pipeline0/GstUDPSink:udpsink1.GstPad:sink: caps = NULL

    /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0: caps = NULL

    /GstPipeline:pipeline0/GstRtpBin:rtpbin
    /GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = NULL

     /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0.GstPad:audio_00: caps = NULL

    /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0.GstPad:video_00: caps = NULL

    Setting pipeline to NULL ...

    Freeing pipeline ...
  • Converted the above file into YUV and then streamed this. This works but very slowly at 2-3fps.

If anyone knows how to fix the pipeline to demux the file properly or increase the performance of the x264enc in Gstreamer I would be very grateful!

You may try to add a queue element before h264parse element. Also, specify the video src pad of matroskademux in the pipeline.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM