WO2024087208A1 - Video playback method and system, and storage medium - Google Patents

Video playback method and system, and storage medium Download PDF

Info

Publication number
WO2024087208A1
WO2024087208A1 PCT/CN2022/128383 CN2022128383W WO2024087208A1 WO 2024087208 A1 WO2024087208 A1 WO 2024087208A1 CN 2022128383 W CN2022128383 W CN 2022128383W WO 2024087208 A1 WO2024087208 A1 WO 2024087208A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
information
video data
video frame
server
Prior art date
Application number
PCT/CN2022/128383
Other languages
French (fr)
Chinese (zh)
Inventor
谭红平
刘文泽
吴杰
Original Assignee
深圳市锐明技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市锐明技术股份有限公司 filed Critical 深圳市锐明技术股份有限公司
Priority to PCT/CN2022/128383 priority Critical patent/WO2024087208A1/en
Publication of WO2024087208A1 publication Critical patent/WO2024087208A1/en

Links

Definitions

  • the present application relates to the field of video, and in particular to a video playback method, system and storage medium.
  • the server encrypts the audio and video data
  • the client decrypts and plays the audio and video data (if the client is a browser, you also need to install a plug-in for the browser, such as the Active plug-in).
  • the main process is as follows:
  • the user starts the client for playing the video
  • the client queries the server for decryption information of the played video
  • the server verifies the legitimacy of the client's access and returns the decrypted information to the client after the verification passes;
  • the client pulls the video stream from the server, decrypts the encrypted audio and video data through the decryption information, and then decodes and plays the audio and video data.
  • the embodiments of the present application provide a video playback method, system and storage medium to solve the problem in the prior art that when playing a video, the client needs to query the server for decryption information, which causes great access pressure on the server, affects the concurrency of the platform, causes delays in the video display time, and brings a bad user experience for low-latency video playback.
  • a first aspect of an embodiment of the present application provides a video playback method, which is applied to a server, and the method includes:
  • the expanded video frame and the encrypted audio frame are encapsulated into second video data, and the second video data is sent to the browser.
  • the second video data is used by the browser to decrypt and play the second video data according to the first decryption information in the expanded video frame structure.
  • the method before sending a signaling for opening the video to the device end for capturing the video, the method further includes:
  • the device end is authenticated according to the registration information, and the online status of the device after the authentication is passed is determined.
  • the first video data uploaded by the device is encrypted video data
  • the method before receiving the first video data uploaded by the device, the method further includes:
  • the predetermined first encryption information is sent to the device end, where the first encryption information is used by the device end to encrypt the third video data collected by the device end.
  • adding first decryption information to the expanded video frame structure includes:
  • the encrypted first encryption information is added to the network abstraction layer unit in the expanded video frame structure.
  • an embodiment of the present application provides a video playback method, which is applied to a browser side, and the method includes:
  • Receive second video data returned by the server where the second video data includes video frames and audio frames in the first video data sent by the device, and the video frames are video frames to which predetermined first decryption information is added after structural expansion, and the audio frames are audio frames encrypted by first encryption information corresponding to the first decryption information;
  • the encrypted audio frame is decrypted according to the first decryption information in the second video data, and the video is played according to the video frame and the decrypted audio frame.
  • decrypting the encrypted audio frame according to the first decryption information in the second video data includes:
  • the encrypted audio frame is decrypted according to the first decryption information.
  • the method further includes:
  • the video frame When the video frame is in an encrypted state, the video frame is decrypted using the first decryption information.
  • parsing the video frame having the extended video frame structure to obtain the first decryption information included in the video frame includes:
  • the video frame having the extended video frame structure is parsed, and the extended information of the video frame is decrypted by using predetermined second decryption information to obtain the first decryption information included in the video frame.
  • a third aspect of an embodiment of the present application provides a server, including a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein:
  • the communication unit is used to send and receive data or instructions to the browser or device;
  • the processor is used to execute the video playback method as described in any one of the first aspects.
  • a fourth aspect of an embodiment of the present application provides a browser end, comprising a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein the browser end comprises a communication unit and a processing unit, wherein:
  • the communication unit is used to send and receive data or instructions to the server;
  • the processor is used to execute the video playback method as described in any one of the second aspects.
  • a fifth aspect of the embodiment of the present application provides a video playback system, the system comprising a browser side, a server side and a device side, wherein:
  • the server is used to execute the video playback method as described in any one of the first aspects
  • the browser end is used to execute the video playback method as described in any one of the second aspects.
  • a sixth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspect or the second aspect are implemented.
  • the server when the server receives a video playback request from the browser, it sends a signal to the device to open the video, receives the first video data uploaded by the device, expands the video frame structure of the video frame in the first video data, adds the first decryption information to the expanded video frame structure, encrypts the audio frame in the first video data by the first encryption information, encapsulates the expanded video frame and the encrypted audio frame as the second video data and sends it to the browser for playback, so that when the browser plays the video, there is no need to separately call the server's interface to query the first decryption information, which fundamentally reduces one business interaction and helps to reduce the access pressure on the server.
  • the first decryption information is transmitted through the expanded video frame structure, and no additional access time is consumed, thereby reducing the delay of video playback.
  • FIG1 is a schematic diagram of a video playback system according to a method provided by an embodiment of the present application.
  • FIG2 is a schematic diagram of constructing a video playback library on a browser side provided in an embodiment of the present application
  • FIG3 is a schematic diagram of an implementation flow of a video playback method provided in an embodiment of the present application.
  • FIG4 is an extended schematic diagram of a video frame structure provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a process of implementing decryption and playback on a browser side provided in an embodiment of the present application
  • FIG6 is a schematic diagram of an interactive process of video playback provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a video playback device provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of an electronic device provided in an embodiment of the present application.
  • Fig. 1 is a schematic diagram of a video playback system of an implementation scenario of a video playback method provided in an embodiment of the present application.
  • the video playback system includes a browser end, a server end, and a device end.
  • the device end is the producer of video content, and the device end may include one or more network cameras, or other video acquisition devices, for collecting third video data.
  • the device end After the device end is started, it can automatically connect to the server end to establish a communication link between the device end and the server end.
  • the device end initiates an authentication request to the server end.
  • the server end After the server end authenticates the device end, the server end can set the authenticated device end to an online state. When the device end is in an online state, the browser end can play the video through the server end.
  • the third video data is collected in real time through the microphone and the image sensor, and the collected third video data is encoded and compressed through a predetermined encoding method, such as H264 or H265 encoding method, and then encrypted through a predetermined first encryption algorithm, such as AES (Advanced Encryption Standard) or RSA (Rivest-Shamir-Adleman).
  • the encrypted video data can be stored in the memory of the device.
  • the encrypted third video data can be uploaded to the server in real time for playback, or the unencrypted third video data can be uploaded to the server in real time for playback.
  • the server is used to coordinate data or signaling between the browser and the device so that the browser can play the third video data collected by the device.
  • the server manages the online and offline status of the device.
  • the latest first encryption information such as a key
  • the server receives a video playback request sent by the user through the browser, it notifies the device in real time to upload the first video data, expands the video frame structure in the uploaded first video data, and adds extended information to the extended video frame structure, including the first decryption information corresponding to the first encryption information.
  • the extended first video data is sent to the browser.
  • the browser side includes a terminal with a browser installed, and can play the video collected by the device side based on the installed browser request.
  • the browser side is the video playback client.
  • the user plays the video, it is responsible for pulling the encrypted second video data from the server, then parsing the second video data, obtaining the first decryption information, and decrypting the second video data, thereby realizing the video playback.
  • the browser side will implement a video playback library (videoSdk), which can be directly called by the web program without installing any plug-ins.
  • videoSdk video playback library
  • the video playback library includes two sub-libraries, namely the decryption library (videoplayer.wasm) in wasm (full name in English: WebAssembly) format, and the playback library (videoplayer.js) in js format.
  • the WebAssembly method can be used to compile programs such as video data processing module, multimedia video processing tool FFmpeg, decryption algorithm (including AES, RSA, etc.) into a video playback sub-library based on wasm format, thereby realizing core business logic such as video data decapsulation, decryption, FFmpeg soft decoding, and FMP4 (Fragmented mp4) file encapsulation.
  • the WebAssembly method can compile C/C++ programs into LLVM (Low Level Virtual Machine in English, Low Level Virtual Machine in Chinese) bytecode, a coding format that can only be understood by computers, with the characteristics of high security and fast running speed.
  • JavaScript language can be used to implement the video streaming module, MSE (Media Source Extensions) playback module, and WebGL (Web Graphics Library) playback module.
  • MSE Media Source Extensions
  • WebGL Web Graphics Library
  • the video streaming module pulls video data from the server and inputs it into videoPlayer.wasm for data processing.
  • the H.264 video frame is directly encapsulated in FMP4 mode and input into the MSE playback module for decoding and rendering.
  • FFmpeg soft decoding is required in videoPlayer.wasm, and then the decoded video data is input into the WebGL playback module for rendering.
  • the browser can decode and play the audio and video data normally, and the user can hear the sound and see the video screen.
  • FIG3 is a schematic diagram of an implementation flow of a video playback method provided in an embodiment of the present application. As shown in FIG3 , the method includes:
  • a video playback request from a browser is received, and a signaling for opening the video is sent to a device for capturing the video.
  • a step of the device registering and going online at the server may also be included.
  • Staff or users can enter device information on the server in advance, including the device serial number, etc.
  • the device When the device is started, it establishes a communication link with the server through the server access information pre-set by the device, such as a TLS (Transport Layer Security Protocol in Chinese, Hyper Text Transfer Protocol over Secure Socket Layer in English) communication link, which ensures the security of the transmission process through transmission encryption and identity authentication based on HTTP.
  • TLS Transport Layer Security Protocol in Chinese, Hyper Text Transfer Protocol over Secure Socket Layer in English
  • the device After the communication link is established, the device sends a registration package to the server, and the server authenticates the device based on the registration package. After the authentication is passed, the server sets the status of the device to the online state.
  • the server may send first encryption information to the device, including key information of encryption algorithms such as AES and RSA.
  • the encryption algorithm is a symmetric encryption algorithm
  • the first encryption information may be encryption parameters.
  • the encryption algorithm is an asymmetric encryption algorithm
  • the first encryption information may be public key information.
  • the same device may include multiple video channels.
  • different first encryption information may be configured for different video channels, including different encryption algorithms or encryption parameters. After receiving the first encryption information, the device may encrypt the corresponding video channel and respond to the server with the result information of whether the setting is successful.
  • the user can send a video playback request to the server through the browser.
  • the video playback request may include device information or video channel information.
  • the media protocol between the browser and the server can use the standard HTTP-FLV (Flash Video Over Http in English, FLASH video based on http in Chinese) transmission protocol.
  • the server After receiving the video playback request from the browser, the server will send a video opening signal through the communication link established between the device and the server (such as a TLS communication link).
  • the signal can carry information such as the channel information of the video to be opened, the server IP address, and the media port.
  • the device After the device receives the video opening signaling sent by the server, it establishes a media link (such as a TLS media link) between the device and the server through the server IP address and media port information carried in the signaling. At the same time, the device also collects the third video data in real time through the microphone and camera, compresses the video data with H264 or H265 encoding, and can also use the first encryption information sent by the server to encrypt the video frames and audio frames in the video data. After completing the encryption process, the device can upload the encrypted first video data through the established TLS media link.
  • a media link such as a TLS media link
  • the first video data uploaded by the receiving device is encrypted by using predetermined first encryption information
  • the video frame structure in the first video data is expanded
  • first decryption information is added to the expanded video frame structure, wherein the first decryption information corresponds to the first encryption information.
  • the media port of the server may expand the video frame structure of the first video data and add the first decryption information to the video frame structure.
  • the first video data may be unpacked to restore the H264/H265 video frame and the original audio frame.
  • the video frame structure can be extended to extend a NALU (Network Abstraction Layer Unit in Chinese, used to encapsulate the data provided by the video coding layer for network transmission) unit including SEI (Supplemental Enhancement Information in Chinese, which is used to provide a method for adding additional information to the video code stream and is a feature of the H264/H265 video compression standard) in front of the I frame of the original video data, and the first encryption information is added to the NALU unit body.
  • NALU Network Abstraction Layer Unit in Chinese, used to encapsulate the data provided by the video coding layer for network transmission
  • SEI Supplemental Enhancement Information in Chinese, which is used to provide a method for adding additional information to the video code stream and is a feature of the H264/H265 video compression standard
  • This method does not destroy the original frame structure of the H264/H265 video, and can use standard streaming media transmission protocols such as HTTP-FLV/HLS (Http Live Streaming in English)/RTMP (Real Time Messaging Protocol in Chinese, which is an open protocol for direct audio, video and data transmission between Flash players and servers) to distribute audio and video data.
  • HTTP-FLV/HLS Http Live Streaming in English
  • RTMP Real Time Messaging Protocol in Chinese, which is an open protocol for direct audio, video and data transmission between Flash players and servers
  • each NALU unit includes a NALU header and a NALU body.
  • SPS Sequence Parameter Set in Chinese, indicating that all information of an image sequence is included
  • PPS Picture Parameter Set in English, indicating that information of all slices of an image is included
  • basic image information are included.
  • supplementary enhancement information SEI i.e., the first encrypted information
  • the extended information i.e., the first decrypted information
  • the extended information can be re-encrypted by the predetermined second encryption information.
  • the browser receives the second video data
  • the re-encrypted first decrypted information can be decrypted based on the predetermined second decryption information to obtain the first decrypted information.
  • the expanded video frame and the encrypted audio frame are encapsulated into second video data, and the second video data is sent to the browser side.
  • the second video data is used by the browser side to decrypt and play the second video data according to the first decryption information in the extended video frame structure.
  • the unpacked video frame can be an unencrypted video frame in H264 format or H265 format, which is expanded through the video frame structure to obtain extended information and the original video frame encrypted by the first encryption information, or it can be an expanded unencrypted video frame, which is encapsulated with the encrypted audio frame as the second video data.
  • the encryption state of the video frame in the second video data may be switched according to the duration of the second video data sent to the browser.
  • the video frame in the transmitted second video data may be an unencrypted video frame, and the first decryption information may be obtained by parsing based on the second decryption information.
  • the first decryption information in the extended information may be directly obtained.
  • the video frames in the second video data are encrypted video frames.
  • the browser can decrypt the video frames and audio frames in the second video data based on the first decryption information obtained within the first predetermined time period to obtain video frames and audio frames for playback.
  • the server can distribute the encrypted audio frames and video frames with extended SEI to the browser through the TLS media link.
  • the playback library of the JS layer on the browser side can pull the audio and video streams, and can decapsulate the audio and video data through the integrated video playback library (videoSdk), and parse the SEI extension information of the video frame I frame to obtain the decryption algorithm and parameters, including the encrypted first decryption information.
  • the encrypted first decryption information can be decrypted according to the preset second decryption information to obtain the first decryption information, including information such as the encryption algorithm type and decryption parameters for decrypting the audio frame, or the audio frame and the video frame.
  • the video playback library (videoSdk) of the WASM layer can use the decryption algorithm type and decryption parameters in the parsed first decryption information to decrypt the audio frame and video frame to obtain the original audio frame data and video frame data. This includes determining whether the video frame is encrypted. If it is encrypted, decrypting it through the first decryption information to obtain a video frame that can be used for encapsulation and playback. If the video frame is an unencrypted video frame, the unencrypted video frame can be used.
  • the video playback library (videoSdk) will encapsulate the original audio and video frames in FMP4 format, and decode and play them through the browser's MSE mode.
  • the video playback library will use WebAssembly soft decoding to decode H.265 into YUV data, and then call the browser's WebGL interface for rendering, so that the browser can display the video screen and play the sound normally.
  • FIG6 is a schematic diagram of an interactive video playback provided by an embodiment of the present application, which is described in detail as follows:
  • Step 1 The user enters the device information on the server.
  • the device When the device is turned on, the device establishes a TLS communication link with the server and sends a registration package to the server.
  • the server will authenticate the device information and put the device online after the authentication is passed.
  • Step 2 The server sends the first encryption information (such as the key of the AES or RSA encryption algorithm) for encrypting the audio and video frames to the device.
  • the first encryption information such as the key of the AES or RSA encryption algorithm
  • different encryption algorithms or encryption parameters can be configured for different channels to further ensure the security of the video content.
  • the device After receiving the new first encryption information sent, the device will use the new first encryption information to encrypt the audio and video frames in the third video data, and respond to the server with the result information of whether the setting is successful.
  • Step 3 After the device is online, the user requests the server to play the video through the browser, which can carry parameters such as device information and channel information.
  • the media protocol between the browser and the server can use the standard HTTP-FLV protocol.
  • Step 4 After the server receives the video playback request sent by the user through the browser, it will send a signal to open the video through the TLS communication link established between the device and the server.
  • the signal will carry information such as channel information, server IP and media port.
  • Step 5 After the device receives the signaling from the server to open the audio and video, it establishes a TLS media link between the device and the server through the server IP and media port information carried in the signaling. At the same time, the device also collects the third video data in real time through the microphone or camera, compresses the third video data with H264 or H265 encoding, and then encrypts the third video data using the first encryption information sent by the server.
  • Step 6 The device uploads the encrypted third video data through the established TLS media link to obtain the first video data.
  • Step 7 After receiving the first video data, the media port of the server will unpack the audio frame and video frame to restore the H264/H265 video frame and the original audio frame.
  • an SEI NALU unit can be extended in front of the original video data as extended information, and the secondary encrypted key information can be added to the NALU unit body.
  • the advantage of this method is that it will not destroy the original frame structure of H264/H265, and can use standard streaming media transmission protocols such as HTTP-FLV/HLS/RTMP for audio and video data distribution.
  • HTTP-FLV/HLS/RTMP for audio and video data distribution.
  • the entire audio data can be directly encrypted.
  • Step 8 The server distributes the encrypted audio frame and the SEI-extended video frame, that is, the second video data, to the browser through the TLS media link.
  • Step 9 The browser decapsulates the second video data through the integrated video playback library videoSdk, obtains the encrypted first decryption information from the SEI extended data of the I frame, and then decrypts the encrypted first decryption information to obtain the first decryption information, that is, the original encryption algorithm type and decryption parameters.
  • Step 10 The video playback library videoSdk uses the algorithm type and decryption parameters of the parsed first decryption information to decrypt the audio frame or video frame of the second video data to obtain the original audio frame data and video frame data;
  • Step 11 For H.264 video frames, the video playback library (videoSdk) will encapsulate the original audio and video frames in FMP4 format, and decode and play them through the browser's MSE mode.
  • the video playback library For H.265 video frames, the video playback library will use WebAssembly soft decoding to decode H.265 into YUV data, and then call the browser's WebGL interface for rendering, so that the browser can display the video and play the sound normally.
  • the decryption algorithm type and decryption parameters of the first decryption information are transmitted through the extended video frame structure, including the extended I frame SEI method.
  • the browser does not need to call the server's interface separately for query, which fundamentally reduces one business interaction.
  • the decryption algorithm type and decryption parameters of the first decryption information are transmitted through the extended video frame structure, such as the extended video I frame SEI.
  • the browser does not need to call the server's interface separately for query, which fundamentally reduces one business interaction and does not consume additional access time.
  • the video playback library (videoSdk) based on the WebAssembly method has the characteristics of fast execution speed and does not cause additional performance loss, so it will not affect the playback experience.
  • TLS can be used between the device and the server for communication and uploading of audio and video data
  • HTTPS can be used between the browser and the server for communication and video data pulling, making network transmission safe and reliable.
  • the first video data uploaded by the device to the server is encrypted video data.
  • the second video data forwarded by the server to the browser is also encrypted video data. Without data decryption, the video data cannot be played even if it is captured.
  • the video playback library (videoSdk) is in the underlying virtual machine bytecode format.
  • the decryption library videoPlayer.wasm performs first decryption information restoration and video decryption playback. It is impossible to obtain the key information and video content in the first decryption information by modifying the web page source code.
  • videoPlayback library (videoSdk), which can be published together with the web program. There is no need to install other plug-ins separately.
  • videoPlayback library (videoSdk)
  • the library needs to be updated, you only need to republish the web program, which will not bring additional work costs for subsequent operation and maintenance.
  • the first encrypted information is transmitted by extending the SEI NALU unit of the I frame in the video frame structure, which will not damage the frame structure.
  • the browser and the server can still use standard streaming protocols such as HTTP-FLV, HLS, RTMP, etc., which has good versatility and scalability.
  • FIG. 7 is a schematic diagram of a video playback device applied to a server provided in an embodiment of the present application. As shown in FIG. 7 , the device includes:
  • the signaling sending unit 701 is used to receive a video playback request from a browser and send a signaling for opening the video to a device for capturing the video.
  • the expansion unit 702 is used to receive the first video data uploaded by the device end, encrypt the audio frame in the first video data by using the predetermined first encryption information, expand the video frame structure in the first video data, and add the first decryption information to the expanded video frame structure, wherein the first decryption information corresponds to the first encryption information.
  • the playback unit 703 is used to encapsulate the extended video frame and the encrypted audio frame into second video data, and send the second video data to the browser side.
  • the second video data is used by the browser side to decrypt and play the second video data according to the first decryption information in the extended video frame structure.
  • the video playing device shown in FIG. 7 corresponds to the video playing method shown in FIG. 3 .
  • the video playback device may also include a browser-based video playback device, including:
  • a request sending unit used to send a video play request to the server, wherein the video play request includes device information of the video requested to be played;
  • a second video data receiving unit is used to receive second video data returned by the server, wherein the second video data includes video frames and audio frames in the first video data sent by the device, and the video frames are video frames with predetermined first decryption information added after structural expansion, and the audio frames are audio frames encrypted by first encryption information corresponding to the first decryption information;
  • a decryption unit is used to decrypt the encrypted audio frame according to the first decryption information in the second video data, and play the video according to the video frame and the decrypted audio frame.
  • the video playback device based on the browser side corresponds to the video playback device based on the device side.
  • FIG8 is a schematic diagram of an electronic device provided in an embodiment of the present application.
  • the electronic device can be a browser side or a server side.
  • the communication unit is used to send and receive data and signaling, including the sending and receiving of data and signaling between the browser side and the server side, or between the server side and the device side.
  • the electronic device 8 of this embodiment includes: a processor 80, a communication unit and a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a video playback program.
  • the processor 80 executes the computer program 82, the steps in each of the above-mentioned video playback method embodiments are implemented.
  • the processor 80 executes the computer program 82, the functions of each module/unit in the above-mentioned device embodiments are implemented.
  • the computer program 82 may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to complete the present application.
  • the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the electronic device 8.
  • the electronic device may include, but is not limited to, a processor 80 and a memory 81.
  • FIG8 is merely an example of the electronic device 8 and does not limit the electronic device 8.
  • the electronic device may include more or fewer components than shown in the figure, or may combine certain components, or different components.
  • the electronic device may also include an input/output device, a network access device, a bus, etc.
  • the processor 80 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8.
  • the memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 8.
  • the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device.
  • the memory 81 is used to store the computer program and other programs and data required by the electronic device.
  • the memory 81 may also be used to temporarily store data that has been output or is to be output.
  • the technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration.
  • the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
  • the functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
  • the disclosed devices/terminal equipment and methods can be implemented in other ways.
  • the device/terminal equipment embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signal telecommunication signal and software distribution medium.
  • the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
  • computer-readable media do not include electric carrier signals and telecommunication signals.

