I was previously using QGC 3.5, and my system provided video to QGC after code I wrote modified the video stream. I was sending TCP, 8 bit, Gray, 640x480.
I have since attempted to upgrade to QGC 4.2-stable.
I can no longer get the raw video connection between my code and QGC to work.
I keep getting a ‘Broken Pipe’ error every time I try to send data.
It does seem to connect, but breaks the connection each time I send a packet of data.
Should I be using a newer or older version of QGC?
We’re not sure what’s going on here, but it’s also hard to give advice on a custom setup without much information about it.
Are you able to specify where you’re modifying the video stream (e.g. on the onboard computer (if so, which Companion/BlueOS version are you using) or on the topside computer), which encoding you’re using, and also provide a gstreamer pipeline so we can try to replicate the issue?
It’s possible the TCP-MPEG2 source option has some issues - if I remember correctly the video pipelines have changed somewhat recently, and I’m unsure whether that’s something that would have been tested to ensure was still working.
All our standard pipelines use H264-encoded video over UDP, which is what you seemingly ended up getting working in the end. Glad you managed to resolve your issue!
Note that in the H264 encoding that you’re doing (with the x264enc element) you may be able to get some additional quality from the stream (/avoid some compression loss) by increasing the bitrate and/or using a lower speed-preset value.
First, thank you for all of the help you have provided. I have learned a lot.
I have, I hope, one last issue. this pipeline worked in the previous version I was testing, QGC 4.2
I am running QGC 4.2.4 - master. Compiles and runs. But when I supply video via the following gstreamer pipeline for testing I get the following odd video in QGC.
I am hoping you can provide some clarity for this issue. I have not been able to find any questions
here or the Internet.
This is on a fresh install ubuntu 22.04.
If a pipeline works when received by the stable version of QGC but not master then that’s an issue you’ll need to report and discuss on the QGC repo - we don’t actively support QGC development. Alternatively you could check out the tag for the relevant stable release and try to build off that, if you’re only making temporary changes to test things.
At a guess the QGC video integration code has likely changed somewhat between the versions you’ve tested, and there may be some kind of issues with the non-standard options you’re testing (normally video streams are in colour, not greyscale, and we also don’t usually have svg overlays or onboard encoding as part of the video stream pipeline).
Another thing to try (assuming the normal video settings are available in the blurred out section of your window) would be changing QGC’s video fit options.
OK, anyone viewing this thread, I have discovered a mistake in my pipeline.
I was converting 8bit B/W video to BGRA in order to add an SVG overlay.
then I was changed it back to I420 (don’t know why).
Well, I took out the conversion to I420 and added a queue after the BGRA conversion and another before the x264enc.