【问题标题】:Playing RTSP Video in QML on Windows在 Windows 上以 QML 播放 RTSP 视频
【发布时间】:2014-11-23 17:54:03
【问题描述】:

我正在尝试将 QML 中的 RTSP 流播放到视频标签中,如下所示:

Repeater {
    model: 8

    Video {
        Layout.fillWidth: true
        Layout.fillHeight: true

        fillMode: VideoOutput.Stretch

        source: Controller.urlCanal(index + 1)
        autoPlay: true
        autoLoad: true

        CustomBorder {
            commonBorder: true
            color: "#228e14"
            commonBorderWidth: 3
        }
    }
}

这应该显示 8 个视频屏幕,但我收到了错误:

DirectShowPlayerService::doSetUrlSource: 未解决的错误代码 800c000d

网址:

rtsp://192.168.50.10:8082/user=admin&password=admin&channel=7&stream=0.sdp?real_stream

QML 是否支持 RTSP?如果是这样,我做错了什么? 如果没有,我怎样才能让它工作?

PS.:我也尝试将 MediaPlayer 与 VideoOutput 一起使用,但我得到了同样的错误。

提前谢谢你

【问题讨论】:

    标签: qt video stream qml rtsp


    【解决方案1】:

    Qt 本身不支持 RTSP。尝试使用第三方库,例如 OpenCV 或 FFMPEG。我使用 OpenCV 然后从我的后端 C++ 代码创建了一个插件来创建一个 OpenCV 相机元素,然后在 QML 中显示 RTSP 提要。

    【讨论】:

      猜你喜欢
      • 2012-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-08
      相关资源
      最近更新 更多