Abstract

The present application relates to the field of videos, and provides a video playback method and system, and a storage medium. The method comprises: receiving a video playback request of a browser end, and sending, to a device end for capturing a video, signaling for opening the video; receiving first video data uploaded by the device end, encrypting an audio frame in the first video data by means of predetermined first encryption information, expanding a video frame structure in the first video data, and adding first decryption information to the expanded video frame structure; and sending an expanded video frame and the encrypted audio frame to the browser end, so that the browser end performs decryption and playback according to the first decryption information in the expanded video frame structure. According to the present application, a video frame structure is expanded, thereby obviating the need to separately call an interface of a service end for querying first decryption information, and facilitating the reduction of access pressure on the service end and the reduction of a video playback delay.

Description

视频播放方法、系统及存储介质Video playback method, system and storage medium 技术领域Technical Field
本申请涉及视频领域,尤其涉及视频播放方法、系统及存储介质。The present application relates to the field of video, and in particular to a video playback method, system and storage medium.
背景技术Background technique
近年来,随着计算机、大数据、图像分析和网络传输等技术的飞速发展,视频监控作为社会公共安全体系的重要构成部分,已经广泛地应用于交通、金融、公安、电力、水利、酒店等众多领域,市场规模也在逐年增长。然而在视频监控系统中,所采集的视频包含了许多个人生物特征信息和单位的机密信息。如果视频泄露,可能会导致的个人隐私泄露、商业机密泄露、不良社会影响等。在当前越来越重视网络安全和隐私安全的场景下,视频访问的安全性显得极为重要。In recent years, with the rapid development of technologies such as computers, big data, image analysis, and network transmission, video surveillance, as an important part of the social public security system, has been widely used in many fields such as transportation, finance, public security, electricity, water conservancy, and hotels, and the market size is also growing year by year. However, in the video surveillance system, the collected videos contain a lot of personal biometric information and confidential information of the unit. If the video is leaked, it may lead to the leakage of personal privacy, the leakage of commercial secrets, and adverse social impacts. In the current scenario where network security and privacy security are increasingly valued, the security of video access is extremely important.
为保证视频访问的安全性,行业内的通用解决方案是服务端对音视频数据进行加密,客户端对音视频数据进行解密播放(如果客户端为浏览器,则还需要为浏览器安装插件,比如Active插件),主要流程如下:To ensure the security of video access, the general solution in the industry is that the server encrypts the audio and video data, and the client decrypts and plays the audio and video data (if the client is a browser, you also need to install a plug-in for the browser, such as the Active plug-in). The main process is as follows:
1、用户启动用于播放视频的客户端;1. The user starts the client for playing the video;
2、客户端向服务端查询播放视频的解密信息;2. The client queries the server for decryption information of the played video;
3、服务端对客户端的访问合法性进行校验,在校验通过后,向客户端返回解密信息;3. The server verifies the legitimacy of the client's access and returns the decrypted information to the client after the verification passes;
4、客户端从服务端拉取视频流,通过解密信息对加密的音视频数据进行解密,然后对音视频数据进行解码和播放。4. The client pulls the video stream from the server, decrypts the encrypted audio and video data through the decryption information, and then decodes and plays the audio and video data.
这种方式虽然在一定程度提高了音视频数据的安全性,但是,客户端在播放视频时,浏览器需要安装插件,在播放视频时都要向服务端查询解密信息,当存在大量的用户播放视频时,容易对服务端造成极大的访问压力,影响平台的并发量,并且在向服务端发送查询解密信息的交互操作,会消耗一定的时间,导致视频画面的显示时间出现延迟,对低时延视频播放带来不好的使用体验。Although this method improves the security of audio and video data to a certain extent, when the client plays the video, the browser needs to install a plug-in, and the server must be queried for decryption information when playing the video. When there are a large number of users playing videos, it is easy to cause great access pressure on the server, affecting the concurrency of the platform. In addition, the interactive operation of sending query decryption information to the server will consume a certain amount of time, resulting in a delay in the display time of the video screen, which brings a bad user experience for low-latency video playback.
技术问题technical problem
有鉴于此,本申请实施例提供了一种视频播放方法、系统及存储介质,以解决现有技术中由于客户端在播放视频时,需要向服务端查询解密信息,对服务端造成极大的访问压力,影响平台的并发量,导致视频画面显示时间出现延迟,对低时延视频播放带来不好使用体验的问题。In view of this, the embodiments of the present application provide a video playback method, system and storage medium to solve the problem in the prior art that when playing a video, the client needs to query the server for decryption information, which causes great access pressure on the server, affects the concurrency of the platform, causes delays in the video display time, and brings a bad user experience for low-latency video playback.
技术解决方案Technical Solutions
本申请实施例的第一方面提供了一种视频播放方法,该方法应用于服务端,所述方法包括:A first aspect of an embodiment of the present application provides a video playback method, which is applied to a server, and the method includes:
接收浏览器端的视频播放请求,向用于采集视频的设备端发送打开视频的信令;Receive a video playback request from the browser, and send a signal to open the video to the device used to capture the video;
接收设备端上传的第一视频数据,通过预定的第一加密信息对所述第一视频数据中的音频帧进行加密,对所述第一视频数据中的视频帧结构进行扩展,在扩展后的所述视频帧结构中添加第一解密信息,所述第一解密信息与所述第一加密信息对应;receiving first video data uploaded by a device, encrypting an audio frame in the first video data by using predetermined first encryption information, extending a video frame structure in the first video data, and adding first decryption information to the extended video frame structure, wherein the first decryption information corresponds to the first encryption information;
将扩展后的视频帧和加密后的音频帧封装为第二视频数据,将所述第二视频数据发送至浏览器端,所述第二视频数据用于由浏览器端根据扩展的视频帧结构中的第一解密信息,对所述第二视频数据进行解密和播放。The expanded video frame and the encrypted audio frame are encapsulated into second video data, and the second video data is sent to the browser. The second video data is used by the browser to decrypt and play the second video data according to the first decryption information in the expanded video frame structure.
结合第一方面,在第一方面的第一种可能实现方式中,在向用于采集视频的设备端发送打开视频的信令之前,所述方法还包括:In combination with the first aspect, in a first possible implementation manner of the first aspect, before sending a signaling for opening the video to the device end for capturing the video, the method further includes:
建立与设备端的通信链路,通过所述通信链路接收设备端的注册信息;Establishing a communication link with the device end, and receiving registration information of the device end through the communication link;
根据所述注册信息对所述设备端进行身份认证,确定认证通过后的设备的上线状态。The device end is authenticated according to the registration information, and the online status of the device after the authentication is passed is determined.
结合第一方面,在第一方面的第二种可能实现方式中,所述设备端上传的第一视频数据为已加密的视频数据,在接收设备端上传的第一视频数据之前,所述方法还包括:In combination with the first aspect, in a second possible implementation manner of the first aspect, the first video data uploaded by the device is encrypted video data, and before receiving the first video data uploaded by the device, the method further includes:
向设备端发送所述预定的第一加密信息,所述第一加密信息用于由所述设备端对所述设备端采集的第三视频数据进行加密处理。The predetermined first encryption information is sent to the device end, where the first encryption information is used by the device end to encrypt the third video data collected by the device end.
结合第一方面,在第一方面的第三种可能实现方式中,在扩展后的所述视频帧结构中添加第一解密信息,包括:In combination with the first aspect, in a third possible implementation manner of the first aspect, adding first decryption information to the expanded video frame structure includes:
按照预定的第二加密信息,对所述第一解密信息进行加密;Encrypting the first decrypted information according to predetermined second encryption information;
在扩展后的所述视频帧结构中的网络抽象层单元中,添加已加密的所述第一加密信息。The encrypted first encryption information is added to the network abstraction layer unit in the expanded video frame structure.
第二方面,本申请实施例提供了一种视频播放方法,该方法应用于浏览器端,所述方法包括:In a second aspect, an embodiment of the present application provides a video playback method, which is applied to a browser side, and the method includes:
向服务端发送视频播放请求,所述视频播放请求包括请求播放的视频的设备信息;Sending a video playback request to the server, wherein the video playback request includes device information of the video requested to be played;
接收服务端返回的第二视频数据,所述第二视频数据包括设备端所发送的第一视频数据中的视频帧和音频帧,且所述视频帧为通过结构扩展后添加了预定的第一解密信息的视频帧,所述音频帧为通过所述第一解密信息对应的第一加密信息进行加密后的音频帧;Receive second video data returned by the server, where the second video data includes video frames and audio frames in the first video data sent by the device, and the video frames are video frames to which predetermined first decryption information is added after structural expansion, and the audio frames are audio frames encrypted by first encryption information corresponding to the first decryption information;
根据所述第二视频数据中的第一解密信息,对所述加密后的音频帧进行解密,根据所述视频帧和解密后的音频帧进行视频播放。The encrypted audio frame is decrypted according to the first decryption information in the second video data, and the video is played according to the video frame and the decrypted audio frame.
结合第二方面,在第二方面的第一种可能实现方式中,根据所述第二视频数据中的第一解密信息,对所述加密后的音频帧进行解密,包括:In combination with the second aspect, in a first possible implementation manner of the second aspect, decrypting the encrypted audio frame according to the first decryption information in the second video data includes:
通过WebAssembly编码方式编译为底层虚拟机字节码格式的解密库对所述第二视频数据进行解封装处理,得到所述第二视频数据中包括的扩展了视频帧结构的视频帧和加密后的音频帧;Decapsulating the second video data through a decryption library compiled into an underlying virtual machine bytecode format in a WebAssembly encoding manner, to obtain a video frame with an extended video frame structure and an encrypted audio frame included in the second video data;
解析所述扩展了视频帧结构的视频帧,得到所述视频帧中包括的第一解密信息;Parsing the video frame with the extended video frame structure to obtain first decryption information included in the video frame;
根据所述第一解密信息对所述加密后的音频帧进行解密。The encrypted audio frame is decrypted according to the first decryption information.
结合第二方面的第一种可能实现方式,在第二方面的第二种可能实现方式中,在得到所述视频帧中包括的第一解密信息之后,所述方法还包括:In combination with the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, after obtaining the first decryption information included in the video frame, the method further includes:
检测所述视频帧的加密状态;Detecting the encryption status of the video frame;
在所述视频帧为加密状态时,通过所述第一解密信息对所述视频帧进行解密。When the video frame is in an encrypted state, the video frame is decrypted using the first decryption information.
结合第二方面的第一种可能实现方式,在第二方面的第三种可能实现方式中,解析所述扩展了视频帧结构的视频帧,得到所述视频帧中包括的第一解密信息,包括:In combination with the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, parsing the video frame having the extended video frame structure to obtain the first decryption information included in the video frame includes:
解析所述扩展了视频帧结构的视频帧,通过预定的第二解密信息对所述视频帧的扩展信息进行解密,得到所述视频帧中包括的第一解密信息。The video frame having the extended video frame structure is parsed, and the extended information of the video frame is decrypted by using predetermined second decryption information to obtain the first decryption information included in the video frame.
本申请实施例的第三方面提供了一种服务端,包括存储器、处理器、通讯单元以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中:A third aspect of an embodiment of the present application provides a server, including a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein:
所述通讯单元用于向浏览器端或设备端收发数据或指令;The communication unit is used to send and receive data or instructions to the browser or device;
所述处理器用于执行如第一方面任一项所述视频播放方法。The processor is used to execute the video playback method as described in any one of the first aspects.
本申请实施例的第四方面提供了一种浏览器端,包括存储器、处理器、通讯单元以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述浏览器端包括通讯单元和处理单元,其中:A fourth aspect of an embodiment of the present application provides a browser end, comprising a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein the browser end comprises a communication unit and a processing unit, wherein:
所述通讯单元用于向服务端收发数据或指令;The communication unit is used to send and receive data or instructions to the server;
所述处理器用于执行如第二方面任一项所述视频播放方法。The processor is used to execute the video playback method as described in any one of the second aspects.
本申请实施例的第五方面提供了视频播放系统,所述系统包括浏览器端、服务端和设备端,其中:A fifth aspect of the embodiment of the present application provides a video playback system, the system comprising a browser side, a server side and a device side, wherein:
所述服务端用于执行如第一方面任一项所述视频播放方法;The server is used to execute the video playback method as described in any one of the first aspects;
所述浏览器端用于执行如第二方面任一项所述视频播放方法。The browser end is used to execute the video playback method as described in any one of the second aspects.
本申请实施例的第六方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面或第二方面任一项所述方法的步骤。A sixth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspect or the second aspect are implemented.
有益效果Beneficial Effects
本申请实施例与现有技术相比存在的有益效果是:本申请实施例所述的视频播放方法中,服务端在接收到浏览器端的视频播放请求时,向设备端发送打开视频的信令,接收设备端上传的第一视频数据,对第一视频数据中的视频帧进行视频帧结构扩展,在扩展后的视频帧结构中添加第一解密信息,通过第一加密信息对第一视频数据中的音频帧进行加密,将扩展后的视频帧和加密后的音频帧封装为第二视频数据发送至浏览器端播放,从而使得浏览器端播放视频时不需要单独调用服务端的接口查询第一解密信息,从根本上减少了一次业务交互,有利于减轻服务端的访问压力,并且通过扩展的视频帧结构传递第一解密信息,不会有额外的访问时间的消耗,从而能够降低视频播放的时延。The beneficial effects of the embodiments of the present application compared with the prior art are as follows: in the video playback method described in the embodiments of the present application, when the server receives a video playback request from the browser, it sends a signal to the device to open the video, receives the first video data uploaded by the device, expands the video frame structure of the video frame in the first video data, adds the first decryption information to the expanded video frame structure, encrypts the audio frame in the first video data by the first encryption information, encapsulates the expanded video frame and the encrypted audio frame as the second video data and sends it to the browser for playback, so that when the browser plays the video, there is no need to separately call the server's interface to query the first decryption information, which fundamentally reduces one business interaction and helps to reduce the access pressure on the server. In addition, the first decryption information is transmitted through the expanded video frame structure, and no additional access time is consumed, thereby reducing the delay of video playback.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
图1是本申请实施例提供的方法的一种视频播放系统示意图;FIG1 is a schematic diagram of a video playback system according to a method provided by an embodiment of the present application;
图2是本申请实施例提供的一种浏览器端的视频播放库构建示意图;FIG2 is a schematic diagram of constructing a video playback library on a browser side provided in an embodiment of the present application;
图3是本申请实施例提供的一种视频播放方法的实现流程示意图;FIG3 is a schematic diagram of an implementation flow of a video playback method provided in an embodiment of the present application;
图4是本申请实施例提供的一种视频帧结构的扩展示意图;FIG4 is an extended schematic diagram of a video frame structure provided in an embodiment of the present application;
图5是本申请实施例提供的一种浏览器端实现解密播放的流程示意图;FIG5 is a schematic diagram of a process of implementing decryption and playback on a browser side provided in an embodiment of the present application;
图6为本申请实施例提供的一种视频播放的交互流程示意图;FIG6 is a schematic diagram of an interactive process of video playback provided in an embodiment of the present application;
图7为本申请实施例提供的一种视频播放装置的示意图;FIG7 is a schematic diagram of a video playback device provided in an embodiment of the present application;
图8是本申请实施例提供的电子设备的示意图。FIG8 is a schematic diagram of an electronic device provided in an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
图1为本申请实施例提供的一种视频播放方法的实施场景的视频播放系统的示意图。如图1所示,该视频播放系统包括浏览器端、服务端和设备端。Fig. 1 is a schematic diagram of a video playback system of an implementation scenario of a video playback method provided in an embodiment of the present application. As shown in Fig. 1, the video playback system includes a browser end, a server end, and a device end.
其中,设备端是视频内容的生产者,设备端可以包括一个或者多网络摄像头,或者其它视频采集设备,用于采集第三视频数据。在设备端启动后,可以自动连接至服务端,建立设备端与服务端之间的通信链路。设备端向服务端发起认证请求,在服务端通过对设备端的认证后,服务端可以将通过认证的设备端设置为上线状态。当设备端处于上线状态时,浏览器端可以通过服务端播放视频。Among them, the device end is the producer of video content, and the device end may include one or more network cameras, or other video acquisition devices, for collecting third video data. After the device end is started, it can automatically connect to the server end to establish a communication link between the device end and the server end. The device end initiates an authentication request to the server end. After the server end authenticates the device end, the server end can set the authenticated device end to an online state. When the device end is in an online state, the browser end can play the video through the server end.
设备端正常启动时,会通过麦克风和图像传感器实时采集第三视频数据,通过预定的编码方法,比如H264或H265编码方法对采集的第三视频数据进行编码压缩,然后可以通过预定的第一加密算法,比如通过AES(英文全称为Advanced Encryption Standard,中文全称为高级加密标准)或RSA(英文全称为Rivest-Shamir-Adleman)等加密算法进行加密。可以将加密的视频数据存储在设备端的存储器中。当用户通过浏览器端请求播放视频时,可以将加密的第三视频数据实时上传至服务端进行播放,或者也可以将未加密的第三视频数据实时上传至服务端进行播放。When the device is started normally, the third video data is collected in real time through the microphone and the image sensor, and the collected third video data is encoded and compressed through a predetermined encoding method, such as H264 or H265 encoding method, and then encrypted through a predetermined first encryption algorithm, such as AES (Advanced Encryption Standard) or RSA (Rivest-Shamir-Adleman). The encrypted video data can be stored in the memory of the device. When the user requests to play the video through the browser, the encrypted third video data can be uploaded to the server in real time for playback, or the unencrypted third video data can be uploaded to the server in real time for playback.
服务端用于协调浏览器端和设备端之间数据或信令,以使得浏览器端可以播放设备端所采集的第三视频数据。服务端在协调设备端时,包括管理设备端的上下线状态。在设备端上线时,向上线的设备端发送最新的第一加密信息,比如密钥等。服务端在协调浏览器端时,如果接收到用户通过浏览器端发送的视频播放请求,则实时通知设备端上传第一视频数据,对上传的第一视频数据中的视频帧结构进行扩展,在扩展后的视频帧结构中添加扩展信息,包括如第一加密信息对应的第一解密信息。将扩展后的第一视频数据发送至浏览器端。The server is used to coordinate data or signaling between the browser and the device so that the browser can play the third video data collected by the device. When coordinating with the device, the server manages the online and offline status of the device. When the device is online, the latest first encryption information, such as a key, is sent to the online device. When coordinating with the browser, if the server receives a video playback request sent by the user through the browser, it notifies the device in real time to upload the first video data, expands the video frame structure in the uploaded first video data, and adds extended information to the extended video frame structure, including the first decryption information corresponding to the first encryption information. The extended first video data is sent to the browser.
浏览器端包括安装有浏览器的终端,可基于所安装的浏览器请求播放设备端所采集的视频。浏览器端是视频的播放客户端。当用户播放视频时,负责从服务端拉取加密的第二视频数据,然后对第二视频数据进行解析,获得第一解密信息,对第二视频数据进行解密,从而实现视频的播放。The browser side includes a terminal with a browser installed, and can play the video collected by the device side based on the installed browser request. The browser side is the video playback client. When the user plays the video, it is responsible for pulling the encrypted second video data from the server, then parsing the second video data, obtaining the first decryption information, and decrypting the second video data, thereby realizing the video playback.
为实现浏览器端无插件音视频播放,浏览器端将实现视频播放库(videoSdk),该库可以直接被网页程序所调用,不安装任何插件。如图2所示,在视频播放库中,包括两个子库,分别为wasm(英文全称为WebAssembly)格式的解密库(videoplayer.wasm),以及js格式的播放库(videoplayer.js)。In order to achieve plug-in-free audio and video playback on the browser side, the browser side will implement a video playback library (videoSdk), which can be directly called by the web program without installing any plug-ins. As shown in Figure 2, the video playback library includes two sub-libraries, namely the decryption library (videoplayer.wasm) in wasm (full name in English: WebAssembly) format, and the playback library (videoplayer.js) in js format.
其中,对于wasm格式的视频播放子库,可以采用WebAssembly方法,将视频数据处理模块、多媒体视频处理工具FFmpeg、解密算法(包括如AES、RSA等)等程序编译成基于wasm格式的视频播放子库,从而实现视频数据的解封装、解密、FFmpeg软解码以及FMP4(英文全称为Fragmented mp4)文件封装等核心业务逻辑。WebAssembly方法能够将C/C++程序编译成LLVM(英文全称为Low Level Virtual Machine,中文全称为底层虚拟机)字节码,一种只能被计算机理解的编码格式,具有安全性高和运行速度快等特点。Among them, for the video playback sub-library in wasm format, the WebAssembly method can be used to compile programs such as video data processing module, multimedia video processing tool FFmpeg, decryption algorithm (including AES, RSA, etc.) into a video playback sub-library based on wasm format, thereby realizing core business logic such as video data decapsulation, decryption, FFmpeg soft decoding, and FMP4 (Fragmented mp4) file encapsulation. The WebAssembly method can compile C/C++ programs into LLVM (Low Level Virtual Machine in English, Low Level Virtual Machine in Chinese) bytecode, a coding format that can only be understood by computers, with the characteristics of high security and fast running speed.
对于js格式的播放库,可以采用JavaScript语言实现视频拉流模块和MSE(英文全称为Media Source Extensions,中文全称为媒体源扩展)播放模块和WebGL(英文全称为Web Graphics Library,中文全称为Web给力库)播放模块,用户请求视频时,通过视频拉流模块从服务端拉取视频数据,并输入到videoPlayer.wasm中进行数据处理,对于H.264视频帧直接进行FMP4模式封装,输入到MSE播放模块中进行解码和渲染,对于H.265视频帧,则需要在videoPlayer.wasm中进行FFmpeg软解码,然后将解码后的视频数据输入到WebGL播放模块中进行渲染,最后浏览器便能够正常解码和播放音视频数据,用户便能够听见声音和看到视频画面。For the playback library in js format, JavaScript language can be used to implement the video streaming module, MSE (Media Source Extensions) playback module, and WebGL (Web Graphics Library) playback module. When a user requests a video, the video streaming module pulls video data from the server and inputs it into videoPlayer.wasm for data processing. The H.264 video frame is directly encapsulated in FMP4 mode and input into the MSE playback module for decoding and rendering. For H.265 video frames, FFmpeg soft decoding is required in videoPlayer.wasm, and then the decoded video data is input into the WebGL playback module for rendering. Finally, the browser can decode and play the audio and video data normally, and the user can hear the sound and see the video screen.
图3为本申请实施例提供的一种视频播放方法的实现流程示意图,如图3所示,该方法包括:FIG3 is a schematic diagram of an implementation flow of a video playback method provided in an embodiment of the present application. As shown in FIG3 , the method includes:
在S301中,接收浏览器端的视频播放请求,向用于采集视频的设备端发送打开视频的信令。In S301, a video playback request from a browser is received, and a signaling for opening the video is sent to a device for capturing the video.
在可能的实现方式中,在服务端接收浏览器端的视频手语请求之前,还可以包括设备端在服务端注册上线的步骤。In a possible implementation, before the server receives the video sign language request from the browser, a step of the device registering and going online at the server may also be included.
工作人员或者用户可以预先在服务端录入设备端信息,包括设备端的序列号等。当设备端启动时,通过设备端预先设定的服务端访问信息,与服务端建立通信链路,比如可以为TLS(中文全称为传输层安全性协议,英文全称为Hyper Text Transfer Protocol over SecureSocket Layer)通信链路,在HTTP的基础上通过传输加密和身份认证保证了传输过程的安全性。Staff or users can enter device information on the server in advance, including the device serial number, etc. When the device is started, it establishes a communication link with the server through the server access information pre-set by the device, such as a TLS (Transport Layer Security Protocol in Chinese, Hyper Text Transfer Protocol over Secure Socket Layer in English) communication link, which ensures the security of the transmission process through transmission encryption and identity authentication based on HTTP.
在建立通信链路后,设备端向服务端发送注册包,服务端根据注册包对设备端进行身份认证。在认证通过后,服务端将该设备端的状态设置为上线状态。After the communication link is established, the device sends a registration package to the server, and the server authenticates the device based on the registration package. After the authentication is passed, the server sets the status of the device to the online state.
为了确定服务端与设备端之间传输的第一视频数据的安全性,在建立通信链路后,服务端可以向设备端发送第一加密信息,包括如AES、RSA等加密算法的密钥信息。当加密算法为对称加密算法时,第一加密信息可以为加密参数。当加密算法为非对称加密算法时,第一加密信息可以为公钥信息。In order to determine the security of the first video data transmitted between the server and the device, after establishing the communication link, the server may send first encryption information to the device, including key information of encryption algorithms such as AES and RSA. When the encryption algorithm is a symmetric encryption algorithm, the first encryption information may be encryption parameters. When the encryption algorithm is an asymmetric encryption algorithm, the first encryption information may be public key information.
在可能的实现方式中,同一个设备端可能包括多个视频通道,为了进一步保证视频内容的安全性,可以给不同的视频通道配置不同的第一加密信息,包括如不同的加密算法或加密参数。设备端收到下发的第一加密信息后,可以对相应的视频通道进行加密,并向服务端应答设置是否成功的结果信息。In a possible implementation, the same device may include multiple video channels. To further ensure the security of the video content, different first encryption information may be configured for different video channels, including different encryption algorithms or encryption parameters. After receiving the first encryption information, the device may encrypt the corresponding video channel and respond to the server with the result information of whether the setting is successful.
设备端上线后,用户可以通过浏览器端向服务端发送视频播放请求。该视频播放请求可以包括设备端信息,或者还可以包括视频通道信息。浏览器端与服务端的媒体协议可以采用标准的HTTP-FLV(英文全称为Flash Video Over Http,中文全称为基于http的FLASH视频)传输协议。After the device is online, the user can send a video playback request to the server through the browser. The video playback request may include device information or video channel information. The media protocol between the browser and the server can use the standard HTTP-FLV (Flash Video Over Http in English, FLASH video based on http in Chinese) transmission protocol.
服务端收到浏览器端的视频播放请求后,会通过设备端与服务端建立的通信链路(比如TLS通信链路)下发打开视频信令,在信令中可以携带需要打开的视频所在通道信息、服务端IP地址和媒体端口等信息。After receiving the video playback request from the browser, the server will send a video opening signal through the communication link established between the device and the server (such as a TLS communication link). The signal can carry information such as the channel information of the video to be opened, the server IP address, and the media port.
设备端收到服务端下发的打开视频信令后,通过信令中携带的服务器IP地址和媒体端口信息,建立设备端与服务端之间的媒体链路(比如TLS媒体链路)。与此同时,设备端也在实时通过麦克风和摄像头实时采集第三视频数据,对视频数据进行H264或者H265编码压缩,还可以使用服务端下发的第一加密信息对视频数据中的视频帧和音频帧进行加密处理。在完成加密处理后,设备端可以通过建立的TLS媒体链路上传加密后的第一视频数据。After the device receives the video opening signaling sent by the server, it establishes a media link (such as a TLS media link) between the device and the server through the server IP address and media port information carried in the signaling. At the same time, the device also collects the third video data in real time through the microphone and camera, compresses the video data with H264 or H265 encoding, and can also use the first encryption information sent by the server to encrypt the video frames and audio frames in the video data. After completing the encryption process, the device can upload the encrypted first video data through the established TLS media link.
在S302中,接收设备端上传的第一视频数据,通过预定的第一加密信息对所述第一视频数据中的音频帧进行加密,对所述第一视频数据中的视频帧结构进行扩展,在扩展后的所述视频帧结构中添加第一解密信息,所述第一解密信息与所述第一加密信息对应。In S302, the first video data uploaded by the receiving device is encrypted by using predetermined first encryption information, the video frame structure in the first video data is expanded, and first decryption information is added to the expanded video frame structure, wherein the first decryption information corresponds to the first encryption information.
服务端的媒体端口收到第一视频数据后,可以对第一视频数据进行视频帧结构扩展,在视频帧结构中添加第一解密信息。After receiving the first video data, the media port of the server may expand the video frame structure of the first video data and add the first decryption information to the video frame structure.
其中,当第一视频数据为加密的第一视频数据时,可以对第一视频数据进行拆包处理,还原H264/H265视频帧和原始音频帧。When the first video data is encrypted first video data, the first video data may be unpacked to restore the H264/H265 video frame and the original audio frame.
对于视频帧中的I帧,可以通过视频帧结构扩展,在原始视频数据的I帧前面扩展一个包括SEI(中文全称为补充增强信息,英文全称为Supplemental Enhancement Information,用于提供向视频码流中添加额外信息的方法,是H264/H265视频压缩标准的一种特性)的NALU(中文全称为网络抽象单元,英文全称为Network Abstraction Layer Unit,用于将视频编码层提供的数据进行封装,应用于网络传输)单元的扩展信息,在NALU单元主体中添加第一加密信息,这种方式不会破坏H264/H265视频的原始帧结构,能够使用标准的HTTP-FLV/HLS(英文全称为Http Live Streaming)/RTMP(中文全称为实时消息传输协议,英文全称为Real Time Messaging Protocol,是一种Flash播放器和服务器直接音频、视频和数据传输的开放协议)等流媒体传输协议进行音视频数据分发,对于第一视频数据中的音频帧,可以直接通过第一加密信息对音频帧进行加密。For the I frame in the video frame, the video frame structure can be extended to extend a NALU (Network Abstraction Layer Unit in Chinese, used to encapsulate the data provided by the video coding layer for network transmission) unit including SEI (Supplemental Enhancement Information in Chinese, which is used to provide a method for adding additional information to the video code stream and is a feature of the H264/H265 video compression standard) in front of the I frame of the original video data, and the first encryption information is added to the NALU unit body. This method does not destroy the original frame structure of the H264/H265 video, and can use standard streaming media transmission protocols such as HTTP-FLV/HLS (Http Live Streaming in English)/RTMP (Real Time Messaging Protocol in Chinese, which is an open protocol for direct audio, video and data transmission between Flash players and servers) to distribute audio and video data. For the audio frame in the first video data, the audio frame can be directly encrypted by the first encryption information.
如图4所示为本申请实施例提供的一种扩展后的视频帧结构示意图,每个NALU单元包括NALU头部和NALU主体,在扩展前的视频数据中NALU单元中的NALU主体中,包括SPS(英文全称为Sequence Parameter Set,中文全称为序列参数集,表示包含了一个图像序列的所有信息)、PPS(中文全称为图像参数集,英文全称为Picture Parameter Set,表示包含了一个图像所有片的信息)和基本图像等信息等。在扩展的NALU单元的NALU主体中,包括补充增强信息SEI,即第一加密信息。As shown in FIG4, a schematic diagram of an extended video frame structure provided by an embodiment of the present application, each NALU unit includes a NALU header and a NALU body. In the NALU body of the NALU unit in the video data before extension, SPS (Sequence Parameter Set in English, Sequence Parameter Set in Chinese, indicating that all information of an image sequence is included), PPS (Picture Parameter Set in Chinese, Picture Parameter Set in English, indicating that information of all slices of an image is included) and basic image information are included. In the NALU body of the extended NALU unit, supplementary enhancement information SEI, i.e., the first encrypted information, is included.
为了确定扩展信息的安全性,可以通过预先确定的第二加密信息对扩展信息,即第一解密信息进行二次加密。当浏览器端接收到第二视频数据时,可以基于预先确定的第二解密信息,对二次加密的第一解密信息进行解密,得到第一解密信息。In order to ensure the security of the extended information, the extended information, i.e., the first decrypted information, can be re-encrypted by the predetermined second encryption information. When the browser receives the second video data, the re-encrypted first decrypted information can be decrypted based on the predetermined second decryption information to obtain the first decrypted information.
在S303中,将扩展后的视频帧和加密后的音频帧封装为第二视频数据,将所述第二视频数据发送至浏览器端,所述第二视频数据用于由浏览器端根据扩展的视频帧结构中的第一解密信息,对所述第二视频数据进行解密和播放。In S303, the expanded video frame and the encrypted audio frame are encapsulated into second video data, and the second video data is sent to the browser side. The second video data is used by the browser side to decrypt and play the second video data according to the first decryption information in the extended video frame structure.
在可能的实现方式中,拆包后的视频帧可以为H264格式或H265格式的未加密的视频帧,通过视频帧结构扩展后,得到扩展信息和通过第一加密信息进行加密的原始视频帧,或者也可以为扩展后的未加密的视频帧,与加密后的音频帧封装为第二视频数据。In a possible implementation, the unpacked video frame can be an unencrypted video frame in H264 format or H265 format, which is expanded through the video frame structure to obtain extended information and the original video frame encrypted by the first encryption information, or it can be an expanded unencrypted video frame, which is encapsulated with the encrypted audio frame as the second video data.
或者,可以根据向浏览器端发送的第二视频数据的时长,切换第二视频数据中的视频帧的加密状态。比如,可以在开始传输第二视频数据的第一预定时长内,所传输的第二视频数据中,视频帧为未加密的视频帧,可以基于第二解密信息,解析得到第一解密信息。或者,可以直接获得扩展信息中的第一解密信息。Alternatively, the encryption state of the video frame in the second video data may be switched according to the duration of the second video data sent to the browser. For example, within the first predetermined duration of the start of the transmission of the second video data, the video frame in the transmitted second video data may be an unencrypted video frame, and the first decryption information may be obtained by parsing based on the second decryption information. Alternatively, the first decryption information in the extended information may be directly obtained.
在经过第一预定时长后,第二视频数据中的视频帧为加密的视频帧,浏览器端可以基于第一预定时长内所获取的第一解密信息,对第二视频数据中的视频帧和音频帧进行解密,获得用于播放的视频帧和音频帧。After the first predetermined time period, the video frames in the second video data are encrypted video frames. The browser can decrypt the video frames and audio frames in the second video data based on the first decryption information obtained within the first predetermined time period to obtain video frames and audio frames for playback.
服务端可以将加密后的音频帧和扩展SEI的视频帧通过TLS媒体链路分发给浏览器端。The server can distribute the encrypted audio frames and video frames with extended SEI to the browser through the TLS media link.
在可能的实现方式中,如图5所示的浏览器端的视频处理流程示意图中,浏览器端的JS层的播放库可以拉取音视频流,可以通过集成的视频播放库(videoSdk)对音视频数据进行解封装,从视频帧I帧的SEI扩展信息中解析获取解密算法和参数,包括加密后的第一解密信息。在获取第一解密信息时,可以根据预先设定的第二解密信息对加密后的第一解密信息进行解密,获取第一解密信息,包括对音频帧,或者音频帧和视频帧进行解密的加密算法类型和解密参数等信息。In a possible implementation, as shown in the schematic diagram of the video processing flow on the browser side in FIG5 , the playback library of the JS layer on the browser side can pull the audio and video streams, and can decapsulate the audio and video data through the integrated video playback library (videoSdk), and parse the SEI extension information of the video frame I frame to obtain the decryption algorithm and parameters, including the encrypted first decryption information. When obtaining the first decryption information, the encrypted first decryption information can be decrypted according to the preset second decryption information to obtain the first decryption information, including information such as the encryption algorithm type and decryption parameters for decrypting the audio frame, or the audio frame and the video frame.
WASM层的视频播放库(videoSdk)可以用解析的第一解密信息中的解密算法类型和解密参数对音频帧和视频帧进行解密处理,获取原始的音频帧数据和视频帧数据。包括如判断视频帧是否加密,如果加密,则通过第一解密信息进行解密获得可用于封装播放的视频帧,如果视频帧为未加密的视频帧,则可以将未加密的视频帧。The video playback library (videoSdk) of the WASM layer can use the decryption algorithm type and decryption parameters in the parsed first decryption information to decrypt the audio frame and video frame to obtain the original audio frame data and video frame data. This includes determining whether the video frame is encrypted. If it is encrypted, decrypting it through the first decryption information to obtain a video frame that can be used for encapsulation and playback. If the video frame is an unencrypted video frame, the unencrypted video frame can be used.
对于H.264视频帧,视频播放库(videoSdk)将采用FMP4格式对原始音频帧和视频帧进行封装处理,通过浏览器的MSE模式进行解码和播放。对于H.265视频帧,视频播放库会使用WebAssembly软解码的方式将H.265解码为YUV数据,然后调用浏览器的WebGL接口进行渲染,浏览器便能够正常显示视频画面和播放声音。For H.264 video frames, the video playback library (videoSdk) will encapsulate the original audio and video frames in FMP4 format, and decode and play them through the browser's MSE mode. For H.265 video frames, the video playback library will use WebAssembly soft decoding to decode H.265 into YUV data, and then call the browser's WebGL interface for rendering, so that the browser can display the video screen and play the sound normally.
图6为本申请实施例提供的一种视频播放的交互示意图,详述如下:FIG6 is a schematic diagram of an interactive video playback provided by an embodiment of the present application, which is described in detail as follows:
第一步:用户在服务端录入设备端信息。设备端开机启动时,设备端建立与服务端的TLS通信链路,并发送注册包至服务端。服务端会对设备信息进行身份认证,认证通过后会将设备端置为上线状态。Step 1: The user enters the device information on the server. When the device is turned on, the device establishes a TLS communication link with the server and sends a registration package to the server. The server will authenticate the device information and put the device online after the authentication is passed.
第二步:服务端向设备端下发对音频帧和视频帧加密的第一加密信息(例如AES、RSA加密算法的密钥)。当一个设备支持多个摄像头通道时,为了进一步保证视频内容安全性,可以给不同的通道配置不同的加密算法或者加密参数。设备端收到下发的新的第一加密信息后,会使用新的第一加密信息对第三视频数据中的音频帧和视频帧进行加密处理,并向服务端应答设置是否成功的结果信息。Step 2: The server sends the first encryption information (such as the key of the AES or RSA encryption algorithm) for encrypting the audio and video frames to the device. When a device supports multiple camera channels, different encryption algorithms or encryption parameters can be configured for different channels to further ensure the security of the video content. After receiving the new first encryption information sent, the device will use the new first encryption information to encrypt the audio and video frames in the third video data, and respond to the server with the result information of whether the setting is successful.
第三步:设备上线后,用户通过浏览器端向服务端请求播放视频,可以携带请求的设备信息和通道信息等参数,浏览器端和服务端之间的媒体协议可采用标准的HTTP-FLV协议。Step 3: After the device is online, the user requests the server to play the video through the browser, which can carry parameters such as device information and channel information. The media protocol between the browser and the server can use the standard HTTP-FLV protocol.
第四步:服务端收到用户通过浏览器端发送的视频播放请求后,会通过设备端与服务端建立的TLS通信链路下发打开视频的信令,在信令中会携带通道信息、服务端IP和媒体端口等信息。Step 4: After the server receives the video playback request sent by the user through the browser, it will send a signal to open the video through the TLS communication link established between the device and the server. The signal will carry information such as channel information, server IP and media port.
第五步:设备端收到服务端下发的打开音视频的信令后,通过信令中携带的服务器IP和媒体端口信息建立设备与服务端之间的TLS媒体链路。与此同时,设备端也在实时通过麦克风或者摄像头实时采集第三视频数据,对第三视频数据进行H264或者H265编码压缩,然后使用服务端下发的第一加密信息对第三视频数据进行加密处理。Step 5: After the device receives the signaling from the server to open the audio and video, it establishes a TLS media link between the device and the server through the server IP and media port information carried in the signaling. At the same time, the device also collects the third video data in real time through the microphone or camera, compresses the third video data with H264 or H265 encoding, and then encrypts the third video data using the first encryption information sent by the server.
第六步:设备端通过建立的TLS媒体链路上传加密后的第三视频数据,得到第一视频数据。Step 6: The device uploads the encrypted third video data through the established TLS media link to obtain the first video data.
第七步:服务端的媒体端口收到第一视频数据后,将会进行音频帧和视频帧的拆包处理,还原H264/H265视频帧和原始音频帧。在视频帧结构扩展中,可以针对每一个I帧,在原始视频数据前面扩展一个SEI NALU单元作为扩展信息,在NALU单元主体中添加已二次加密的秘钥信息,这种方式的好处在于不会破坏H264/H265原始帧结构,能够使用标准的HTTP-FLV/HLS/RTMP等流媒体传输协议进行音视频数据分发,对于每一个音频帧,直接对整个音频数据进行加密即可。Step 7: After receiving the first video data, the media port of the server will unpack the audio frame and video frame to restore the H264/H265 video frame and the original audio frame. In the video frame structure extension, for each I frame, an SEI NALU unit can be extended in front of the original video data as extended information, and the secondary encrypted key information can be added to the NALU unit body. The advantage of this method is that it will not destroy the original frame structure of H264/H265, and can use standard streaming media transmission protocols such as HTTP-FLV/HLS/RTMP for audio and video data distribution. For each audio frame, the entire audio data can be directly encrypted.
第八步:服务端将加密后的音频帧和扩展SEI的视频帧,即第二视频数据通过TLS媒体链路分发给浏览器端。Step 8: The server distributes the encrypted audio frame and the SEI-extended video frame, that is, the second video data, to the browser through the TLS media link.
第九步:浏览器端通过集成的视频播放库videoSdk对第二视频数据进行解封装,从I帧的SEI扩展数据中获取加密后的第一解密信息信息,然后对加密后的第一解密信息进行解密,获取第一解密信息,即原始的加密算法类型和解密参数。Step 9: The browser decapsulates the second video data through the integrated video playback library videoSdk, obtains the encrypted first decryption information from the SEI extended data of the I frame, and then decrypts the encrypted first decryption information to obtain the first decryption information, that is, the original encryption algorithm type and decryption parameters.
第十步:视频播放库videoSdk用解析的第一解密信息的算法类型和解密参数对第二视频数据的音频帧,或者视频帧进行解密处理,获取原始的音频帧数据和视频帧数据;Step 10: The video playback library videoSdk uses the algorithm type and decryption parameters of the parsed first decryption information to decrypt the audio frame or video frame of the second video data to obtain the original audio frame data and video frame data;
第十一步:对于H.264视频帧,视频播放库(videoSdk)将采用FMP4格式对原始音频帧和视频帧进行封装处理,通过浏览器的MSE模式进行解码和播放。对于H.265视频帧,视频播放库会使用WebAssembly软解码的方式将H.265解码为YUV数据,然后调用浏览器的WebGL接口进行渲染,浏览器便能够正常显示视频画面和播放声音。Step 11: For H.264 video frames, the video playback library (videoSdk) will encapsulate the original audio and video frames in FMP4 format, and decode and play them through the browser's MSE mode. For H.265 video frames, the video playback library will use WebAssembly soft decoding to decode H.265 into YUV data, and then call the browser's WebGL interface for rendering, so that the browser can display the video and play the sound normally.
本申请实施例可以取得以下几方面的效果:The embodiments of the present application can achieve the following effects:
(1)降低了高并发场景下服务端的访问压力。(1) Reduces the access pressure on the server in high-concurrency scenarios.
第一解密信息的解密算法类型和解密参数通过扩展视频帧结构,包括如扩展I帧SEI的方式进行传递,浏览器端不需要单独调用服务端的接口进行查询,从根本上减少了一次业务交互,第三视频数据加密后不会对服务端造成额外的访问压力。The decryption algorithm type and decryption parameters of the first decryption information are transmitted through the extended video frame structure, including the extended I frame SEI method. The browser does not need to call the server's interface separately for query, which fundamentally reduces one business interaction. Third, after the video data is encrypted, it will not cause additional access pressure on the server.
(2)降低了视频首屏播放延迟。(2) Reduced the delay in first-screen video playback.
第一解密信息的解密算法类型和解密参数通过扩展视频帧结构,比如扩展视频I帧SEI的方式进行传递,浏览器端不需要单独调用服务端的接口进行查询,从根本上减少了一次业务交互,不会有额外的访问时间消耗。The decryption algorithm type and decryption parameters of the first decryption information are transmitted through the extended video frame structure, such as the extended video I frame SEI. The browser does not need to call the server's interface separately for query, which fundamentally reduces one business interaction and does not consume additional access time.
与此同时,基于WebAssembly方法的视频播放库(videoSdk)具备执行速度快的特点,不会带来额外的性能损耗,因此不会对播放体验造成影响。At the same time, the video playback library (videoSdk) based on the WebAssembly method has the characteristics of fast execution speed and does not cause additional performance loss, so it will not affect the playback experience.
(3)安全性高。(3) High security.
在数据传输方面,设备端和服务端之间可以采用TLS方式进行通信和音视频数据上传,浏览器端与服务端可以采用HTTPS进行通信和视频数据拉取,网络传输安全可靠。In terms of data transmission, TLS can be used between the device and the server for communication and uploading of audio and video data, and HTTPS can be used between the browser and the server for communication and video data pulling, making network transmission safe and reliable.
在数据内容方面,设备端上传到服务端的第一视频数据是经过加密处理的视频数据。服务端转发给浏览器端的第二视频数据也是经过加密处理的视频数据,没有经过数据解密即使捕获到视频数据也无法播放。In terms of data content, the first video data uploaded by the device to the server is encrypted video data. The second video data forwarded by the server to the browser is also encrypted video data. Without data decryption, the video data cannot be played even if it is captured.
在视频播放方面,视频播放库(videoSdk)是在底层虚拟机字节码格式,比如解密库videoPlayer.wasm中进行第一解密信息还原和视频解密播放,无法通过修改网页源码的方式获取第一解密信息中的秘钥信息和视频内容。In terms of video playback, the video playback library (videoSdk) is in the underlying virtual machine bytecode format. For example, the decryption library videoPlayer.wasm performs first decryption information restoration and video decryption playback. It is impossible to obtain the key information and video content in the first decryption information by modifying the web page source code.
(3)浏览器端不需要插件,有利于降低运维成本。(3) No plug-ins are required on the browser side, which helps reduce operation and maintenance costs.
浏览器端播放视频时只需要集成视频播放库(videoSdk),能够和网页程序一起发布,不需要单独安装其它的插件,当库需要更新时,只需要重新发布网页程序即可,不会对后期运营维护带来额外的工作成本。When playing videos on the browser, you only need to integrate the video playback library (videoSdk), which can be published together with the web program. There is no need to install other plug-ins separately. When the library needs to be updated, you only need to republish the web program, which will not bring additional work costs for subsequent operation and maintenance.
(4)不会破坏流媒体传输协议的标准性,扩展性好。(4) It will not destroy the standardization of the streaming media transmission protocol and has good scalability.
通过扩展视频帧结构中的I帧的SEI NALU单元的方式传递第一加密信息,不会对帧结构造成破坏,浏览器端和服务端之间仍然可以使用标准的HTTP-FLV、HLS、RTMP等流媒体协议,具备良好的通用性和扩展性。The first encrypted information is transmitted by extending the SEI NALU unit of the I frame in the video frame structure, which will not damage the frame structure. The browser and the server can still use standard streaming protocols such as HTTP-FLV, HLS, RTMP, etc., which has good versatility and scalability.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
图7为本申请实施例提供的一种应用于服务端的视频播放装置的示意图,如图7所示,该装置包括:FIG. 7 is a schematic diagram of a video playback device applied to a server provided in an embodiment of the present application. As shown in FIG. 7 , the device includes:
信令发送单元701,用于接收浏览器端的视频播放请求,向用于采集视频的设备端发送打开视频的信令。The signaling sending unit 701 is used to receive a video playback request from a browser and send a signaling for opening the video to a device for capturing the video.
扩展单元702,用于接收设备端上传的第一视频数据,通过预定的第一加密信息对所述第一视频数据中的音频帧进行加密,对所述第一视频数据中的视频帧结构进行扩展,在扩展后的所述视频帧结构中添加第一解密信息,所述第一解密信息与所述第一加密信息对应。The expansion unit 702 is used to receive the first video data uploaded by the device end, encrypt the audio frame in the first video data by using the predetermined first encryption information, expand the video frame structure in the first video data, and add the first decryption information to the expanded video frame structure, wherein the first decryption information corresponds to the first encryption information.
播放单元703,用于将扩展后的视频帧和加密后的音频帧封装为第二视频数据,将所述第二视频数据发送至浏览器端,所述第二视频数据用于由浏览器端根据扩展的视频帧结构中的第一解密信息,对所述第二视频数据进行解密和播放。The playback unit 703 is used to encapsulate the extended video frame and the encrypted audio frame into second video data, and send the second video data to the browser side. The second video data is used by the browser side to decrypt and play the second video data according to the first decryption information in the extended video frame structure.
图7所示的视频播放装置,与图3所示的视频播放方法对应。The video playing device shown in FIG. 7 corresponds to the video playing method shown in FIG. 3 .
在可能的实现方式中,视频播放装置还可以包括基于浏览器端的视频播放装置,包括:In a possible implementation, the video playback device may also include a browser-based video playback device, including:
请求发送单元,用于向服务端发送视频播放请求,所述视频播放请求包括请求播放的视频的设备信息;A request sending unit, used to send a video play request to the server, wherein the video play request includes device information of the video requested to be played;
第二视频数据接收单元,用于接收服务端返回的第二视频数据,所述第二视频数据包括设备端所发送的第一视频数据中的视频帧和音频帧,且所述视频帧为通过结构扩展后添加了预定的第一解密信息的视频帧,所述音频帧为通过所述第一解密信息对应的第一加密信息进行加密后的音频帧;A second video data receiving unit is used to receive second video data returned by the server, wherein the second video data includes video frames and audio frames in the first video data sent by the device, and the video frames are video frames with predetermined first decryption information added after structural expansion, and the audio frames are audio frames encrypted by first encryption information corresponding to the first decryption information;
解密单元,用于根据所述第二视频数据中的第一解密信息,对所述加密后的音频帧进行解密,根据所述视频帧和解密后的音频帧进行视频播放。A decryption unit is used to decrypt the encrypted audio frame according to the first decryption information in the second video data, and play the video according to the video frame and the decrypted audio frame.
基于浏览器端的视频播放装置,与基于设备端的视频播放装置对应。The video playback device based on the browser side corresponds to the video playback device based on the device side.
图8是本申请一实施例提供的电子设备的示意图,该电子设备可以为浏览器端,也可以为服务端,所述通讯单元用于收发数据和信令,包括浏览器端与服务端之间,或者服务端与设备端之间的数据和信令的收发。如图8所示,该实施例的电子设备8包括:处理器80、通讯单元和存储器81以及存储在所述存储器81中并可在所述处理器80上运行的计算机程序82,例如视频播放程序。所述处理器80执行所述计算机程序82时实现上述各个视频播放方法实施例中的步骤。或者,所述处理器80执行所述计算机程序82时实现上述各装置实施例中各模块/单元的功能。FIG8 is a schematic diagram of an electronic device provided in an embodiment of the present application. The electronic device can be a browser side or a server side. The communication unit is used to send and receive data and signaling, including the sending and receiving of data and signaling between the browser side and the server side, or between the server side and the device side. As shown in FIG8 , the electronic device 8 of this embodiment includes: a processor 80, a communication unit and a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a video playback program. When the processor 80 executes the computer program 82, the steps in each of the above-mentioned video playback method embodiments are implemented. Alternatively, when the processor 80 executes the computer program 82, the functions of each module/unit in the above-mentioned device embodiments are implemented.
示例性的,所述计算机程序82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序82在所述电子设备8中的执行过程。Exemplarily, the computer program 82 may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the electronic device 8.
所述电子设备可包括,但不仅限于,处理器80、存储器81。本领域技术人员可以理解,图8仅仅是电子设备8的示例,并不构成对电子设备8的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。The electronic device may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that FIG8 is merely an example of the electronic device 8 and does not limit the electronic device 8. The electronic device may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the electronic device may also include an input/output device, a network access device, a bus, etc.
所称处理器80可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 80 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
所述存储器81可以是所述电子设备8的内部存储单元,例如电子设备8的硬盘或内存。所述存储器81也可以是所述电子设备8的外部存储设备,例如所述电子设备8上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器81还可以既包括所述电子设备8的内部存储单元也包括外部存储设备。所述存储器81用于存储所述计算机程序以及所述电子设备所需的其他程序和数据。所述存储器81还可以用于暂时地存储已经输出或者将要输出的数据。The memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the electronic device. The memory 81 may also be used to temporarily store data that has been output or is to be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in the present application, it should be understood that the disclosed devices/terminal equipment and methods can be implemented in other ways. For example, the device/terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims (12)

  1. 一种视频播放方法,其特征在于,该方法应用于服务端,所述方法包括:A video playback method, characterized in that the method is applied to a server, and the method comprises:
    接收浏览器端的视频播放请求,向用于采集视频的设备端发送打开视频的信令;Receive a video playback request from the browser, and send a signal to open the video to the device used to capture the video;
    接收设备端上传的第一视频数据,通过预定的第一加密信息对所述第一视频数据中的音频帧进行加密,对所述第一视频数据中的视频帧结构进行扩展,在扩展后的所述视频帧结构中添加第一解密信息,所述第一解密信息与所述第一加密信息对应;receiving first video data uploaded by a device, encrypting an audio frame in the first video data by using predetermined first encryption information, extending a video frame structure in the first video data, and adding first decryption information to the extended video frame structure, wherein the first decryption information corresponds to the first encryption information;
    将扩展后的视频帧和加密后的音频帧封装为第二视频数据,将所述第二视频数据发送至浏览器端,所述第二视频数据用于由浏览器端根据扩展的视频帧结构中的第一解密信息,对所述第二视频数据进行解密和播放。The expanded video frame and the encrypted audio frame are encapsulated into second video data, and the second video data is sent to the browser. The second video data is used by the browser to decrypt and play the second video data according to the first decryption information in the expanded video frame structure.
  2. 根据权利要求1所述的方法,其特征在于,在向用于采集视频的设备端发送打开视频的信令之前,所述方法还包括:The method according to claim 1, characterized in that before sending a signaling for opening the video to the device end for capturing the video, the method further comprises:
    建立与设备端的通信链路,通过所述通信链路接收设备端的注册信息;Establishing a communication link with the device end, and receiving registration information of the device end through the communication link;
    根据所述注册信息对所述设备端进行身份认证,确定认证通过后的设备的上线状态。The device end is authenticated according to the registration information, and the online status of the device after the authentication is passed is determined.
  3. 根据权利要求1所述的方法,其特征在于,所述设备端上传的第一视频数据为已加密的视频数据,在接收设备端上传的第一视频数据之前,所述方法还包括:The method according to claim 1 is characterized in that the first video data uploaded by the device end is encrypted video data, and before receiving the first video data uploaded by the device end, the method further comprises:
    向设备端发送所述预定的第一加密信息,所述第一加密信息用于由所述设备端对所述设备端采集的第三视频数据进行加密处理。The predetermined first encryption information is sent to the device end, where the first encryption information is used by the device end to encrypt the third video data collected by the device end.
  4. 根据权利要求1所述方法,其特征在于,在扩展后的所述视频帧结构中添加第一解密信息,包括:The method according to claim 1, characterized in that adding the first decryption information to the expanded video frame structure comprises:
    按照预定的第二加密信息,对所述第一解密信息进行加密;Encrypting the first decrypted information according to predetermined second encryption information;
    在扩展后的所述视频帧结构中的网络抽象层单元中,添加已加密的所述第一加密信息。The encrypted first encryption information is added to the network abstraction layer unit in the expanded video frame structure.
  5. 一种视频播放方法,其特征在于,该方法应用于浏览器端,所述方法包括:A video playback method, characterized in that the method is applied to a browser side, and the method comprises:
    向服务端发送视频播放请求,所述视频播放请求包括请求播放的视频的设备信息;Sending a video playback request to the server, wherein the video playback request includes device information of the video requested to be played;
    接收服务端返回的第二视频数据,所述第二视频数据包括设备端所发送的第一视频数据中的视频帧和音频帧,且所述视频帧为通过结构扩展后添加了预定的第一解密信息的视频帧,所述音频帧为通过所述第一解密信息对应的第一加密信息进行加密后的音频帧;Receive second video data returned by the server, where the second video data includes video frames and audio frames in the first video data sent by the device, and the video frames are video frames to which predetermined first decryption information is added after structural expansion, and the audio frames are audio frames encrypted by first encryption information corresponding to the first decryption information;
    根据所述第二视频数据中的第一解密信息,对所述加密后的音频帧进行解密,根据所述视频帧和解密后的音频帧进行视频播放。The encrypted audio frame is decrypted according to the first decryption information in the second video data, and the video is played according to the video frame and the decrypted audio frame.
  6. 根据权利要求5所述的方法,其特征在于,根据所述第二视频数据中的第一解密信息,对所述加密后的音频帧进行解密,包括:The method according to claim 5, characterized in that decrypting the encrypted audio frame according to the first decryption information in the second video data comprises:
    通过WebAssembly编码方式编译为底层虚拟机字节码格式的解密库对所述第二视频数据进行解封装处理,得到所述第二视频数据中包括的扩展了视频帧结构的视频帧和加密后的音频帧;Decapsulating the second video data through a decryption library compiled into an underlying virtual machine bytecode format in a WebAssembly encoding manner, to obtain a video frame with an extended video frame structure and an encrypted audio frame included in the second video data;
    解析所述扩展了视频帧结构的视频帧,得到所述视频帧中包括的第一解密信息;Parsing the video frame with the extended video frame structure to obtain first decryption information included in the video frame;
    根据所述第一解密信息对所述加密后的音频帧进行解密。The encrypted audio frame is decrypted according to the first decryption information.
  7. 根据权利要求6所述的方法,其特征在于,在得到所述视频帧中包括的第一解密信息之后,所述方法还包括:The method according to claim 6, characterized in that after obtaining the first decryption information included in the video frame, the method further comprises:
    检测所述视频帧的加密状态;Detecting the encryption status of the video frame;
    在所述视频帧为加密状态时,通过所述第一解密信息对所述视频帧进行解密。When the video frame is in an encrypted state, the video frame is decrypted using the first decryption information.
  8. 根据权利要求6所述的方法,其特征在于,解析所述扩展了视频帧结构的视频帧,得到所述视频帧中包括的第一解密信息,包括:The method according to claim 6, characterized in that parsing the video frame having the extended video frame structure to obtain the first decryption information included in the video frame comprises:
    解析所述扩展了视频帧结构的视频帧,通过预定的第二解密信息对所述视频帧的扩展信息进行解密,得到所述视频帧中包括的第一解密信息。The video frame having the extended video frame structure is parsed, and the extended information of the video frame is decrypted by using predetermined second decryption information to obtain the first decryption information included in the video frame.
  9. 一种服务端,包括存储器、处理器、通讯单元以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,其中:A server comprises a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein:
    所述通讯单元用于向浏览器端或设备端收发数据或指令;The communication unit is used to send and receive data or instructions to the browser or device;
    所述处理器用于执行如权利要求1-4任一项所述视频播放方法。The processor is used to execute the video playback method as described in any one of claims 1-4.
  10. 一种浏览器端,包括存储器、处理器、通讯单元以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述浏览器端包括通讯单元和处理单元,其中:A browser terminal comprises a memory, a processor, a communication unit, and a computer program stored in the memory and executable on the processor, wherein:
    所述通讯单元用于向服务端收发数据或指令;The communication unit is used to send and receive data or instructions to the server;
    所述处理器用于执行如权利要求5-8任一项所述视频播放方法。The processor is used to execute the video playback method as described in any one of claims 5-8.
  11. 一种视频播放系统,其特征在于,所述系统包括浏览器端、服务端和设备端,其中:A video playback system, characterized in that the system includes a browser end, a server end and a device end, wherein:
    所述服务端用于执行如权利要求1-4任一项所述视频播放方法;The server is used to execute the video playback method according to any one of claims 1 to 4;
    所述浏览器端用于执行如权利要求5-8任一项所述视频播放方法。The browser end is used to execute the video playback method as described in any one of claims 5-8.
  12. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-4,或5-8任一项所述方法的步骤。A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 4, or 5 to 8.
