之前一篇写了如何实现实时视频播放。
借助 VideoFrameProvider
和 VideoOutput
,将其实现为一个组件.
这里简略称为 VideoItem
:
Item { width: 800 height: 600 property alias source: provider.source VideoFrameProvider { id: provider } VideoOutput { id: videoOutput anchors.fill: parent source: provider } }
当初要实现多屏就相当容易:
- 咱们能够应用
Row / Column / Grid
+Repeater
的组合:
Grid { rows: 3 columns: 3 Repeater { model: 9 delegate: VideoItem { width: 300 height 300 source: "rtsp://192.168.0.33/channel=" + index } }}
这样就非常简单的实现了九路播放 rtsp 直播视频。
当然,也能够应用 ListView / GridView
,原理实际上是一样的。
- 在
SkeyeARS
中,咱们的做法是间接应用VideoItem
,而后应用anchor
进行布局。
这样的做是为了实现多种布局,并且可能借助 AnchorChanges
+ Transition
插入平滑的动画,晋升体验。
Item { id: root state: "layout1" states: [ State { name: "layout1" AnchorChanges { target: video2 anchors.left: video1.right anchors.top: undefined anchors.horizontalCenter: undefined } }, State { name: "layout2" AnchorChanges { target: video2 anchors.left: undefined anchors.top: video1.bottom anchors.horizontalCenter: video1.horizontalCenter } } ] transitions: [ Transition { from: "*" to: "*" AnchorAnimation { duration: 450; easing.type: Easing.InOutQuad } } ] VideoItem { id: video1 source: "rtsp://192.168.0.33/channel=1" } VideoItem { id: video2 source: "rtsp://192.168.0.33/channel=2" anchors.horizontalCenter: video1.horizontalCenter }}
当初有了两种布局:
layout1
为左右布局,layout2
为高低布局,
如果想要切换布局,咱们只需简略设置 state = "layout1"
或 state = "layout2"
即可。
来看一下 SkeyeARS
中的最终成果:
另一方面,如何实现低延时播放超高清8K直播,有几个思路:
- 减小原始视频帧缓存
- 减小解码视频帧缓存
- 针对不同场景适当降低码率
- 抉择适当的 GoP Size
- 等等
而咱们的 SkeyeARS
+ SkeyePlayerPro
可能做到 8K 100 ~ 300ms
以内的超低延时。
对于SkeyeARS
SkeyeARS全景AR加强监视系统, 是视开科技开发的一款基于宽场景多路视频无缝拼接、视频实时加强、监督指标加强显示、指标主动跟踪、视频存储回放、近程数据传输和多通道全景视频同步显示等性能的综合视频AR加强监视系统,广泛应用于智慧交通、智慧城市、智慧机场等大场景智能监控畛域。
具体阐明:http://www.openskeye.cn/web/product/ars