Giter Club home page Giter Club logo

Comments (3)

fredowski avatar fredowski commented on June 8, 2024 1

I dived into this 100m deep tank of shit of the gstreamer video stuff some time ago: #10420

My result is that it is impossible to setup a automagic pipeline that works for all video formats on all platforms. So if you figure out one pipeline setup that works for your particular video on your platform then you have to make sure that this works on all other platforms: linux, MacOS, Windows, Android. Then you have to make sure that you have not broken other video formats.

from qgroundcontrol.

ddatsko avatar ddatsko commented on June 8, 2024

UPD: I was debugging the issue more deeply, and it looks that the problem is in the decodebin3 gstreamer plugin. When the decoder is set to decodebin instead of decodebin3 in the code, the video is played and I obtain the following pipeline inside of the QGC with properly selected avdec_h264 decoder:
pipeline-with-new-decoder-pad
However, if I keep the decodebin3, the pipeline is created only till this stage and looks like decodebin3 cannot properly handle the stream
pipeline-with-decoder
All this also fits well with the observation that video recording works well: there is just no decoding there and the stream goes directly into matroskamux and the file

After this, I was able to replicate the same problem with just gstreamer. When sending the MPEG-TS stream with the pipeline above, all these pipelines work for receiving:
gst-launch-1.0 udpsrc port=8081 ! parsebin ! decodebin ! videoconvert ! autovideosink sync=False
gst-launch-1.0 udpsrc port=8081 ! decodebin ! videoconvert ! autovideosink sync=False
gst-launch-1.0 udpsrc port=8081 ! decodebin3 ! videoconvert ! autovideosink sync=False

However, the one created in QGC doesn't work:
gst-launch-1.0 udpsrc port=8081 ! parsebin ! decodebin3 ! videoconvert ! autovideosink sync=False fails with Internal data stream error

I see two possible workarounds in this case:

  • Replace decodebin3 with decodebin, possibly loosing some functionality of it. This doesn't sound like a good option as decodebin3 is newer, promises to fix some weird behaviour of decodebin and has better dynamical connections switching
  • Remove parsebin and leave only decodebin3 in the pipeline. This sound like a valid option considering that decodebin3 should create a parsebin element inside (at least from what I can see from the image below, generated after running the last of three working pipelines described above). This, however, would require a second parser for recording into a file
    738137294-gst-launch-playing-paused

from qgroundcontrol.

ericjohnson97 avatar ericjohnson97 commented on June 8, 2024

I wanted to +1 this issue. I am seeing the same error in my QGC log on Windows when trying to receive a UDP h264 stream

[!] at D:\a\qgroundcontrol\qgroundcontrol\src\VideoReceiver\GstVideoReceiver.cc:1305 - "GStreamer error: Internal data stream error."

from qgroundcontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.