PCT/CN2022/128383 2022-10-28 2022-10-28 Video playback method and system, and storage medium WO2024087208A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/128383 WO2024087208A1 (en) 2022-10-28 2022-10-28 Video playback method and system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/128383 WO2024087208A1 (en) 2022-10-28 2022-10-28 Video playback method and system, and storage medium

Publications (1)

Publication Number Publication Date
WO2024087208A1 true WO2024087208A1 (en) 2024-05-02

Family

ID=90829780

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128383 WO2024087208A1 (en) 2022-10-28 2022-10-28 Video playback method and system, and storage medium

Country Status (1)

Country Link
WO (1) WO2024087208A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704545A (en) * 2016-01-20 2016-06-22 中国科学院信息工程研究所 Secret key synchronizing information transmission method based on H.264 video stream
US20210112288A1 (en) * 2018-05-28 2021-04-15 Alibaba Group Holding Limited Network live-broadcasting method and apparatus
CN112822518A (en) * 2021-04-19 2021-05-18 浙江华创视讯科技有限公司 Video playing method, device, system, electronic equipment and storage medium
CN114189713A (en) * 2021-12-21 2022-03-15 杭州当虹科技股份有限公司 Content encryption method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105704545A (en) * 2016-01-20 2016-06-22 中国科学院信息工程研究所 Secret key synchronizing information transmission method based on H.264 video stream
US20210112288A1 (en) * 2018-05-28 2021-04-15 Alibaba Group Holding Limited Network live-broadcasting method and apparatus
CN112822518A (en) * 2021-04-19 2021-05-18 浙江华创视讯科技有限公司 Video playing method, device, system, electronic equipment and storage medium
CN114189713A (en) * 2021-12-21 2022-03-15 杭州当虹科技股份有限公司 Content encryption method

