CN111556340B - Safe cross-platform video stream playing method - Google Patents

Safe cross-platform video stream playing method Download PDF

Info

Publication number
CN111556340B
CN111556340B CN202010437782.0A CN202010437782A CN111556340B CN 111556340 B CN111556340 B CN 111556340B CN 202010437782 A CN202010437782 A CN 202010437782A CN 111556340 B CN111556340 B CN 111556340B
Authority
CN
China
Prior art keywords
dash
server
client
video
mpd
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010437782.0A
Other languages
Chinese (zh)
Other versions
CN111556340A (en
Inventor
谭振坤
雷思琛
孔英秀
段惊园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Technological University
Original Assignee
Xian Technological University
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 Xian Technological University filed Critical Xian Technological University
Priority to CN202010437782.0A priority Critical patent/CN111556340B/en
Publication of CN111556340A publication Critical patent/CN111556340A/en
Application granted granted Critical
Publication of CN111556340B publication Critical patent/CN111556340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The invention discloses a safe cross-platform video stream playing method, which comprises the following steps: 1. the method comprises the steps that HTTPS connection is established between a client and a DASH server, and the client initiates an MPD index file request; 2. the DASH server packs the original video stream into a DASH video fragment and an MPD index file to complete the encryption of the URL tag attributes of the video fragment and the MPD file; 3. the method comprises the steps that a server receives a request of a client for initiating an MPD index file, and sends an encrypted MPD index file, a decryption key of each DASH video fragment and a server CRC (cyclic redundancy check) value; 4. the client receives a file sent by the server; 5. comparing the CRC value of the server side with the CRC value of the client side; 6. and the client dynamically selects a proper URL to initiate a video fragment request to the DASH server according to the current network condition, analyzes the video fragments according to the decryption key value corresponding to each video fragment, and finishes the playing of the video stream. The method of the invention provides encryption protection for the video stream fragments in the transmission process, and improves the safety in the video transmission process.

Description

Safe cross-platform video stream playing method
Technical Field
The invention belongs to the technical field of internet streaming media, and particularly relates to a safe cross-platform video stream playing method.
Background
With the development of Streaming media technology and HTML5 technology, the HTTP Adaptive transport protocol gradually replaces the traditional real-time Streaming transport protocol (RTP and RTSP), and the widely used Adaptive transport protocols mainly include HDS from Adobe, MSS from microsoft, and HLS from apple, but all of them have their own data segmentation formats, and based on this, the MPEG, in conjunction with other 3GPP, etc., promulgates the dash (dynamic Adaptive Streaming over HTTP) protocol international standard.
By means of the cross-platform property of the browser, the DASH protocol can conveniently complete the playing of cross-platform adaptive streaming media by means of the mse (media Source extension) extension technology provided by the HTML5 standard, and the two most important parts of the DASH protocol are an MPD (media Presentation description) index file and video clips, wherein the MPD file is in an XML format and describes detailed information such as the frame rate, resolution, URL and the like of the current clip. The client requests the MPD file in real time to the server and completes analysis, selects a proper URL tag in the MPD file according to the current network condition, and then initiates a video slicing request to the server by using the URL to complete the playing of the video stream. Nowadays more and more companies choose DASH technology on video streaming technology options, such as YouTube, Google, Facebook, arckian, etc.
However, in a common system for transmitting video stream based on DASH, in view of the openness of HTTP protocol, the whole video slicing request and transmission process are performed in clear text; some mobile devices also buffer some video fragments locally for offline reading in order to improve user experience, but these video fragments are not encrypted, and only simple file merging is needed to view a complete video, so that great potential safety hazards exist in file transmission.
The application provides a safe cross-platform video stream playing method, which has important practical application value for preventing video fragments from being leaked and video copyright from being damaged due to the fact that an MPD file is stolen.
Disclosure of Invention
The invention aims to provide a safe cross-platform video stream playing method, which completes cross-platform playing of videos on the basis of a DASH protocol, and can effectively improve the safety of a video data transmission process by carrying out encryption transmission and storage on video fragments and MPD file contents.
The technical scheme adopted by the invention is that a safe cross-platform video stream playing method specifically comprises the following steps:
step 1, establishing an HTTPS connection request between a client and a server, and initiating an MPD index file request by the client;
step 2, the DASH server of the server packs the original video stream into a plurality of DASH video fragments and MPD index files, simultaneously encrypts URL tags of each DASH video fragment and each MPD index file respectively to obtain and store the encrypted MPD index files and decryption key values of each DASH video fragment, and calculates CRC values of the server;
step 3, the DASH server receives an MPD index file request initiated by the client, and transmits the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC value to the client through an RPC interface according to a fixed format;
step 4, the client receives the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC check value transmitted by the DASH server, and calculates the client CRC check value;
step 5, the client compares the CRC value of the server with the CRC value of the client:
if the CRC value of the server side is the same as the CRC value of the client side, the client side further analyzes to finish decryption of a URL (uniform resource locator) tag of an MPD (MPD media stream index) file, and analyzes and stores a decryption key value of each DASH video fragment;
if the server side CRC check value is different from the client side CRC check value, the client side discards the encrypted MPD index file, each DASH video fragment decryption key value and the server side CRC check value transmitted by the DASH server in the step 3, selects a new original video stream and repeats the steps 1-4 until the server side CRC check value is the same as the client side CRC check value, and the client side further analyzes to complete decryption of the URL label of the MPD index file and simultaneously analyzes and stores each DASH video fragment decryption key value;
and step 6, the client dynamically selects a proper URL tag of the MPD index file according to the current network condition, initiates a video request to the DASH server, and when the DASH server receives the video request, the client decrypts each DASH video fragment according to each DASH video fragment decryption key value stored in the step 5 to finish the playing of the original video stream.
The present invention is also characterized in that,
the specific process of step 1 is as follows:
step 1.1, starting a DASH server at a service end to enable the DASH server to be in a monitoring state and waiting for a client connection request;
and step 1.2, logging in the client, and initiating an MPD index file request to a DASH server program by carrying token information and a timestamp returned after successful logging in.
The process of packing the original video stream in step 2 specifically comprises: the DASH server starts a video processing thread, packs and processes original video streams into an MPEG-DASH format, generates a plurality of DASH video fragments and MPD index files, and stores the DASH video fragments and the MPD index files in a server side.
In the step 2, DASH video segments are encrypted and stored in an AES-128 encryption mode, and URL tags of MPD index files are encrypted and stored in an exclusive-or encryption algorithm;
and in the step 2, each DASH video fragment decryption key value is dynamically generated according to token information, a timestamp and equipment information returned after the client successfully logs in, so that different video fragment decryption algorithms are ensured, and the safety of the whole video file is ensured.
In step 2, the CRC check value is calculated by writing into two parts of contents, namely, an MPD index file and a DASH video segment decryption secret key value.
The fixed format of file delivery in step 3 is: 2-byte MPD file content length + MPD file content + 2-byte server CRC check value length + server CRC check value + 4-byte DASH video segment decryption key value length + DASH video segment decryption key value.
In the method of the present invention, depending on the adaptivity of the DASH protocol, each segment may have a plurality of corresponding URLs, and the client dynamically selects a suitable URL according to the current network status, initiates a video segment request to the server, decrypts the returned video segment, and completes the video stream playing.
The invention has the beneficial effects that: the invention relates to a safe cross-platform video stream playing method, which combines the characteristics of a DASH protocol, completes the encryption transmission of video fragment files on the basis of the cross-platform transmission playing of video streams, further increases the difficulty of video cracking because the key values required by the decryption of each fragment are different, improves the safety of video stream data transmitted in a DASH system, and plays a good role in promoting the copyright protection of video files.
Drawings
Fig. 1 is a flowchart of a secure cross-platform video stream playing method according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention relates to a safe cross-platform video stream playing method, which specifically comprises the following steps as shown in figure 1:
step 1, starting a DASH server at a server side to enable the DASH server to be in a monitoring state, establishing an HTTPS connection request between a client side and the server side, and initiating an MPD index file request to a DASH server program by the client side after logging in and carrying token information and a timestamp returned after the logging in is successful;
step 2, starting a video processing thread by the DASH server, packaging and processing an original video stream into an MPEG-DASH format, generating a plurality of DASH video fragments and an MPD index file and storing the DASH video fragments and the MPD index file in a server, and simultaneously respectively encrypting each DASH video fragment by adopting an AES-128 encryption mode; encrypting the URL tag of the MPD index file by using an XOR encryption algorithm to obtain and store the encrypted MPD index file and each DASH video fragment decryption key value, and calculating a CRC value of a server;
and each DASH video fragment decryption key value is dynamically generated according to token information, a timestamp and equipment information returned after the client successfully logs in, so that different video fragment decryption algorithms are ensured, and the safety of the whole video file is ensured.
Step 3, the DASH server receives an MPD index file request initiated by the client, and transmits the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC value to the client through an RPC interface according to a fixed format;
the fixed format is specifically as follows: 2-byte MPD file content length + MPD file content + 2-byte server CRC check value length + server CRC check value + 4-byte DASH video segment decryption key value length + DASH video segment decryption key value.
Step 4, the client receives the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC check value transmitted by the DASH server, and calculates the client CRC check value;
step 5, the client compares the CRC value of the server with the CRC value of the client:
if the CRC value of the server side is the same as the CRC value of the client side, the client side further analyzes to finish decryption of a URL (uniform resource locator) tag of an MPD (MPD media stream index) file, and analyzes and stores a decryption key value of each DASH video fragment;
if the server side CRC check value is different from the client side CRC check value, the client side discards the encrypted MPD index file, each DASH video fragment decryption key value and the server side CRC check value transmitted by the DASH server in the step 3, selects a new original video stream and repeats the steps 1-4 until the server side CRC check value is the same as the client side CRC check value, and the client side further analyzes to complete decryption of the URL label of the MPD index file and simultaneously analyzes and stores each DASH video fragment decryption key value;
and step 6, the client dynamically selects a proper URL tag of the MPD index file according to the current network condition, initiates a video request to the DASH server, and when the DASH server receives the video request, the client decrypts each DASH video fragment according to each DASH video fragment decryption key value stored in the step 5 to finish the playing of the original video stream.
In the method, the CRC value is obtained by calculating two parts of contents, namely, a decryption secret key value written into an MPD index file and a DASH video fragment, in order to ensure efficiency and safety, a DASH server encrypts an attribute value of an important part URL tag of the MPD index file, and simultaneously writes a DASH video fragment decryption key corresponding to the URL into the tail part of the MPD index file to calculate the CRC value of the whole file.
Depending on the adaptivity of the DASH protocol, each DASH video fragment may have a plurality of corresponding URLs, and the client dynamically selects a suitable URL according to the current network condition, initiates a video fragment request to the server, decrypts the returned video fragment, and completes video stream playing.
The method of the invention completes the encryption transmission of the video fragment files on the basis of the cross-platform transmission and playing of the video stream, and ensures that each video fragment decryption algorithm is different because each DASH video fragment decryption key value is dynamically generated according to the token information, the timestamp and the equipment information returned after the successful login of the client, thereby further increasing the difficulty of video decryption, improving the security of the video stream data transmitted in the DASH system, and having important practical application value for preventing the video fragment leakage and the video copyright damage caused by the MPD file stealing.

Claims (3)

1. A safe cross-platform video stream playing method is characterized by comprising the following steps:
step 1, establishing an HTTPS connection request between a client and a server, and initiating an MPD index file request by the client;
the specific process is as follows:
step 1.1, starting a DASH server at a service end to enable the DASH server to be in a monitoring state and waiting for a client connection request;
step 1.2, a client logs in and initiates an MPD index file request to a DASH server with token information and a timestamp returned after successful login;
step 2, the DASH server of the server packs the original video stream into a plurality of DASH video fragments and MPD index files, simultaneously encrypts URL tags of each DASH video fragment and each MPD index file respectively to obtain and store the encrypted MPD index files and decryption key values of each DASH video fragment, and calculates CRC values of the server;
the process of the original video stream packing processing specifically comprises the following steps: starting a video processing thread by a DASH server, packaging and processing an original video stream into an MPEG-DASH format, generating a plurality of DASH video fragments and an MPD index file, and storing the DASH video fragments and the MPD index file in a server;
the DASH video segments are encrypted and stored in an AES-128 encryption mode, and URL tags of MPD index files are encrypted and stored in an exclusive-or encryption algorithm;
step 3, the DASH server receives an MPD index file request initiated by the client, and transmits the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC value to the client through an RPC interface according to a fixed format;
each DASH video fragment decryption key value is dynamically generated according to token information, a timestamp and equipment information returned after a client successfully logs in, so that different video fragment decryption algorithms are guaranteed, and the safety of the whole video file is guaranteed;
step 4, the client receives the encrypted MPD index file, each DASH video fragment decryption key value and the server CRC check value transmitted by the DASH server, and calculates the client CRC check value;
step 5, the client compares the CRC value of the server with the CRC value of the client:
if the CRC value of the server side is the same as the CRC value of the client side, the client side further analyzes to finish decryption of a URL (uniform resource locator) tag of an MPD (MPD media stream index) file, and analyzes and stores a decryption key value of each DASH video fragment;
if the server side CRC check value is different from the client side CRC check value, the client side discards the encrypted MPD index file, each DASH video fragment decryption key value and the server side CRC check value transmitted by the DASH server in the step 3, selects a new original video stream and repeats the steps 1-4 until the server side CRC check value is the same as the client side CRC check value, and the client side further analyzes to complete decryption of the URL label of the MPD index file and simultaneously analyzes and stores each DASH video fragment decryption key value;
and step 6, the client dynamically selects a proper URL tag of the MPD index file according to the current network condition, initiates a video request to the DASH server, and when the DASH server receives the video request, the client decrypts each DASH video fragment according to each DASH video fragment decryption key value stored in the step 5 to finish the playing of the original video stream.
2. The method of claim 1, wherein the CRC check value in step 2 is calculated by writing both contents of MPD index file and decryption secret key value of DASH video segment.
3. The method as claimed in claim 1, wherein the fixed format of file delivery in step 3 is: 2-byte MPD file content length + MPD file content + 2-byte server CRC check value length + server CRC check value + 4-byte DASH video segment decryption key value length + DASH video segment decryption key value.
CN202010437782.0A 2020-05-21 2020-05-21 Safe cross-platform video stream playing method Active CN111556340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010437782.0A CN111556340B (en) 2020-05-21 2020-05-21 Safe cross-platform video stream playing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010437782.0A CN111556340B (en) 2020-05-21 2020-05-21 Safe cross-platform video stream playing method

Publications (2)

Publication Number Publication Date
CN111556340A CN111556340A (en) 2020-08-18
CN111556340B true CN111556340B (en) 2022-04-22

Family

ID=72008395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010437782.0A Active CN111556340B (en) 2020-05-21 2020-05-21 Safe cross-platform video stream playing method

Country Status (1)

Country Link
CN (1) CN111556340B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112188308B (en) * 2020-08-31 2022-08-12 北京火眼目测科技有限公司 Method and device for generating encrypted video file library
CN112511862B (en) * 2020-11-12 2022-09-13 江苏大学 Method for checking MPEG-DASH video stream in NDN
CN112738560A (en) * 2020-12-28 2021-04-30 厦门市美亚柏科信息股份有限公司 Video data transmission method, receiving method, server and client
CN112702582B (en) * 2021-01-06 2022-07-15 贵州大学 Secure transmission method and device for monitoring video based on SM2
CN112860920A (en) * 2021-01-19 2021-05-28 中国联合网络通信集团有限公司 Media stream data storage method, electronic device and computer readable medium
CN114786042A (en) * 2022-04-12 2022-07-22 北京字节跳动网络技术有限公司 Video playing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3029941A1 (en) * 2012-04-27 2016-06-08 Huawei Technologies Co., Ltd. System and method for efficient support for short cryptoperiods in template mode
CN107276969A (en) * 2016-04-08 2017-10-20 杭州海康威视数字技术股份有限公司 The transmission method and device of a kind of data
CN109996095A (en) * 2019-03-28 2019-07-09 湖南快乐阳光互动娱乐传媒有限公司 A kind of network video-on-demand prevents from stealing method, system and the medium of chain broadcasting

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9274863B1 (en) * 2013-03-20 2016-03-01 Google Inc. Latency reduction in distributed computing systems
CN106060594B (en) * 2016-05-25 2019-04-23 武汉斗鱼网络科技有限公司 A kind of white list generation system and method based on player heartbeat
CN107786526A (en) * 2016-08-31 2018-03-09 北京优朋普乐科技有限公司 Anti-stealing link method, client and server system
CN106331752A (en) * 2016-08-31 2017-01-11 杭州当虹科技有限公司 Streaming media video file protection method
CN106791986A (en) * 2017-01-10 2017-05-31 环球智达科技(北京)有限公司 A kind of live index list encrypted antitheft catenary systems of HLS and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3029941A1 (en) * 2012-04-27 2016-06-08 Huawei Technologies Co., Ltd. System and method for efficient support for short cryptoperiods in template mode
CN107276969A (en) * 2016-04-08 2017-10-20 杭州海康威视数字技术股份有限公司 The transmission method and device of a kind of data
CN109996095A (en) * 2019-03-28 2019-07-09 湖南快乐阳光互动娱乐传媒有限公司 A kind of network video-on-demand prevents from stealing method, system and the medium of chain broadcasting

Also Published As

Publication number Publication date
CN111556340A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN111556340B (en) Safe cross-platform video stream playing method
US10477257B2 (en) Method and system for secure over-the-top live video delivery
US8843596B2 (en) Conversion between streaming media communication protocols
US9026782B2 (en) Token-based entitlement verification for streaming media decryption
US8243924B2 (en) Progressive download or streaming of digital media securely through a localized container and communication protocol proxy
US9794240B2 (en) System and method for signaling and verifying URL signatures for both URL authentication and URL-based content access authorization in adaptive streaming
CN108881205B (en) HLS streaming media safe playing system and playing method
CN103957436B (en) A kind of video anti-stealing link method based on OTT business
CN107707504B (en) Streaming media playing method and system, server and client
CN109348292B (en) Video slicing method based on byte threshold of slice file
CN113132394B (en) Request processing system, method and device, storage medium and electronic equipment
CN109525893A (en) Video segment method based on slice file duration threshold value
WO2017198069A1 (en) Streaming media file processing method and apparatus
AU2014305015A1 (en) Extensible media format system and methods of use
US8081756B2 (en) Implementation of media-protection policies
US20140337620A1 (en) System and Method for Local Generation of Streaming Content with a Hint Track
CN108235152B (en) DRM application system and method for transferring DRM private data
CN113329242A (en) Resource management method and device
CN104506530A (en) Network data processing method and device and data transmission method and device
US11647237B1 (en) Method and apparatus for secure video manifest/playlist generation and playback
CN102843335B (en) The processing method of streaming medium content and equipment
CN109218009A (en) It is a kind of to improve the method for device id safety, client and server
CN112738560A (en) Video data transmission method, receiving method, server and client
CN112752122B (en) Video encryption transmission method of intelligent camera and computer readable storage medium
CN114189706B (en) Media playing method, system, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant