This topic describes the FAQ about video stream access.
Analysis of video stream access problems
Problem description
Video stream access is a comprehensive issue involving multiple aspects of the browser, video stream, and player. As a visual page building tool, DataV only integrates the video player in the form of a component. Due to the limited positioning methods, it cannot directly locate the browser, video stream, and player itself. However, there are many Video Surveillance System manufacturers, code stream formats and private protocols, so far no player compatible with all video streams has been found.
Solution
At present, the simplest and most direct solution is to introduce video transcoding manufacturers to deploy transcoding servers to transcode video streams to adapt to Web playback. Previously, many projects have adopted this solution to achieve good results.
Troubleshooting of common problems in video stream access
What is the positioning path when the video is stuck or cannot be played?
If the video is stuck or cannot be played, you can use the following methods to troubleshoot the issue:
Check the network to see if the bandwidth can support simultaneous playback of the current playback path. If not, we recommend that you upgrade the network.
NoteIf the Video Surveillance System platform software and VLC player can play smoothly, it does not mean that the browser can play smoothly. Fluorite cloud player can be tested to see whether multi-channel playback is smooth at the same time.
Check whether the machine performance is sufficient. Because browsers rely on CPU decoding, concurrently running rendering processes may preempt the CPU. We recommend that you use a CPU with a high clock speed, such as i9, to improve performance.
NoteYou also purchase video transcoding and on-demand services to solve format and performance problems.
Check whether the browser console reports an error about the CORS of the video stream address and whether the video stream address allows cross-domain access. If cross-domain access is not allowed, you need to set cross-domain access on the video stream server.
NoteGenerally, the URL of the visualization application is different from the URL of the video stream.
View the browser and the HTTP protocol version used. There is an upper limit on the number of concurrent requests that are sent by the browser and the domain name http1.1. In most cases, the maximum number of concurrent requests is six. If multiple videos are played at the same time, the screen may be stuck or the display may be loaded. We recommend that you use the http2.0 protocol to provide access or use different domain names to distinguish the access addresses of the video streams that are played at the same time.
Check whether the video is a flv video stream. The flv video stream must be suffixed with. flv.
Notewe recommend that you use video streaming manufacturers that support native playback formats such as flv and hls.
Suggestions on using the DataV video playback component
ApsaraVideo Player (recommended)
recommend you use the Alibaba Cloud stream player.
Video component
The video component is an Html video tag. The MP4, OGG, and WebM formats are supported.
fluorite cloud
fluorite cloud is the same as the alibaba cloud stream player, but belongs to a third-party plug-in. Therefore, we recommend that you use Alibaba Cloud Stream Player.
RTMP video stream player (not recommended)
The RTMP video stream player supports the RTMP format, but relies on the flash plug-in. Currently, mainstream browsers have stopped supporting it, so we recommend that you do not use it.
custom widgets
If the preceding video components cannot meet the playback requirements, you can use custom components to implement them. The custom components need to be implemented by front-end developers.
Video stream format supplement
At present, video streams directly from cameras mainly include RTSP and GB 28181. For large-scale projects, manufacturers will have a video aggregation platform and then distribute it to various applications.
The player of the computer mainly has the following kinds.
The Video Surveillance System platform software provided by the manufacturer is usually C/S architecture, which is easy to operate and has good performance.
Playback through video playback software, such as VLC player, due to hardware decoding, performance in the middle.
When the system is integrated, it needs to be integrated into the big screen software and run on the Web browser. Compared with the previous two methods, it depends on the compatibility of the Web player and the performance of the CPU.
For the Web, some early IE manufacturers received their own videos by providing ActiveX plug-ins, but IE has been basically eliminated in recent years. The mainstream browser is Chrome or a browser based on Chrome kernel encapsulation, and there is no way to directly play RTSP video streams and GB28181 format.
Currently, video streams supported on the Web include RTMP/HLS/FLV formats. RTMP relies on Flash player, which is currently the most used, but its performance is very poor, and mainstream browsers do not support Flash at present. HLS is an Apple format and works well on safari, but it is segmented on-demand, which will cause incomplete real-time playback and occasionally a black screen when switching segments when playing on Chrome. FLV is a relatively mainstream video format in the near future. Large video websites use this format for live videos, which can be played by using the native player of the browser with the highest performance.