Similar Documents

Publication Publication Date Title
US8752194B2 (en) Progressive download or streaming of digital media securely through a localized container and communication protocol proxy
US9418209B2 (en) Systems and methods for manipulating sensitive information in a secure mobile environment
US8452008B2 (en) Content distributing method, apparatus and system
US10154014B2 (en) Method and system for efficient encryption, transmission, and decryption of video data
CN112822518A (en) Video playing method, device, system, electronic equipment and storage medium
WO2021072878A1 (en) Audio/video data encryption and decryption method and apparatus employing rtmp, and readable storage medium
US7249264B2 (en) Secure IP based streaming in a format independent manner
CN106331853B (en) Multimedia de-encapsulation method and device
US9485533B2 (en) Systems and methods for assembling and extracting command and control data
CN110061962B (en) Method and device for transmitting video stream data
CN103004219A (en) System and method to prevent manipulation of transmitted video data
CN110611830A (en) Video processing method, device, equipment and medium
CN108989886A (en) A kind of method and system playing encrypted video
US11457254B2 (en) Systems and methods for secure communications between media devices
CN110012260A (en) A kind of video conference content guard method, device, equipment and system
KR101815467B1 (en) System for enforcing security surveillance by using security agents
US20080037782A1 (en) Reduction of channel change time for digital media devices using key management and virtual smart cards
WO2020073777A1 (en) Media processing method and apparatus
WO2024087208A1 (en) Video playback method and system, and storage medium
EP3169076A1 (en) Portable device for processing access controlled multimedia content
US10231004B2 (en) Network recording service
JP2004186812A (en) Av communication control integrated circuit and av communication control program
WO2017035018A1 (en) Method and system for efficient encryption, transmission, and decryption of video data
WO2017035784A1 (en) Method for preventing the hotlink of url and anti-hotlink system
CN117395466B (en) Video transmission real-time monitoring method and system and electronic equipment