简体   繁体   English

通过gstreamer和qt5可视化rtsp流的红色工件

[英]Red artifact on visualizing rtsp stream via gstreamer and qt5

I've written a c++ program that receives a RTSP stream via gstreamer and displays this video via Qt5 in a QWidget. 我编写了一个c ++程序,该程序通过gstreamer接收RTSP流,并在QWidget中通过Qt5显示此视频。 As the gstreamer videosink, I use a Widgetqt5glvideosink. 作为gstreamer videoink,我使用Widgetqt5glvideosink。

The problem is when I look at the received stream it has too much red-value in it. 问题是当我查看接收到的流时,它的红色值太多。 This only occurs when the vertical resolution exceeds +-576 pixels. 仅当垂直分辨率超过+ -576像素时才会发生这种情况。 (lower resolutions have no issue) (较低的分辨率没有问题)
When I use cpu rendering (Widgetqt5videosink) instead of openGL rendering i get a correct image. 当我使用cpu渲染(Widgetqt5videosink)而不是openGL渲染时,我得到了正确的图像。
When I view the stream via gstreamer command line or via VLC it is also correct. 当我通过gstreamer命令行或VLC查看流时,这也是正确的。

So it likes to be an issue when using an openGL rendered QWidget. 因此,当使用openGL呈现的QWidget时,它像是一个问题。

Is this an driver issue or something else? 这是驱动程序问题还是其他问题?

Info: 信息:
Tested on Ubuntu16.04 and 17.04 for the viewer application. 在Ubuntu16.04和17.04上针对查看器应用程序进行了测试。

Links: 链接:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html

I managed to fix my problem by patching two files in the source code of qt-gstreamer. 我设法通过修补qt-gstreamer的源代码中的两个文件来解决我的问题。
There were two wrong color matrices of the colorimetry BT709. 比色计BT709有两个错误的颜色矩阵。
Patch to fix red artifact in Widgetqt5glvideosink 修补程序以修复Widgetqt5glvideosink中的红色工件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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