Video analysis method and system, video playing method, equipment and medium
By analyzing the play address and type of the video stream and assembling appropriate playback instances, the compatibility problem in video playback technology is solved, and compatible playback of multiple video stream protocols is realized, which meets the personalized needs of users and improves video playback compatibility and user experience.
Patent Information
- Application Number
- CN202411278481.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-06
AI Technical Summary
There are compatibility issues with existing video playback technology, and the support for video formats by different operating systems and browsers is inconsistent, resulting in incompatible video playback.
By obtaining the video playback address of the video stream for parsing, identifying the type of the video stream and assembling the corresponding playback instances, compatible playback of multiple video stream protocols is realized to meet the personalized needs of users.
It realizes compatible playback of videos in different formats, breaks the limitations on a single protocol, meets users' personalized needs, and improves the compatibility and user experience of video playback.
Smart Images

Figure CN119094822A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of video playback technology and relates to a video analysis method, and in particular to a video analysis method and system, a video playback method, device and medium. Background Art
[0002] Video playback technology has experienced significant development in the past few decades. From early analog video to today's digital video, the advancement of playback technology has not only improved video quality, but also greatly changed the user's viewing experience. However, despite the continuous advancement of technology, existing video playback technology still faces many compatibility issues.
[0003] Different operating systems and browsers have different support for video formats. Some video formats can be played smoothly on Windows systems, but may require additional plug-ins or software on macOS or Linux systems. The same situation occurs between browsers. For example, some videos perform well on Chrome browsers, but cannot be played properly on Safari or Firefox. One way to solve these compatibility issues is to adopt more universal and widely supported video formats, such as MP4 and H.264. However, this does not completely eliminate all problems, as the emergence of emerging video formats and codecs (such as AV1) may still cause new compatibility challenges.
[0004] In general, although video playback technology has made great progress, compatibility issues still exist and require continuous technological innovation and standardization efforts to resolve. Summary of the invention
[0005] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a video analysis method and system, a video playback method, device and medium, which are used to solve the problem of video playback incompatibility in the prior art.
[0006] In a first aspect, the present application provides a video parsing method, which includes: obtaining a video playback address of a video stream; performing parsing processing according to the video playback address of the video stream to obtain a video playback type of the video stream; assembling a corresponding playback instance according to the video playback type of the video stream to mount it on a browser for video playback.
[0007] In this application, the video playback address of the video stream is obtained, and the video playback address of the video stream is used for parsing to obtain the video playback type of the video stream, and the corresponding playback instance is assembled according to the video playback type to play the video. This video parsing method can break the limitation of a single protocol, realize the compatible playback of multiple video stream protocols, and meet the personalized needs of users.
[0008] In an implementation of the first aspect, parsing according to the video playback address of the video stream to obtain the video playback type of the video stream includes: parsing according to the video playback address of the video stream to obtain the protocol of the video stream; and obtaining the video playback type of the video stream according to the protocol of the video stream.
[0009] In an implementation of the first aspect, the video playback type includes a first video playback type and a second video playback type, and assembling a corresponding playback instance according to the video playback type of the video stream to mount it on a browser for video playback includes: if the video playback type is the first video playback type, directly assembling a first playback instance according to the first video playback type to mount it on a browser for video playback; if the video playback type is the second video playback type, determining the communication protocol type of the video, and assembling a corresponding playback instance according to the type of the communication protocol to mount it on a browser for video playback.
[0010] In an implementation of the first aspect, if the video playback type is the second video playback type, the communication protocol type of the video is determined, and a corresponding playback instance is assembled according to the type of the communication protocol to mount the video on a browser for video playback, including: initiating a request to a video playback address of the video stream, and receiving information fed back in response to the request, and determining the communication protocol type of the video according to the information; if the communication protocol type of the video is the first communication protocol, a playback instance corresponding to the first communication protocol is assembled, and if the communication protocol type of the video is the second communication protocol, a playback instance corresponding to the second communication protocol is assembled to mount the video on a browser for video playback.
[0011] In a second aspect, the present application provides a video playback method, applying the video parsing method described in any one of the first aspects, the video playback method comprising: obtaining a video stream and obtaining parameters of the video, the parameters including device parameters, channel parameters, event parameters and live broadcast parameters; verifying the parameters of the video stream to obtain a verification result; judging whether the playback format of the video stream is live broadcast according to the verification result, if so, playing the video stream according to the live broadcast format, if not, playing the video stream according to the replay format.
[0012] In an implementation of the second aspect, playing the video stream in a live broadcast format includes: obtaining a token of the video stream; obtaining a live broadcast address according to the token of the video stream; judging whether the streaming media is ready according to the live broadcast address, and playing the video stream if it is ready, and otherwise performing a carousel processing on the video stream.
[0013] In an implementation of the second aspect, it is determined whether the playback format of the video stream is live broadcast based on the verification result. If so, the video stream is played in live broadcast format; if not, the video stream is played in replay format, and the method further includes: keeping the streaming media where the video stream being played is located alive.
[0014] In a third aspect, the present application provides a video parsing system, which includes: an address acquisition module for acquiring a video playback address of a video stream; a parsing processing module for performing parsing processing according to the video playback address of the video stream to obtain a video playback type of the video stream; and a video playback module for assembling a corresponding playback instance according to the video playback type of the video stream to mount it on a browser for video playback.
[0015] In a fourth aspect, the present application provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, so that the electronic device performs the video parsing method described in any one of the first aspect and / or the video playback method described in any one of the second aspect.
[0016] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video parsing method described in any one of the first aspects and / or the video playback method described in any one of the second aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1A Shown is a schematic diagram of an application scenario of the video parsing method described in this application.
[0018] Figure 1B Shown are structural diagrams of the client-cloud interaction scenarios in these implementations.
[0019] Figure 2 Shown is a flowchart of the video parsing method described in an embodiment of the present application.
[0020] Figure 3A Shown is a flowchart of the video parsing method described in an embodiment of the present application.
[0021] Figure 3B Shown is a schematic diagram of the video parsing method described in an embodiment of the present application.
[0022] Figure 4 Shown is a schematic diagram of the video parsing method described in an embodiment of the present application.
[0023] Figure 5 Shown is a flowchart of the video playback method described in an embodiment of the present application.
[0024] Figure 6 Shown is a flowchart of the video playback method described in an embodiment of the present application.
[0025] Figure 7 Shown is a schematic diagram of the video playback method described in an embodiment of the present application.
[0026] Figure 8 Shown is a schematic diagram of the structure of the video analysis system described in an embodiment of the present application.
[0027] Fig. 9 Shown is a schematic diagram of the structure of an electronic device described in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0029] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0030] With the rapid development of information technology, video player components, as an important part of front-end technology, have been widely used in various online media platforms. At present, there are many video player components on the market. Although the existing technology has achieved certain results, there are still some obvious shortcomings. First of all, many video player components are prone to problems such as freezes and delays when processing high-definition and large-capacity video files, which affects the user's viewing experience. Secondly, the compatibility of different browsers and devices is also a major challenge facing the existing technology. Finally, the existing technology still needs to be strengthened in realizing personalized playback settings, intelligent recommendations, etc., especially in combination with information technologies such as live video and spatial video.
[0031] At least for the above problems, the embodiment of the present application provides a video parsing method, the video parsing method comprising obtaining a video playback address of a video stream; performing parsing processing according to the video playback address of the video stream to obtain a video playback type of the video stream; assembling a corresponding playback instance according to the video playback type of the video stream to mount it to a browser for video playback. This video parsing method can achieve compatible playback of videos of different formats and meet personalized needs.
[0032] In the embodiment of the present application, the video playback address of the video stream is obtained, and the video playback address of the video stream is used for parsing to obtain the video playback type of the video stream, and the corresponding playback instance is assembled according to the video playback type to play the video. This video parsing method can break the limitation of a single protocol, realize the compatible playback of multiple video stream protocols, and meet the personalized needs of users.
[0033] Figure 1A The display is a schematic diagram of an application scenario of the video parsing method described in the present application. The player 1 can be used to implement the video parsing method provided in the embodiment of the present application, but the application scenario of the video parsing method provided in the embodiment of the present application is not limited to Figure 1A The player 1 shown. Figure 1A As shown, the player 1 includes a video storage device 11, a local processor 12 and a video playback device 13. The video parsing method provided in the embodiment of the present application can be applied to the local processor 12.
[0034] in, Figure 1A The local processor 12 in the embodiment may be a local processor or a local processor cluster composed of multiple local processors or a cloud computing center, etc., which is not limited to the specifics herein. Figure 1A Only one video storage device 11, one local processor 12 and one video playback device 13 are shown, but it should be understood that Figure 1A The examples are only used to understand the present solution, and the specific numbers of local processors 12 and video playback devices 13 should be flexibly determined based on actual conditions.
[0035] In some other implementations, the player 1 may not include the video storage device 11, but only include a video playback device 13 with a display function and a local processor 12. The video parsing method provided in the embodiment of the present application can be applied to the local processor 12. The video playback device 13 with a display function may include a tablet computer, a laptop computer, a PDA, a mobile phone, a personal computer (PC) and a voice interaction device, and may also be a monitoring device, a face recognition device, etc., which is not limited here.
[0036] In still other implementations, the video parsing method described in this application may be applied to end-cloud interaction scenarios. Figure 1B The following is a schematic diagram of the structure of the client-cloud interaction scenario in these implementations. Figure 1B As shown, the terminal-cloud interaction system 2 includes a terminal 20 and a cloud server 21. The terminal 20 and the cloud server 21 can communicate with each other, and the communication method is not limited to wired or wireless.
[0037] Among them, the terminal 20 can be mobile or fixed, for example, the terminal 20 can be a wireless terminal or a wired terminal. The wireless terminal can refer to a device with wireless transceiver function, which can be deployed indoors, outdoors and in industrial workshops. The terminal 20 can be a mobile phone, a tablet computer, a laptop computer, etc., which is not limited here. The cloud server 21 can include one or more servers, or one or more processing nodes, or one or more virtual machines running on the server. The cloud server 21 can also be called a server cluster, a management platform, a data processing center, etc., which is not limited in the embodiments of the present application.
[0038] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0039] The following embodiments of the present application provide a video parsing method, for example, Figure 1A The local processor 12 shown or Figure 1B It is implemented by the cloud server 21 shown. Figure 2 The flowchart of the video parsing method described in the embodiment of the present application is shown as follows: Figure 2 As shown, the video parsing method includes steps S11 to S13.
[0040] Step S11, obtaining the video playback address of the video stream.
[0041] Step S12: performing parsing processing according to the video playback address of the video stream to obtain the video playback type of the video stream.
[0042] Step S13, assembling a corresponding playback instance according to the video playback type of the video stream, so as to mount it to a browser for video playback.
[0043] In some possible implementations, the video stream in the video parsing method described in the embodiment of the present application includes an HLS (HTTP Live Streaming) protocol video stream, a WebRTC (Web Real-Time Communication) protocol video stream, and a WS (WebSocket) protocol video stream. Parse and process the video playback address of the video stream to obtain the video playback type of the video stream. The playback address of the video stream may be a header of a file extension or file suffix, a file download path, a protocol type, or a content type. Optionally, the video type is identified based on a specific protocol used in the video playback address. For example, http: / / and https: / / indicate a standard http video stream. The video playback type is identified based on a specific protocol identifier of the video playback address, for example, the playback address of WebRTC starts with "webrtc: / / " to indicate that the video is transmitted using the WebRTC protocol. Assemble the corresponding playback instance based on the video playback type of the video stream to mount it on the browser for video playback.
[0044] In the embodiment of the present application, the video playback address of the video stream is obtained, and the video playback address of the video stream is used for parsing to obtain the video playback type of the video stream, and the corresponding playback instance is assembled according to the video playback type to play the video. This video parsing method can break the limitation of a single protocol, realize the compatible playback of multiple video stream protocols, and meet the personalized needs of users.
[0045] Figure 3A The flowchart of the video parsing method described in the embodiment of the present application is shown as follows: Figure 3A As shown, the step S12 includes steps S121 to S122.
[0046] Step S121, parsing is performed according to the video playback address of the video stream to obtain the protocol of the video stream.
[0047] Step S122: acquiring the video playback type of the video stream according to the protocol of the video stream.
[0048] In some possible implementations, Figure 3B A schematic diagram of the video parsing method described in an embodiment of the present application is shown. Figure 3BAs shown, according to the video playback address of the video stream, it can be obtained that the protocol of the video stream is WS protocol, HTTP protocol, HLS protocol or WebRTC protocol. Different protocols correspond to different video playback types. The video playback type of the video stream is obtained according to the protocol of the video stream. Optionally, the WS protocol is usually used for real-time communication technologies such as WebRTC, and video streaming and playback can be performed through WebSocket in a browser or application. The HTTP protocol is used for standard web page requests and responses, and is also the basic protocol for traditional video on demand and live broadcasts. The HLS protocol is used for video on demand and live broadcasts, and uses an HLS player to play segmented MPEG-TS video files. The WebRTC protocol plays and interacts with real-time video streams directly in the browser, and realizes audio and video capture, transmission and playback through JavaScript API.
[0049] In one embodiment of the present application, Figure 4 A schematic diagram of the video parsing method described in an embodiment of the present application is shown. Figure 4 As shown, the video play type includes a first video play type and a second video play type. If the video play type is the first video play type, a first play instance is directly assembled according to the first video play type to mount it to the browser for video play. If the video play type is the second video play type, the communication protocol type of the video is determined, and a corresponding play instance is assembled according to the type of the communication protocol to mount it to the browser for video play.
[0050] Specifically, the first video playback type is a video stream type of the WebRTC protocol, and the second video playback type is a video stream type of the HTTP protocol. If the video playback type is a video stream type of the WebRTC protocol, a WebRTC playback instance is directly assembled. If the video playback type is a video stream type of the HTTP protocol, the communication protocol type of the video is determined, and a corresponding playback instance is assembled according to the type of the communication protocol to mount it on the browser for video playback.
[0051] In one embodiment of the present application, please continue to refer to Figure 4 , initiate a request to the video playback address of the video stream, receive information fed back in response to the request, and determine the communication protocol type of the video according to the information. If the communication protocol type of the video is the first communication protocol, assemble a playback instance corresponding to the first communication protocol; if the communication protocol type of the video is the second communication protocol, assemble a playback instance corresponding to the second communication protocol to mount it on the browser for video playback.
[0052] Specifically, a request is initiated to the video playback address of the video stream, and information fed back in response to the request is received, and the communication protocol type of the video is determined based on the information. The first communication protocol type is the HLS communication protocol, and the second communication protocol type is the WS communication protocol. If the communication protocol type of the video is the HLS communication protocol, a playback instance corresponding to the HLS communication protocol is assembled; if the communication protocol type of the video is the WS communication protocol, a playback instance corresponding to the WS communication protocol is assembled to mount it on the browser for video playback.
[0053] Figure 5 The flowchart of the video playback method described in the embodiment of the present application is shown as follows: Figure 5 As shown, the video playing method includes steps S21 to S23.
[0054] Step S21, obtaining a video stream and obtaining parameters of the video, wherein the parameters include device parameters, channel parameters, event parameters and live broadcast parameters.
[0055] Step S22, verifying the parameters of the video stream to obtain a verification result.
[0056] Step S23, judging whether the playing mode of the video stream is live broadcast according to the verification result, if so, playing the video stream according to the live broadcast mode, if not, playing the video stream according to the replay mode.
[0057] Figure 6 The flowchart of the video playback method described in the embodiment of the present application is shown as follows: Figure 6 As shown, the step S23 includes steps S231 to S233.
[0058] Step S231, obtaining a token of the video stream.
[0059] Step S232, obtaining a live broadcast address according to the token of the video stream.
[0060] Step S233, judging whether the streaming media is ready according to the live broadcast address, and playing the video stream if it is ready, and performing a carousel process on the video stream if it is not ready.
[0061] In one embodiment of the present application, it is determined whether the playback format of the video stream is live broadcast based on the verification result. If so, the video stream is played in live broadcast format; if not, the video stream is played in replay format, which also includes: keeping the streaming media where the video stream being played is located alive.
[0062] In some possible implementations, Figure 7 A schematic diagram of a video playback method according to an embodiment of the present application is shown. Figure 7 As shown, a video stream is obtained and parameters of the video are obtained, the parameters including device parameters, channel parameters, event parameters and live broadcast parameters. The parameters of the video stream are verified to obtain a verification result. According to the verification result, it is determined whether the playback form of the video stream is live broadcast.
[0063] If it is a live broadcast, obtain the token of the video stream, obtain the live broadcast address according to the token of the video stream, and determine whether the streaming media is ready according to the live broadcast address. If it is ready, play the video stream, otherwise perform carousel processing on the video stream. If it is not a live broadcast, obtain the replay address. At the same time, keep the streaming media where the video stream is being played alive. Among them, streaming media keep-alive means that in the process of using streaming media services (such as video, music, etc.), technical means are used to keep the streaming media connection active to prevent connection interruption or disconnection due to long-term inactivity or network fluctuations.
[0064] Figure 8 The structure diagram of the video analysis system described in the embodiment of the present application is shown as follows: Figure 8 As shown, the video parsing system 100 includes an address acquisition module 110 , a parsing processing module 120 and a video playing module 130 .
[0065] The address acquisition module 110 is used to acquire the video playback address of the video stream.
[0066] The parsing module 120 is used to perform parsing according to the video playback address of the video stream to obtain the video playback type of the video stream.
[0067] The video playback module 130 is used to assemble a corresponding playback instance according to the video playback type of the video stream, so as to mount it to a browser for video playback.
[0068] In some possible implementations, the video streams in the video parsing system described in the embodiments of the present application include HLS (HTTP Live Streaming) protocol video streams, WebRTC (Web Real-Time Communication) protocol video streams, and WS (WebSocket) protocol video streams. Parsing is performed according to the video playback address of the video stream to obtain the video playback type of the video stream. The playback address of the video stream may be a file extension or file suffix, a file download path, a protocol type, or a content type header. Optionally, the video type is identified based on the specific protocol used in the video playback address. For example, http: / / and https: / / indicate a standard http video stream. The video playback type is identified based on a specific protocol identifier of the video playback address, for example, the playback address of WebRTC starts with "webrtc: / / " to indicate that the video is transmitted using the WebRTC protocol. The corresponding playback instance is assembled according to the video playback type of the video stream to be mounted on the browser for video playback. It should be noted that the above-mentioned modules 110 to 130 included in the video parsing system 100 are the same as Figure 2 Steps S11 to S13 in the video analysis method shown correspond to each other and are not described in detail here.
[0069] In the embodiment of the present application, the address acquisition module 110 acquires the video playback address of the video stream, the parsing processing module 120 uses the video playback address of the video stream to perform parsing to obtain the video playback type of the video stream, and the video playback module 130 assembles the corresponding playback instance according to the video playback type to play the video. Such a video parsing system 100 can break the limitation of a single protocol, realize the compatible playback of multiple video stream protocols, and meet the personalized needs of users.
[0070] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0071] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0072] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0073] An embodiment of the present application also provides an electronic device. Fig. 9 The structure diagram of the electronic device described in the embodiment of the present application is shown. Fig. 9 As shown, in this embodiment, the electronic device 900 includes a memory 910 and a processor 920 .
[0074] The memory 910 is used to store computer programs; preferably, the memory 910 includes: ROM, RAM, disk, USB flash drive, memory card or optical disk, etc., various media that can store program codes.
[0075] Specifically, the memory 910 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The electronic device 900 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 910 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0076] The processor 920 is connected to the memory 910 and is used to execute the computer program stored in the memory 910 so that the electronic device 900 executes the video parsing method described in any embodiment of the present application and / or the video playback method described in the embodiments of the present application.
[0077] Optionally, the processor 920 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0078] Optionally, the electronic device 900 in this embodiment may further include a display 930. The display 930 is communicatively connected to the memory 910 and the processor 920, and is used to display a graphical user interface (GUI) interaction interface related to the video parsing method described in the embodiment of the present application and / or the video playback method described in other embodiments of the present application.
[0079] The present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the video parsing method described in any embodiment of the present application and / or the video playing method described in other embodiments of the present application are implemented.
[0080] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0081] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A video analysis method, characterized in that: include: Get the video playback address of the video stream; Performing parsing processing according to the video playback address of the video stream to obtain the video playback type of the video stream; A corresponding playback instance is assembled according to the video playback type of the video stream to be mounted on a browser for video playback.
2. The video analysis method according to claim 1, characterized in that: Parsing the video playback address of the video stream to obtain the video playback type of the video stream includes: Parsing the video playback address of the video stream to obtain a protocol of the video stream; The video playback type of the video stream is obtained according to the protocol of the video stream.
3. The video analysis method according to claim 1, characterized in that: The video play type includes a first video play type and a second video play type, and assembling a corresponding play instance according to the video play type of the video stream to mount it to a browser for video play includes: If the video playback type is the first video playback type, directly assembling a first playback instance according to the first video playback type to mount it to the browser for video playback; If the video playback type is the second video playback type, the communication protocol type of the video is determined, and a corresponding playback instance is assembled according to the type of the communication protocol to mount it on the browser for video playback.
4. The video analysis method according to claim 3, characterized in that: If the video playback type is the second video playback type, determining the communication protocol type of the video, assembling a corresponding playback instance according to the type of the communication protocol, and mounting it to the browser for video playback includes: Initiate a request to the video playback address of the video stream, receive information fed back in response to the request, and determine the communication protocol type of the video according to the information; If the communication protocol type of the video is the first communication protocol, a playback instance corresponding to the first communication protocol is assembled; if the communication protocol type of the video is the second communication protocol, a playback instance corresponding to the second communication protocol is assembled to mount it on the browser for video playback.
5. A video playback method, characterized in that: The video analysis method according to any one of claims 1 to 4 is applied, comprising: Obtaining a video stream and obtaining parameters of the video, the parameters including device parameters, channel parameters, event parameters, and live broadcast parameters; Verifying the parameters of the video stream to obtain a verification result; It is determined whether the video stream is played in a live broadcast mode according to the verification result. If so, the video stream is played in a live broadcast mode. If not, the video stream is played in a replay mode.
6. The video playback method according to claim 5, characterized in that: Playing the video stream in a live broadcast format includes: Obtain a token for the video stream; Obtaining a live broadcast address according to the token of the video stream; It is determined whether the streaming media is ready according to the live broadcast address, and if so, the video stream is played, and if not, the video stream is played in a carousel.
7. The video playback method according to claim 5, characterized in that: Determining whether the video stream is played in a live broadcast format based on the verification result, if so, playing the video stream in a live broadcast format, and if not, playing the video stream in a replay format also includes: performing keep-alive processing on the streaming media where the video stream being played is located.
8. A video analysis system, characterized in that: include: An address acquisition module is used to obtain the video playback address of the video stream; A parsing and processing module, used for performing parsing and processing according to the video playback address of the video stream to obtain the video playback type of the video stream; The video playback module is used to assemble a corresponding playback instance according to the video playback type of the video stream so as to mount it on the browser for video playback.
9. An electronic device, characterized in that: The electronic device comprises: Memory for storing computer programs; A processor, wherein the processor is used to execute the computer program stored in the memory so that the electronic device executes the video parsing method according to any one of claims 1 to 4 and / or the video playback method according to any one of claims 5 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the video parsing method described in any one of claims 1 to 4 and / or the video playing method described in any one of claims 5 to 7 are implemented.
Citation Information
Patent Citations
Video playing method based on multiple types of video sources and related equipment
CN112135199A
Webrtc low-delay live broadcast method and system based on Nginx-rtmp
CN114025191A
Live media content delivery systems and methods
CN114365503A
Video playing method, device and equipment and computer readable storage medium
CN117119265A
Video stream identification method and device, computer equipment and storage medium
CN117615172A
