我正在尝试将我VlcVideoPlayer
的 VLCQt 库连接到使用rts 协议从 url 流式传输的任何视频。
目前,这是我的代码:
import QtQuick 2.0
import VLCQt 1.0
VlcVideoPlayer {
property var first: true
id: vidwidget
anchors.fill: parent
objectName: "vlcMediaPlayer"
url: "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov" // "http://samples.mplayerhq.hu/A-codecs/AAC/ct_faac.mp4"
volume: 100
aspectRatio: "16:10"
autoplay: true
}
它适用于https://,但是当我尝试将其更改为rtps://时,我的控制台只打印出来
QML debugging is enabled. Only use this in a safe environment.
VLC-Qt "1.1.0" initialised
Using libvlc version: "2.2.2 Weatherwax"
Format: chroma: I420 width: 240 height: 162 pitches: 0 lines: 0
YV12 3 0
libvlc Error: "Track identifier not found"
libvlc: Failed to change zoom
libvlc: Failed to set on top
libvlc: Failed to change source AR
什么也没有发生 - 没有视频出现。
当我尝试用 显示视频的当前时间时console.log(time)
,时间正在改变,所以我猜它播放视频,但没有显示。
有人有这方面的经验吗?我在哪里做错了?
谢谢你的帮助!
//编辑:
我没有先注意到,但我得到的是音频,而不是视频。