WO2016192270A1 - 媒体文件的快速启播方法及装置 - Google Patents

媒体文件的快速启播方法及装置 Download PDF

Info

Publication number
WO2016192270A1
WO2016192270A1 PCT/CN2015/092369 CN2015092369W WO2016192270A1 WO 2016192270 A1 WO2016192270 A1 WO 2016192270A1 CN 2015092369 W CN2015092369 W CN 2015092369W WO 2016192270 A1 WO2016192270 A1 WO 2016192270A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
video
segment
sub
media file
Prior art date
Application number
PCT/CN2015/092369
Other languages
English (en)
French (fr)
Inventor
江中央
韦泽垠
Original Assignee
深圳Tcl数字技术有限公司
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 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2016192270A1 publication Critical patent/WO2016192270A1/zh

Links

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/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • H04N21/2541Rights Management
    • 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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/254Management at additional data server, e.g. shopping server, rights management server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption

Definitions

  • the present invention relates to the field of television, and in particular, to a method and apparatus for quickly starting a media file.
  • DRM Digital Rights Management, Digital Rights Management
  • DRM technology has become more and more widely used in media file encryption.
  • the DRM encryption type currently used for media files is playready.
  • the media file generally includes two important parts: first, metadata, which is used to save the playing time of the media file, and the encoding and decoding information of the audio and video data; for the media file that is encrypted by DRM, the metadata also includes DRM encryption information (information required for permission request); second, audio and video data, audio and video data compressed by an encoding algorithm (such as H.264 encoding algorithm, AAC encoding algorithm, etc.); the audio and video data includes more An audio and video clip, for at least one audio and video clip, the audio file is encrypted. Since the decrypted media file consumes cpu resources and considers the efficiency of decryption, the entire audio and video clip is generally not encrypted, but is encrypted for a certain part of the audio and video clip. In the prior art, video content service providers typically encrypt from the first audiovisual clip in the audio and video data of the media file.
  • Step 1 After receiving the play request, the player requests the video server to download the media file;
  • Step 2 After receiving the media file, the player parses the media file, obtains metadata and audio and video data of the media file, and sends the metadata and audio and video data to the DRM module;
  • Step three The DRM module of the player extracts DRM encryption information from the metadata, and sends a permission request to the DRM server according to the DRM encryption information;
  • Step four After receiving the license request, the DRM server authenticates and authenticates the license request. If the authentication and authentication are passed, the DRM decryption information of the media file is encapsulated into a license response of the license request, and then sent to the DRM module;
  • Step 5 After receiving the license response of the license, the DRM module Extracting DRM decryption information from the license response to decrypt the audio and video data, and sending the decrypted audio and video data to the decoder module; the DRM module also transmits the metadata to the decoder module of the player;
  • Step six After receiving the metadata and the decrypted audio and video data, the decoder module decodes the decrypted audio and video data, and sends the decoded audio and video data to the audio and video output module for output display.
  • the above playback process has the following drawbacks: since the first audio and video data segment in the audio and video data of the media file is encrypted, when the player plays the media file, only the DRM server completes the media file. After the authentication and authentication, the media file can be decrypted, the decrypted media file is obtained, and the decrypted media file is decoded and played. Sending a license request from the player to the DRM server, it takes about 3-5 seconds to complete the authentication and authentication of the license request to the DRM server; on the other hand, the encrypted audio and video data is only after the player receives the license response of the DRM server.
  • the unencrypted audio and video data unit can be obtained, and then the unencrypted audio and video data unit is decoded and played back. Therefore, playing DRM encrypted media files is more than 3-5 seconds, or even longer, when playing non-DRM encrypted media files (clearing media files). To a certain extent, the user experience is reduced.
  • the main purpose of the present invention is to provide a method and device for quickly launching a media file.
  • it is necessary to start the playback of the media file after obtaining the license response. , resulting in prolonged start-up time and reduced technical defects in the user experience.
  • the present invention provides a method for quickly initiating a media file, the method comprising:
  • the audio and video data includes an unencrypted audio and video segment and an encrypted audio and video segment after the unencrypted audio and video segment;
  • the playing duration of the unencrypted audio and video clip is greater than or equal to a preset duration, which is a length of time required to send a permission request to the digital rights management server to receive a license response from the digital rights management server.
  • the step of obtaining a media file comprises:
  • the encrypted audio and video segments include unencrypted audio and video sub-segments and encrypted audio and video sub-segments.
  • the step of decrypting and decoding the encrypted audio and video segments in the audio and video data according to the metadata and the permission response comprises:
  • sub-segment in the encrypted audio and video clip is an unencrypted audio and video sub-segment, decoding and playing the unencrypted audio and video sub-segment according to the metadata;
  • the sub-segment in the encrypted audio and video clip is an encrypted audio and video sub-segment, decrypting the encrypted audio and video sub-segment according to the permission response to obtain a decrypted audio-video sub-segment; Decoding and playing the decrypted audio and video sub-segments.
  • the present invention further provides a fast launching device for a media file, the device comprising:
  • An extracting module configured to parse the media file, and extract metadata and audio and video data;
  • the audio and video data includes an unencrypted audio and video segment and an encrypted audio and video segment after the unencrypted audio and video segment;
  • a first processing module configured to decode and play an unencrypted audio and video segment in the audio and video data according to the metadata, and send a permission request to the digital rights management server according to the metadata to obtain a digital rights management server return License response
  • a second processing module configured to decrypt and decode the encrypted audio and video segments in the audio and video data according to the metadata and the permission response.
  • the playing duration of the unencrypted audio and video clip is greater than or equal to a preset duration, which is a length of time required to send a permission request to the digital rights management server to receive a license response from the digital rights management server.
  • the obtaining module comprises:
  • An extracting unit configured to: when receiving the play request, extract a uniform resource locator URL of the media file from the play request;
  • a sending unit configured to send a download media file request to the audio and video server according to the URL
  • a receiving unit configured to receive a media file returned by the audio and video server.
  • the encrypted audio and video segments include unencrypted audio and video sub-segments and encrypted audio and video sub-segments.
  • the second processing module comprises:
  • a determining unit configured to determine whether the audio/video sub-segment in the encrypted audio and video segment is an unencrypted audio and video sub-segment
  • a first processing unit configured to: when the sub-segment in the encrypted audio and video clip is an unencrypted audio and video sub-segment, perform decoding and playing on the unencrypted audio and video sub-segment according to the metadata;
  • a second processing unit configured to decrypt the encrypted audio and video sub-segment according to the permission response when the sub-segment in the encrypted audio-video segment is an encrypted audio-video sub-segment, to obtain the decrypted audio-video sub-segment And performing decoding and playing on the decrypted audio and video sub-segment according to the metadata.
  • the method and device for quickly launching a media file of the present invention by acquiring a media file; parsing the media file, extracting metadata and audio and video data; the audio and video data including unencrypted audio and video segments and the unencrypted And an encrypted audio and video segment after the audio and video segment; decoding and playing the unencrypted audio and video segments in the audio and video data according to the metadata, and transmitting a permission request to the digital rights management server according to the metadata to obtain digital rights And a license response returned by the management server; decrypting and decoding the encrypted audio and video segments in the audio and video data according to the metadata and the license response; and playing the unencrypted play when the media file is started
  • the audio and video clips simultaneously request the digital rights management server to obtain the license response returned by the digital rights management server, do not need to pause the play to wait for the license response, and can start the playback of the media file after receiving the license response, and can quickly press the media.
  • the file is launched to improve the user experience.
  • FIG. 1 is a schematic flow chart of a preferred embodiment of a method for quickly initiating a media file according to the present invention
  • FIG. 2 is a schematic structural diagram of a media file in the present invention
  • step S10 of FIG. 1 is a schematic flow chart of step S10 of FIG. 1;
  • step S40 in FIG. 1 is a detailed flow chart of step S40 in FIG. 1;
  • FIG. 5 is a schematic flowchart diagram of a preferred embodiment of a fast start device for a media file according to the present invention
  • FIG. 6 is a schematic structural diagram of the acquisition module of FIG. 5;
  • FIG. 7 is a detailed structural diagram of the second processing module of FIG. 5.
  • the invention provides a fast launching method of a media file.
  • FIG. 1 is a schematic flowchart of a preferred embodiment of a method for quickly initiating a media file according to the present invention. The method includes:
  • the media file includes metadata and audiovisual data including unencrypted audiovisual video segments and encrypted audiovisual video segments subsequent to the unencrypted audiovisual video segments.
  • the media file is pre-generated by a digital rights management server (ie, a DRM server), and the audio and video content provider provides an unencrypted original media file, and the DRM server encrypts the original media file, generates a media file, and uploads the media file. Save to the video server.
  • a digital rights management server ie, a DRM server
  • the DRM server encrypts the audio and video data of the original media file after the preset playing time, and encrypts the DRM (including the DRM encryption type, the DRM server address, and the like).
  • the media file includes metadata and audio and video data D including an unencrypted audiovisual video segment D1 and an encrypted audiovisual video segment D2 following the unencrypted audiovisual video segment.
  • the unencrypted audio video segment D1 includes a plurality of audio and video sub-segments D11 of the same size.
  • the metadata includes a total playing time of the media file, codec information of the audio and video data, DRM encryption information of the audio and video data, and the like, and the DRM encryption information includes a DRM encryption type, a DRM server address, and the like, and the DRM encryption type of the audio and video data includes Playready DRM, widevine DRM, marlin DRM or the like; the audio and video data includes audio data and/or video data.
  • the unencrypted audio and video clips may include a plurality of unencrypted audio and video sub-segments of the same size.
  • the license response includes DRM decryption information for decrypting the encrypted audio and video clip.
  • the unencrypted audio and video segments in the audio and video data are decrypted and played according to the metadata.
  • the codec information is extracted from the metadata, and then the audio and video data is used according to the codec information.
  • the unencrypted audio and video clips are decoded, and the decoded audio and video data is played back.
  • the license request is sent to the DRM server according to the metadata to obtain a license response returned by the DRM server, and specifically, the DRM encrypted information is extracted from the metadata. And generating a license request according to the DRM encryption information, where the license request includes a DRM encryption type, a DRM server address, a user identity, a media file name, and the like.
  • the DRM server authenticates and authenticates the license request. Specifically, the user identity is authenticated to determine whether the user identity is legal. If the user identity is legal, the authentication is passed, and after the authentication is passed, the school is authenticated.
  • the DRM server Checking whether the user identity has the right to view the media file corresponding to the media file name. If the user identity has the right to view the media file corresponding to the media file name, and the authentication is passed, the DRM server generates a license response, and the media is generated.
  • the DRM decryption information of the file is encapsulated into a license response, that is, the license response includes DRM decryption information including a key for decryption and an associated decryption certificate.
  • the encrypted audio video segment is decrypted by the DRM decryption information.
  • the prior art can be solved.
  • the media file needs to be played when the license response is obtained, resulting in a technical defect of playback delay, which can quickly launch the media file and improve the user experience.
  • the playback duration of the unencrypted audio and video clip is greater than or equal to a preset duration, which is the length of time required to send a license request to the DRM server to receive a license response from the DRM server.
  • a preset duration is the length of time required to send a license request to the DRM server to receive a license response from the DRM server.
  • the preset duration is 5 seconds, that is, at least the first 5 seconds of the audio and video data in the audio and video data are not encrypted.
  • the media file is launched, the first 5 seconds of audio and video data in the audio and video data can be directly decoded and played.
  • the encrypted audio and video clips can be decrypted according to the license response, and there is no need to pause playback to wait for the license response.
  • the encrypted audio and video clips are decrypted according to the license response, and the decrypted audio and video clips are decoded according to the metadata, and then played.
  • the DRM decryption information is obtained from the license response
  • the encrypted audio and video segments are decrypted according to the DRM decryption information
  • the codec information is obtained from the metadata
  • the decrypted audio and video segments are decoded and then played.
  • the step S10 includes:
  • the user can input a play request through the media file selection operation interface, and provide a media file list in the media file selection play interface, where the media file list includes a media file name, a media file content introduction, and the like, when the user browses the media file list.
  • a selection instruction (such as clicking a play button) may be input to generate a play request, which includes a uniform resource locator, a media file name, and the like of the media file to be played by the user.
  • a download media file request is sent to the audio and video server, where the download media file request includes a URL of the media file, and the audio and video server can obtain the corresponding media file according to the URL.
  • the audio and video server can obtain the media file corresponding to the URL according to a network protocol such as http/rtsp/rtp.
  • the encrypted audio and video segments include unencrypted audio and video sub-segments and encrypted audio and video sub-segments.
  • the encrypted audio and video segment D2 includes a plurality of audio and video sub-segments of the same size, wherein the partial audio and video sub-segments in the encrypted audio and video segments are unencrypted audio and video sub-segments D21, and partial audio and video sub-segments
  • the fragment is an encrypted audio and video sub-segment D22.
  • the number of the encrypted audio and video sub-segments can be set according to actual needs. For example, when the encryption rate is 10%, when the encrypted audio and video clip includes 100 audio and video sub-segments, 10 of the 100 audio and video sub-segments The audio and video sub-segments are encrypted.
  • 10 audio and video sub-segments may be randomly selected from the 100 audio and video sub-segments for encryption, or may be selected from the 100 audio and video sub-segments according to a certain encryption interval.
  • 10 audio and video sub-segments are encrypted.
  • the encrypted audio and video sub-segment includes an encrypted segment A and an unencrypted segment.
  • the playback efficiency of the encrypted audio and video sub-segment is improved, and all data in the encrypted audio and video sub-segment is not encrypted, but only the encryption is performed.
  • Part of the data in the audio and video sub-segments is encrypted.
  • the size and location of the encrypted segments in each of the encrypted audio and video sub-segments may be different.
  • the step S40 includes:
  • Whether the sub-segment is an unencrypted audio and video sub-segment can be determined by reading an encrypted identification of the audio-video sub-segment in the encrypted audio-video segment.
  • the encrypted identifier is saved in the metadata.
  • the encryption condition of each audio and video sub-segment in the encrypted audio and video clip is saved in the metadata, and the encrypted identifier is set to 1 as the encrypted audio and video sub-segment, and the encrypted identifier is 0 as the unencrypted audio and video sub-segment.
  • the audio-video sub-segment in the encrypted audio-video segment is determined to be an encrypted audio and video sub-segment when read.
  • the encrypted identifier of the audio/video sub-segment in the encrypted audio and video clip is 0, it is determined that the sub-segment in the encrypted audio-video clip is an unencrypted audio and video sub-segment.
  • the unencrypted audio and video sub-segment is decoded and played according to the metadata.
  • the codec information is extracted from the metadata, the unencrypted audio and video sub-segments are decoded according to the codec information, and the decoded data is played back.
  • the sub-segment in the encrypted audio and video clip is an encrypted audio and video sub-segment
  • decrypt the encrypted audio and video sub-segment according to the permission response to obtain the decrypted audio-video sub-segment; and according to the metadata,
  • the decrypted audio and video sub-segments are decoded and played.
  • FIG. 5 is a schematic structural diagram of a preferred embodiment of a quick start device for a media file according to the present invention.
  • the device includes:
  • the obtaining module 10 is configured to obtain a media file
  • the extracting module 20 is configured to parse the media file, and extract metadata and audio and video data; the audio and video data includes an unencrypted audio and video segment and an encrypted audio and video segment after the unencrypted audio and video segment;
  • the first processing module 30 is configured to decode and play the unencrypted audio and video segments in the audio and video data according to the metadata, and simultaneously send a permission request to the DRM server according to the metadata to obtain a license response returned by the DRM server.
  • the second processing module 40 is configured to decrypt and decode the encrypted audio and video segments in the audio and video data according to the metadata and the permission response.
  • the media file includes metadata and audio and video data, the audio and video data including unencrypted audio and video segments and encrypted audio and video segments after the unencrypted audio and video segments.
  • the license response includes DRM decryption information for decrypting the encrypted audio and video clip.
  • the media file is pre-generated by the DRM server, and the audio and video content provider provides an unencrypted original media file.
  • the DRM server encrypts the original media file, generates a media file, and uploads the media file to a video server for storage. Specifically, when receiving the unencrypted original media file, the DRM server encrypts the audio and video data of the original media file after the preset playing time, and encrypts the DRM (including the DRM encryption type, the DRM server address, and the like).
  • the media file includes metadata and audio and video data D including an unencrypted audiovisual video segment D1 and an encrypted audiovisual video segment D2 following the unencrypted audiovisual video segment.
  • the unencrypted audio video segment D1 includes a plurality of audio and video sub-segments D11 of the same size.
  • the metadata includes a total playing time of the media file, codec information of the audio and video data, DRM encryption information of the audio and video data, and the like, and the DRM encryption information includes a DRM encryption type, a DRM server address, and the like, and the DRM encryption type of the audio and video data includes Playready DRM, widevine DRM, marlin DRM or the like; the audio and video data includes audio data and/or video data.
  • the unencrypted audio and video clips may include a plurality of unencrypted audio and video sub-segments of the same size.
  • the first processing module 30 decrypts and plays the unencrypted audio and video segments in the audio and video data according to the metadata. Specifically, the codec information is extracted from the metadata, and the audio and video data is further obtained according to the codec information. The unencrypted audio and video clips are decoded, and the decoded audio and video data is played.
  • the first processing module 30 sends a permission request to the DRM server according to the metadata to obtain a license response returned by the DRM server, and specifically extracts the DRM encryption from the metadata, while decoding and playing the unencrypted audio and video segments.
  • the information generates a license request according to the DRM encryption information, and the license request includes a DRM encryption type, a DRM server address, a user identity, a media file name, and the like.
  • the DRM server authenticates and authenticates the license request. Specifically, the user identity is authenticated to determine whether the user identity is legal. If the user identity is legal, the authentication is passed, and after the authentication is passed, the school is authenticated.
  • the DRM server Checking whether the user identity has the right to view the media file corresponding to the media file name. If the user identity has the right to view the media file corresponding to the media file name, and the authentication is passed, the DRM server generates a license response, and the media is generated.
  • the DRM decryption information of the file is encapsulated into a license response, that is, the license response includes DRM decryption information including a key for decryption and an associated decryption certificate.
  • the encrypted audio video segment is decrypted by the DRM decryption information.
  • the first processing module 30 decodes and plays the unencrypted audio and video segments in the audio and video data, and sends a permission request to the DRM server according to the metadata to obtain a license response returned by the DRM server, which can be solved in the prior art.
  • the media file needs to be played when the license response is obtained, resulting in a technical defect of playback delay, which can quickly launch the media file and improve the user experience.
  • the second processing module 40 decrypts the encrypted audio and video clips according to the permission response, and then decodes the decrypted audio and video clips according to the metadata. Then play. Specifically, the DRM decryption information is obtained from the license response, the encrypted audio and video segments are decrypted according to the DRM decryption information, and the codec information is obtained from the metadata, and the decrypted audio and video segments are decoded and then played.
  • the playback duration of the unencrypted audio and video clip is greater than or equal to a preset duration, which is the length of time required to send a license request to the DRM server to receive a license response from the DRM server.
  • a preset duration is the length of time required to send a license request to the DRM server to receive a license response from the DRM server.
  • the preset duration is 5 seconds, that is, at least the first 5 seconds of the audio and video data in the audio and video data are not encrypted.
  • the media file is launched, the first 5 seconds of audio and video data in the audio and video data can be directly decoded and played.
  • the encrypted audio and video clips can be decrypted according to the license response, and there is no need to pause playback to wait for the license response.
  • the obtaining module 10 includes:
  • the extracting unit 11 is configured to: when receiving the play request, extract a uniform resource locator URL of the media file from the play request;
  • the sending unit 12 is configured to send a download media file request to the audio and video server according to the URL;
  • the receiving unit 13 is configured to receive the media file returned by the audio and video server.
  • the user can input a play request through the media file selection operation interface, and provide a media file list in the media file selection play interface, where the media file list includes a media file name, a media file content introduction, and the like, when the user browses the media file list.
  • a selection instruction (such as clicking a play button) may be input to generate a play request, which includes a uniform resource locator, a media file name, and the like of the media file to be played by the user.
  • the sending unit 12 sends a download media file request to the audio and video server, where the download media file request includes a URL of the media file, and the audio and video server can obtain the corresponding media file according to the URL.
  • the audio and video server can obtain the media file corresponding to the URL according to a network protocol such as http/rtsp/rtp.
  • the encrypted audio and video segments include unencrypted audio and video sub-segments and encrypted audio and video sub-segments.
  • the encrypted audio and video segment D2 includes a plurality of audio and video sub-segments of the same size, wherein the partial audio and video sub-segments in the encrypted audio and video segments are unencrypted audio and video sub-segments D21, and partial audio and video sub-segments
  • the fragment is an encrypted audio and video sub-segment D22.
  • the number of the encrypted audio and video sub-segments can be set according to actual needs. For example, when the encryption rate is 10%, when the encrypted audio and video clip includes 100 audio and video sub-segments, 10 of the 100 audio and video sub-segments The audio and video sub-segments are encrypted.
  • 10 audio and video sub-segments may be randomly selected from the 100 audio and video sub-segments for encryption, or may be selected from the 100 audio and video sub-segments according to a certain encryption interval.
  • 10 audio and video sub-segments are encrypted.
  • the encrypted audio and video sub-segment includes an encrypted segment A and an unencrypted segment.
  • the playback efficiency of the encrypted audio and video sub-segment is improved, and all data in the encrypted audio and video sub-segment is not encrypted, but only the encryption is performed.
  • Part of the data in the audio and video sub-segments is encrypted.
  • the size and location of the encrypted segments in each of the encrypted audio and video sub-segments may be different.
  • the second processing module 40 includes:
  • the determining unit 41 is configured to determine whether the audio/video sub-segment in the encrypted audio and video clip is an unencrypted audio and video sub-segment;
  • the first processing unit 42 is configured to: when the sub-segment in the encrypted audio and video clip is an unencrypted audio and video sub-segment, decode and play the unencrypted audio and video sub-segment according to the metadata;
  • the second processing unit 43 is configured to decrypt the encrypted audio and video sub-segment according to the permission response when the sub-segment in the encrypted audio-video segment is an encrypted audio-video sub-segment, to obtain the decrypted audio-video sub-segment; Decoding and playing the decrypted audio and video sub-segments according to the metadata.
  • the determining unit 41 may determine whether the sub-segment is an unencrypted audio and video sub-segment by reading an encrypted identifier of the audio-video sub-segment in the encrypted audio-video segment.
  • the encrypted identifier is saved in the metadata.
  • the encryption condition of each audio and video sub-segment in the encrypted audio and video clip is saved in the metadata, and the encrypted identifier is set to 1 as the encrypted audio and video sub-segment, and the encrypted identifier is 0 as the unencrypted audio and video sub-segment.
  • the determining unit 41 when the determining unit 41 reads that the encrypted identifier of the audio-video sub-segment in the encrypted audio-video segment is 1, determining that the audio-video sub-segment in the encrypted audio-video segment is an encrypted audio video sub- The fragment, when the encrypted identifier of the audio/video sub-segment in the encrypted audio and video clip is 0, determines that the sub-segment in the encrypted audio-video clip is an unencrypted audio and video sub-segment.
  • the first processing unit 42 extracts codec information from the metadata, and decodes the unencrypted audio and video sub-segment according to the codec information, and then The decoded data is played out.
  • the second processing unit 43 obtains DRM decryption information from the license response, and decrypts the encrypted audio and video sub-segment according to the DRM decryption information, to obtain The decrypted audio and video sub-segment; the codec information is obtained from the metadata, and the decrypted audio and video segments are decoded and played.

Abstract

本发明公开了一种媒体文件的快速启播方法,该方法包括:获取媒体文件;对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放。本发明还公开了一种媒体文件的快速启播方法。采用本发明可快速启播媒体文件。

Description

媒体文件的快速启播方法及装置
技术领域
本发明涉及电视领域,尤其涉及一种媒体文件的快速启播方法及装置。
背景技术
DRM(Digital Rights Management,数字版权管理)是目前使用非常广泛的一种数字内容版权保护技术。DRM技术已越来越广泛应用到媒体文件加密中。目前常用于媒体文件的DRM加密类型有playready DRM,widevine DRM,marlin DRM等。媒体文件一般包括两个重要的部分:一、元数据(metadata),用来保存媒体文件的播放时长,音视频数据的编解码信息;对于经过DRM加密的媒体文件而言,元数据里面还包含了DRM加密信息(在进行许可请求所需要的信息);二、音视频数据,经过编码算法(如H.264编码算法,AAC编码算法等)压缩后的音视频数据;该音视频数据包括多个音视频片段,对于经过DRM加密的媒体文件,则至少对一个音视频片段进行了加密。因解密媒体文件比较消耗cpu资源,考虑解密的效率,一般不会对整个音视频片段加密,而是针对音视频片段的某个局部进行加密。在现有技术中,视频内容服务提供商通常从媒体文件的音视频数据中的第一个音视频片段处进行加密。
现有技术中,对DRM加密的媒体文件的播放流程如下:
步骤一:播放器在接收到播放请求后, 向视频服务器请求下载媒体文件;
步骤二:播放器在接收到媒体文件后,对媒体文件进行解析,获取媒体文件的元数据和音视频数据,并将元数据和音视频数据发送到DRM模块;
步骤三: 播放器的DRM模块从元数据中提取DRM加密信息,并根据该DRM加密信息向DRM服务器发送许可请求;
步骤四: DRM服务器在接收到许可请求后,对该许可请求进行认证和鉴权。若通过了认证和鉴权,则将该媒体文件的DRM解密信息封装到许可请求的许可响应中后发送给DRM模块;
步骤五: DRM模块在接收到license的许可响应后, 从许可响应中提取DRM解密信息来对音视频数据进行解密,并将解密后的音视频数据送给解码器模块;DRM模块还将元数据发送给播放器的解码器模块;
步骤六: 解码器模块在接收到元数据和解密后的音视频数据后,对解密后的音视频数据进行解码,并将解码后的音视频数据发送到音视频输出模块进行输出显示。
采用上述播放流程,具有如下缺陷:由于从媒体文件的音视频数据中的第一个音视频数据片段处进行加密,因此,播放器在播放该媒体文件时,只有通过DRM服务器完成对该媒体文件认证和鉴权后,才能对媒体文件进行解密,获取解密后的媒体文件,再对解密后的媒体文件进行解码播放。从播放器向DRM服务器发送许可请求,到DRM服务器完成对许可请求的认证及鉴权需要3-5秒左右;另一方面,加密的音视频数据只有在播放器得到DRM服务器的许可响应后,才能进行解密得到非加密的音视频数据单元,然后再对非加密的音视频数据单元进行解码及播放显示。因此,播放DRM加密媒体文件比播放非DRM加密的媒体文件(清流媒体文件),播放启动时间要延长3-5秒左右,甚至更长时间, 在一定的程度上降低了用户体验。
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。
发明内容
本发明的主要目的在于提供一种媒体文件的快速启播方法及装置,旨在解决的现有技术中,在播放DRM加密的媒体文件时,需要在获取到许可响应后才能启动媒体文件的播放,导致延长了启播时间,降低用户体验的技术缺陷。
为实现上述目的,本发明提供一种媒体文件的快速启播方法,该方法包括:
获取媒体文件;
对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;
根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;
根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放。
优选地,所述未加密音视频片段的播放时长大于或等于预设时长,所述预设时长为向数字版权管理服务器发送许可请求到从数字版权管理服务器接收到许可响应所需要的时长。
优选地,所述获取媒体文件的步骤包括:
在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
根据所述URL向音视频服务器发送下载媒体文件请求;
接收所述音视频服务器返回的媒体文件。
优选地,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
优选地,所述根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放的步骤包括:
判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
若所述加密音视频片段中的子片段为未加密音视频子片段,则根据所述元数据对所述未加密音视频子片段进行解码播放;
若所述加密音视频片段中的子片段为加密音视频子片段,则根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
此外,为实现上述目的,本发明还提供一种媒体文件的快速启播装置,该装置包括:
获取模块,用于获取媒体文件;
提取模块,用于对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;
第一处理模块,用于根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;
第二处理模块,用于根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放。
优选地,所述未加密音视频片段的播放时长大于或等于预设时长,所述预设时长为向数字版权管理服务器发送许可请求到从数字版权管理服务器接收到许可响应所需要的时长。
优选地,所述获取模块包括:
提取单元,用于在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
发送单元,用于根据所述URL向音视频服务器发送下载媒体文件请求;
接收单元,用于接收所述音视频服务器返回的媒体文件。
优选地,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
优选地,所述第二处理模块包括:
判断单元,用于判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
第一处理单元,用于在所述加密音视频片段中的子片段为未加密音视频子片段时,根据所述元数据对所述未加密音视频子片段进行解码播放;
第二处理单元,用于在所述加密音视频片段中的子片段为加密音视频子片段时,根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
本发明的媒体文件的快速启播方法及装置,通过获取媒体文件;对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放;在对媒体文件进行启播时,可在播放未加密音视频片段的同时向数字版权管理服务器许可请求,以获得数字版权管理服务器返回的许可响应,不需要暂停播放以等待许可响应,在接收到许可响应后才能启动媒体文件的播放,可快速对媒体文件进行启播,提高用户体验。
附图说明
图1为本发明媒体文件的快速启播方法的优选实施例的流程示意图;
图2为本发明中媒体文件的结构示意图;
图3为图1中步骤S10的详细流程示意图;
图4为图1中步骤S40的详细流程示意图;
图5为本发明媒体文件的快速启播装置的优选实施例的流程示意图;
图6为图5中获取模块的详细结构示意图;
图7为图5中第二处理模块的详细结构示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种媒体文件的快速启播方法。
参照图1,图1为本发明媒体文件的快速启播方法的优选实施例流程示意图,该方法包括:
S10、获取媒体文件。
该媒体文件包括元数据和音视频数据,该音视频数据包括未加密音视频片段和在该未加密音视频片段后的加密音视频片段。
该媒体文件预先由数字版权管理服务器(即DRM服务器)生成,音视频内容提供商提供未加密的原始媒体文件,该DRM服务器对该原始媒体文件进行加密,生成媒体文件,并将该媒体文件上传到视频服务器进行保存。具体的,该DRM服务器在接收到未加密的原始媒体文件时,对该原始媒体文件的预设播放时长后的音视频数据进行加密,并将DRM加密信息(包括DRM加密类型、DRM服务器地址等)写入到原始媒体文件的元数据中,生成媒体文件,使得该媒体文件的音视频数据中的预设播放时长前的音视频数据为未加密数据(清流),该音视频数据中的预设播放时长后的音视频数据为加密数据(加密流)。
如图2所示,该媒体文件包括元数据和音视频数据D,该音视频数据D包括未加密音视频片段D1和在该未加密音视频片段后的加密音视频片段D2。该未加密音视频片段D1包括多个大小一样的音视频子片段D11。该元数据包括媒体文件的总播放时长、音视频数据的编解码信息、音视频数据的DRM加密信息等,该DRM加密信息包括DRM加密类型、DRM服务器地址等,音视频数据的DRM加密类型包括playready DRM、widevine DRM、marlin DRM等;该音视频数据包括音频数据及/或视频数据。该未加密音视频片段可包括多个大小一样的未加密音视频子片段。
S20、对该媒体文件进行解析,提取元数据和音视频数据,该音视频数据包括未加密音视频片段和在该未加密音视频片段后的加密音视频片段。
S30、根据该元数据对该音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应。
该许可响应中包含用于解密该加密音视频片段的DRM解密信息。
在该步骤中,根据该元数据对该音视频数据中的未加密音视频片段进行解密播放,具体的,从该元数据中提取编解码信息,再根据该编解码信息对该音视频数据中的未加密音视频片段进行解码,再将解码后的音视频数据播放出来。
在该步骤中,在对未加密音视频片段进行解码播放的同时,根据该元数据向DRM服务器发送许可请求,以获得DRM服务器返回的许可响应,具体的,从该元数据中提取DRM加密信息,再根据该DRM加密信息生成许可请求,该许可请求包括DRM加密类型、DRM服务器地址、用户身份、媒体文件名称等。该DRM服务器接收到该许可请求后,对该许可请求进行认证和鉴权,具体的,对用户身份进行认证,确定用户身份是否合法,如果用户身份合法,则认为认证通过,认证通过后,校验该用户身份是否具有观看该媒体文件名称对应的媒体文件的权限,如果该用户身份具有观看该媒体文件名称对应的媒体文件的权限,认为鉴权通过,则该DRM服务器生成许可响应,将媒体文件的DRM解密信息封装到许可响应中,即许可响应包括DRM解密信息,该DRM解密信息包括解密用的key及相关解密证书。通过该DRM解密信息对加密音视频片段进行解密。
在该步骤中,一边对该音视频数据中的未加密音视频片段进行解码播放,一边根据该元数据向DRM服务器发送许可请求,以获得DRM服务器返回的许可响应,可解决现有技术中,需要在获得许可响应时才播放媒体文件,导致播放延迟的技术缺陷,可快速对媒体文件进行启播,提高用户体验。
该未加密音视频片段的播放时长大于或等于预设时长,该预设时长为向DRM服务器发送许可请求到从DRM服务器接收到许可响应所需要的时长。通常从向DRM服务器发送许可请求到从DRM服务器接收到许可响应需要3-5秒,该该预设时长为5秒,即对该音视频数据中的至少前5秒音视频数据不进行加密,在对该媒体文件启播时,可直接对音视频数据中的前5秒的音视频数据进行解码播放,在解码播放过程中,有足够长的时间从DRM服务器中获得许可响应,以在播放完未加密音视频片段后,可根据该许可响应对加密音视频片段进行解密,不需要暂停播放以等待该许可响应。
S40、根据该元数据及该许可响应,对该音视频数据中的加密音视频片段进行解密解码后播放。
在对未加密音视频片段播放完成后,根据该许可响应对加密音视频片段进行解密,再根据该元数据对解密后的音视频片段进行解码,然后播放。具体的,从该许可响应中获取DRM解密信息,根据该DRM解密信息对该加密音视频片段进行解密,再从元数据中获取编解码信息,对解密后的音视频片段进行解码,然后播放。
进一步的,如图3所示,该步骤S10包括:
S11、在接收到播放请求时,从该播放请求中提取媒体文件的统一资源定位符URL。
用户可通过媒体文件选播操作界面输入播放请求,在该媒体文件选择播放界面中提供了媒体文件列表,该媒体文件列表包括媒体文件名称、媒体文件内容简介等,用户在浏览该媒体文件列表时,如果查看到感兴趣的媒体文件,可输入选择指令(如点击播放按钮),以生成播放请求,该播放请求包括用户选择的待播放媒体文件的统一资源定位符、媒体文件名称等。
S12、根据该URL向音视频服务器发送下载媒体文件请求。
在该步骤中,向音视频服务器发送下载媒体文件请求,该下载媒体文件请求中包括媒体文件的URL,该音视频服务器根据该URL可获取到对应的媒体文件。该音视频服务器可根据http/rtsp/rtp等网络协议获取该URL对应的媒体文件。
S13、接收该音视频服务器返回的媒体文件。
进一步的,该加密音视频片段包括未加密音视频子片段和加密音视频子片段。
如图2所示,该加密音视频片段D2包括多个大小一样的音视频子片段,其中,该加密音视频片段中的部分音视频子片段为未加密音视频子片段D21,部分音视频子片段为加密音视频子片段D22。该加密音视频子片段的数量可根据实际需要设置,如加密率为10%时,当该加密音视频片段包括100个音视频子片段时,则对该100个音视频子片段中的10个音视频子片段进行加密,具体的,可随机从该100个音视频子片段中选择10个音视频子片段进行加密,也可按照一定的加密间隔规律出从该100个音视频子片段中选择10个音视频子片段进行加密。该加密音视频子片段包括加密片段A和非加密片段,通常为提高该加密音视频子片段的播放效率,不会对该加密音视频子片段中的所有数据进行加密,而是只对该加密音视频子片段中的部分数据进行加密。各个加密音视频子片段中的加密片段的大小、位置可以不同。
进一步的,如图4所示,该步骤S40包括:
S41、判断该加密音视频片段中的音视频子片段是否为未加密音视频子片段;
可通过读取该加密音视频片段中的音视频子片段的加密标识确定该子片段是否为未加密音视频子片段。该加密标识保存在元数据中。在该元数据中保存了加密音视频片段中的各个音视频子片段的加密情况,可设置加密标识为1表示为加密音视频子片段,加密标识为0表示为未加密音视频子片段。
在一实施例中,当读取到该加密音视频片段中的音视频子片段的加密标识为1时,则判断该加密音视频片段中的音视频子片段为加密音视频子片段,当读取到该加密音视频片段中的音视频子片段的加密标识为0时,则判断该加密音视频片段中的子片段为未加密音视频子片段。
S42、若该加密音视频片段中的子片段为未加密音视频子片段,则根据该元数据对该未加密音视频子片段进行解码播放。
从元数据中提取编解码信息,根据该编解码信息对未加密音视频子片段进行解码,再将解码后的数据播放出来。
S43、若该加密音视频片段中的子片段为加密音视频子片段,则根据该许可响应对该加密音视频子片段进行解密,得到解密后的音视频子片段;再根据该元数据对该解密后的音视频子片段进行解码播放。
从该许可响应中获取DRM解密信息,根据该DRM解密信息对该加密音视频子片段进行解密,得到解密后的音视频子片段;再从元数据中获取编解码信息,对解密后的音视频片段进行解码播放。
参照图5,如5为本发明媒体文件的快速启播装置的优选实施例结构示意图,该装置包括:
获取模块10,用于获取媒体文件;
提取模块20,用于对该媒体文件进行解析,提取元数据和音视频数据;该音视频数据包括未加密音视频片段和在该未加密音视频片段后的加密音视频片段;
第一处理模块30,用于根据该元数据对该音视频数据中的未加密音视频片段进行解码播放,及同时根据该元数据向DRM服务器发送许可请求,以获得DRM服务器返回的许可响应。
第二处理模块40,用于根据该元数据及该许可响应,对该音视频数据中的加密音视频片段进行解密解码后播放。
该媒体文件包括元数据和音视频数据,该音视频数据包括未加密音视频片段和在该未加密音视频片段后的加密音视频片段.
该许可响应中包含用于解密该加密音视频片段的DRM解密信息。
该媒体文件预先由DRM服务器生成,音视频内容提供商提供未加密的原始媒体文件,该DRM服务器对该原始媒体文件进行加密,生成媒体文件,并将该媒体文件上传到视频服务器进行保存。具体的,该DRM服务器在接收到未加密的原始媒体文件时,对该原始媒体文件的预设播放时长后的音视频数据进行加密,并将DRM加密信息(包括DRM加密类型、DRM服务器地址等)写入到原始媒体文件的元数据中,生成媒体文件,使得该媒体文件的音视频数据中的预设播放时长前的音视频数据为未加密数据(清流),该音视频数据中的预设播放时长后的音视频数据为加密数据(加密流)。
如图2所示,该媒体文件包括元数据和音视频数据D,该音视频数据D包括未加密音视频片段D1和在该未加密音视频片段后的加密音视频片段D2。该未加密音视频片段D1包括多个大小一样的音视频子片段D11。该元数据包括媒体文件的总播放时长、音视频数据的编解码信息、音视频数据的DRM加密信息等,该DRM加密信息包括DRM加密类型、DRM服务器地址等,音视频数据的DRM加密类型包括playready DRM、widevine DRM、marlin DRM等;该音视频数据包括音频数据及/或视频数据。该未加密音视频片段可包括多个大小一样的未加密音视频子片段。
该第一处理模块30根据该元数据对该音视频数据中的未加密音视频片段进行解密播放,具体的,从该元数据中提取编解码信息,再根据该编解码信息对该音视频数据中的未加密音视频片段进行解码,再将解码后的音视频数据播放出来。
该第一处理模块30在对未加密音视频片段进行解码播放的同时,根据该元数据向DRM服务器发送许可请求,以获得DRM服务器返回的许可响应,具体的,从该元数据中提取DRM加密信息,再根据该DRM加密信息生成许可请求,该许可请求包括DRM加密类型、DRM服务器地址、用户身份、媒体文件名称等。该DRM服务器接收到该许可请求后,对该许可请求进行认证和鉴权,具体的,对用户身份进行认证,确定用户身份是否合法,如果用户身份合法,则认为认证通过,认证通过后,校验该用户身份是否具有观看该媒体文件名称对应的媒体文件的权限,如果该用户身份具有观看该媒体文件名称对应的媒体文件的权限,认为鉴权通过,则该DRM服务器生成许可响应,将媒体文件的DRM解密信息封装到许可响应中,即许可响应包括DRM解密信息,该DRM解密信息包括解密用的key及相关解密证书。通过该DRM解密信息对加密音视频片段进行解密。
该第一处理模块30一边对该音视频数据中的未加密音视频片段进行解码播放,一边根据该元数据向DRM服务器发送许可请求,以获得DRM服务器返回的许可响应,可解决现有技术中,需要在获得许可响应时才播放媒体文件,导致播放延迟的技术缺陷,可快速对媒体文件进行启播,提高用户体验。
在该第一处理模块30对未加密音视频片段播放完成后,该第二处理模块40根据该许可响应对加密音视频片段进行解密,再根据该元数据对解密后的音视频片段进行解码,然后播放。具体的,从该许可响应中获取DRM解密信息,根据该DRM解密信息对该加密音视频片段进行解密,再从元数据中获取编解码信息,对解密后的音视频片段进行解码,然后播放。
该未加密音视频片段的播放时长大于或等于预设时长,该预设时长为向DRM服务器发送许可请求到从DRM服务器接收到许可响应所需要的时长。通常从向DRM服务器发送许可请求到从DRM服务器接收到许可响应需要3-5秒,则该预设时长为5秒,即对该音视频数据中的至少前5秒音视频数据不进行加密,在对该媒体文件启播时,可直接对音视频数据中的前5秒的音视频数据进行解码播放,在解码播放过程中,有足够长的时间从DRM服务器中获得许可响应,以在播放完未加密音视频片段后,可根据该许可响应对加密音视频片段进行解密,不需要暂停播放以等待该许可响应。
进一步的,如图6所示,该获取模块10包括:
提取单元11,用于在接收到播放请求时,从该播放请求中提取媒体文件的统一资源定位符URL;
发送单元12,用于根据该URL向音视频服务器发送下载媒体文件请求;
接收单元13,用于接收该音视频服务器返回的媒体文件。
用户可通过媒体文件选播操作界面输入播放请求,在该媒体文件选择播放界面中提供了媒体文件列表,该媒体文件列表包括媒体文件名称、媒体文件内容简介等,用户在浏览该媒体文件列表时,如果查看到感兴趣的媒体文件,可输入选择指令(如点击播放按钮),以生成播放请求,该播放请求包括用户选择的待播放媒体文件的统一资源定位符、媒体文件名称等。
该发送单元12向音视频服务器发送下载媒体文件请求,该下载媒体文件请求中包括媒体文件的URL,该音视频服务器根据该URL可获取到对应的媒体文件。该音视频服务器可根据http/rtsp/rtp等网络协议获取该URL对应的媒体文件。
进一步的,该加密音视频片段包括未加密音视频子片段和加密音视频子片段。
如图2所示,该加密音视频片段D2包括多个大小一样的音视频子片段,其中,该加密音视频片段中的部分音视频子片段为未加密音视频子片段D21,部分音视频子片段为加密音视频子片段D22。该加密音视频子片段的数量可根据实际需要设置,如加密率为10%时,当该加密音视频片段包括100个音视频子片段时,则对该100个音视频子片段中的10个音视频子片段进行加密,具体的,可随机从该100个音视频子片段中选择10个音视频子片段进行加密,也可按照一定的加密间隔规律出从该100个音视频子片段中选择10个音视频子片段进行加密。该加密音视频子片段包括加密片段A和非加密片段,通常为提高该加密音视频子片段的播放效率,不会对该加密音视频子片段中的所有数据进行加密,而是只对该加密音视频子片段中的部分数据进行加密。各个加密音视频子片段中的加密片段的大小、位置可以不同。
进一步的,如图7所示,该第二处理模块40包括:
判断单元41,用于判断该加密音视频片段中的音视频子片段是否为未加密音视频子片段;
第一处理单元42,用于在该加密音视频片段中的子片段为未加密音视频子片段时,根据该元数据对该未加密音视频子片段进行解码播放;
第二处理单元43,用于在该加密音视频片段中的子片段为加密音视频子片段时,根据该许可响应对该加密音视频子片段进行解密,得到解密后的音视频子片段;再根据该元数据对该解密后的音视频子片段进行解码播放。
该判断单元41可通过读取该加密音视频片段中的音视频子片段的加密标识确定该子片段是否为未加密音视频子片段。该加密标识保存在元数据中。在该元数据中保存了加密音视频片段中的各个音视频子片段的加密情况,可设置加密标识为1表示为加密音视频子片段,加密标识为0表示为未加密音视频子片段。
在一实施例中,当该判断单元41读取到该加密音视频片段中的音视频子片段的加密标识为1时,则判断该加密音视频片段中的音视频子片段为加密音视频子片段,当读取到该加密音视频片段中的音视频子片段的加密标识为0时,则判断该加密音视频片段中的子片段为未加密音视频子片段。
该第一处理单元42在该加密音视频片段中的子片段为未加密音视频子片段时,从元数据中提取编解码信息,根据该编解码信息对未加密音视频子片段进行解码,再将解码后的数据播放出来。
该第二处理单元43在该加密音视频片段中的子片段为加密音视频子片段时,从该许可响应中获取DRM解密信息,根据该DRM解密信息对该加密音视频子片段进行解密,得到解密后的音视频子片段;再从元数据中获取编解码信息,对解密后的音视频片段进行解码播放。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (20)

  1. 一种媒体文件的快速启播方法,其特征在于,该方法包括:
    获取媒体文件;
    对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;
    根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;
    根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放。
  2. 如权利要求1所述的媒体文件的快速启播方法,其特征在于,所述未加密音视频片段的播放时长大于或等于预设时长,所述预设时长为向数字版权管理服务器发送许可请求到从数字版权管理服务器接收到许可响应所需要的时长。
  3. 如权利要求1所述的媒体文件的快速启播方法,其特征在于,所述获取媒体文件的步骤包括:
    在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
    根据所述URL向音视频服务器发送下载媒体文件请求;
    接收所述音视频服务器返回的媒体文件。
  4. 如权利要求1所述的媒体文件的快速启播方法,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  5. 如权利要求4所述的媒体文件的快速启播方法,其特征在于,所述根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放的步骤包括:
    判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    若所述加密音视频片段中的子片段为未加密音视频子片段,则根据所述元数据对所述未加密音视频子片段进行解码播放;
    若所述加密音视频片段中的子片段为加密音视频子片段,则根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
  6. 如权利要求2所述媒体文件的快速启播方法,其特征在于,所述获取媒体文件的步骤包括:
    在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
    根据所述URL向音视频服务器发送下载媒体文件请求;
    接收所述音视频服务器返回的媒体文件。
  7. 如权利要求2所述的媒体文件的快速启播方法,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  8. 如权利要求3所述的媒体文件的快速启播方法,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  9. 如权利要求7所述的媒体文件的快速启播方法,其特征在于,所述根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放的步骤包括:
    判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    若所述加密音视频片段中的子片段为未加密音视频子片段,则根据所述元数据对所述未加密音视频子片段进行解码播放;
    若所述加密音视频片段中的子片段为加密音视频子片段,则根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
  10. 如权利要求8所述的媒体文件的快速启播方法,其特征在于,所述根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放的步骤包括:
    判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    若所述加密音视频片段中的子片段为未加密音视频子片段,则根据所述元数据对所述未加密音视频子片段进行解码播放;
    若所述加密音视频片段中的子片段为加密音视频子片段,则根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
  11. 一种媒体文件的快速启播装置,其特征在于,该装置包括:
    获取模块,用于获取媒体文件;
    提取模块,用于对所述媒体文件进行解析,提取元数据和音视频数据;所述音视频数据包括未加密音视频片段和在所述未加密音视频片段后的加密音视频片段;
    第一处理模块,用于根据所述元数据对所述音视频数据中的未加密音视频片段进行解码播放,并根据该元数据向数字版权管理服务器发送许可请求,以获得数字版权管理服务器返回的许可响应;
    第二处理模块,用于根据所述元数据及所述许可响应,对所述音视频数据中的加密音视频片段进行解密解码后播放。
  12. 如权利要求11所述的媒体文件的快速启播装置,其特征在于,所述未加密音视频片段的播放时长大于或等于预设时长,所述预设时长为向数字版权管理服务器发送许可请求到从数字版权管理服务器接收到许可响应所需要的时长。
  13. 如权利要求11所述的媒体文件的快速启播装置,其特征在于,所述获取模块包括:
    提取单元,用于在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
    发送单元,用于根据所述URL向音视频服务器发送下载媒体文件请求;
    接收单元,用于接收所述音视频服务器返回的媒体文件。
  14. 如权利要求11所述的媒体文件的快速启播装置,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  15. 如权利要求14所述的媒体文件的快速启播装置,其特征在于,所述第二处理模块包括:
    判断单元,用于判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    第一处理单元,用于在所述加密音视频片段中的子片段为未加密音视频子片段时,根据所述元数据对所述未加密音视频子片段进行解码播放;
    第二处理单元,用于在所述加密音视频片段中的子片段为加密音视频子片段时,根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
  16. 如权利要求12所述的媒体文件的快速启播装置,其特征在于,所述获取模块包括:
    提取单元,用于在接收到播放请求时,从所述播放请求中提取媒体文件的统一资源定位符URL;
    发送单元,用于根据所述URL向音视频服务器发送下载媒体文件请求;
    接收单元,用于接收所述音视频服务器返回的媒体文件。
  17. 如权利要求12所述的媒体文件的快速启播装置,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  18. 如权利要求13所述的媒体文件的快速启播装置,其特征在于,所述加密音视频片段包括未加密音视频子片段和加密音视频子片段。
  19. 如权利要求17所述的媒体文件的快速启播装置,其特征在于,所述第二处理模块包括:
    判断单元,用于判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    第一处理单元,用于在所述加密音视频片段中的子片段为未加密音视频子片段时,根据所述元数据对所述未加密音视频子片段进行解码播放;
    第二处理单元,用于在所述加密音视频片段中的子片段为加密音视频子片段时,根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
  20. 如权利要求18所述的媒体文件的快速启播装置,其特征在于,所述第二处理模块包括:
    判断单元,用于判断所述加密音视频片段中的音视频子片段是否为未加密音视频子片段;
    第一处理单元,用于在所述加密音视频片段中的子片段为未加密音视频子片段时,根据所述元数据对所述未加密音视频子片段进行解码播放;
    第二处理单元,用于在所述加密音视频片段中的子片段为加密音视频子片段时,根据所述许可响应对所述加密音视频子片段进行解密,得到解密后的音视频子片段;再根据所述元数据对所述解密后的音视频子片段进行解码播放。
PCT/CN2015/092369 2015-06-03 2015-10-21 媒体文件的快速启播方法及装置 WO2016192270A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510298771.8A CN105704515A (zh) 2015-06-03 2015-06-03 媒体文件的快速启播方法及装置
CN201510298771.8 2015-06-03

Publications (1)

Publication Number Publication Date
WO2016192270A1 true WO2016192270A1 (zh) 2016-12-08

Family

ID=56227800

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092369 WO2016192270A1 (zh) 2015-06-03 2015-10-21 媒体文件的快速启播方法及装置

Country Status (2)

Country Link
CN (1) CN105704515A (zh)
WO (1) WO2016192270A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060604A (zh) * 2016-06-28 2016-10-26 暴风集团股份有限公司 基于bhd文件实现数字权限管理播放的方法及系统
CN106254962A (zh) * 2016-07-28 2016-12-21 武汉斗鱼网络科技有限公司 一种直播客户端快速启动播放的方法及系统
CN107959889A (zh) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 数据流播放方法和装置,数据流类型配置方法和装置
CN107967416B (zh) * 2016-10-19 2021-07-09 华为技术有限公司 版权维权检测的方法、装置和系统
CN106791934A (zh) * 2016-12-14 2017-05-31 暴风集团股份有限公司 针对vip视频的加密播放方法及加密系统
CN106961614B (zh) * 2017-02-22 2020-04-21 北京奇艺世纪科技有限公司 一种加密视频网络播放的方法和系统
CN106973325A (zh) * 2017-03-29 2017-07-21 成都三零凯天通信实业有限公司 地面数字电视机顶盒接收信号的安全识别方法
CN108737854A (zh) * 2017-04-21 2018-11-02 武汉斗鱼网络科技有限公司 一种视频流播放的权限验证方法及装置
CN107197338B (zh) * 2017-05-05 2019-11-26 中广热点云科技有限公司 一种确保广告播放时长的方法
CN107613317A (zh) * 2017-09-08 2018-01-19 康佳集团股份有限公司 一种播放本地加密媒体的方法、存储介质及智能电视
CN107995219A (zh) * 2017-12-22 2018-05-04 掌阅科技股份有限公司 文件加速展现方法、计算设备及计算机存储介质
CN110881142A (zh) * 2019-10-15 2020-03-13 平安科技(深圳)有限公司 基于rtmp的音视频数据加解密方法、装置及可读存储介质
CN112804563B (zh) * 2019-11-13 2022-11-04 腾讯科技(深圳)有限公司 媒体文件的播放方法、装置及存储介质
CN111432287A (zh) * 2020-04-14 2020-07-17 南京巨鲨显示科技有限公司 音视频文件的切片化加密方法及系统、解密方法及系统
CN111757176B (zh) * 2020-06-11 2021-11-30 青岛海信传媒网络技术有限公司 流媒体文件安全播放方法及显示设备
CN114697746A (zh) * 2020-12-28 2022-07-01 北京金山云网络技术有限公司 视频启播方法、装置、电子设备及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050207569A1 (en) * 2004-03-16 2005-09-22 Exavio, Inc Methods and apparatus for preparing data for encrypted transmission
CN101258750A (zh) * 2005-07-14 2008-09-03 高通股份有限公司 用于对多媒体内容进行加密/解密以允许随机存取的方法和设备
CN101902333A (zh) * 2010-07-20 2010-12-01 中兴通讯股份有限公司 数字版权管理的应用方法及终端设备
CN103379365A (zh) * 2012-04-27 2013-10-30 日立(中国)研究开发有限公司 内容获取装置及方法、内容及多媒体发行系统
CN103873243A (zh) * 2012-12-12 2014-06-18 腾讯科技(北京)有限公司 实现数据安全传输的方法、系统、服务器和终端
CN103999090A (zh) * 2011-12-14 2014-08-20 奈飞公司 改善流式数字媒体回放的启动时间

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318927A (ja) * 2003-04-11 2004-11-11 Sony Corp デジタルデータの保存方法および記録媒体
GB0625178D0 (en) * 2006-12-18 2007-01-24 Ubc Media Group Plc Improvements relating to downloading data
CN102457561B (zh) * 2010-10-28 2015-02-11 无锡江南计算技术研究所 数据访问方法及使用该数据访问方法的设备
CN103971033B (zh) * 2014-05-23 2016-11-02 华中师范大学 一种应对非法拷贝的数字版权管理方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050207569A1 (en) * 2004-03-16 2005-09-22 Exavio, Inc Methods and apparatus for preparing data for encrypted transmission
CN101258750A (zh) * 2005-07-14 2008-09-03 高通股份有限公司 用于对多媒体内容进行加密/解密以允许随机存取的方法和设备
CN101902333A (zh) * 2010-07-20 2010-12-01 中兴通讯股份有限公司 数字版权管理的应用方法及终端设备
CN103999090A (zh) * 2011-12-14 2014-08-20 奈飞公司 改善流式数字媒体回放的启动时间
CN103379365A (zh) * 2012-04-27 2013-10-30 日立(中国)研究开发有限公司 内容获取装置及方法、内容及多媒体发行系统
CN103873243A (zh) * 2012-12-12 2014-06-18 腾讯科技(北京)有限公司 实现数据安全传输的方法、系统、服务器和终端

Also Published As

Publication number Publication date
CN105704515A (zh) 2016-06-22

Similar Documents

Publication Publication Date Title
WO2016192270A1 (zh) 媒体文件的快速启播方法及装置
WO2016192254A1 (zh) 网络视频在线播放的方法和装置
WO2013139239A1 (en) Method for recommending users in social network and the system thereof
WO2016091011A1 (zh) 字幕切换方法及装置
WO2016101698A1 (zh) 基于dlna技术实现屏幕推送的方法及系统
WO2017012419A1 (zh) 流媒体解密方法及装置
WO2017084311A1 (zh) 单分片视频播放加速方法及装置
WO2017107378A1 (zh) 基于hls流媒体的视频数据加速下载方法及装置
WO2014069949A1 (ko) 컨텐트 재생 방법 및 장치
WO2018023926A1 (zh) 电视与移动终端的互动方法及系统
WO2017177524A1 (zh) 音视频同步播放的方法及装置
WO2014187158A1 (zh) 终端数据云分享的控制方法、服务器及终端
WO2018018681A1 (zh) 视频节目预览方法及装置
WO2017071352A1 (zh) 密码的推送方法、推送系统及终端设备
WO2017020649A1 (zh) 音视频播放控制方法及装置
WO2017063368A1 (zh) 视频广告的插播方法及装置
WO2016090991A1 (zh) 流媒体数据的下载方法及装置
WO2019010926A1 (zh) 广告的推送方法、装置及计算机可读存储介质
WO2018034491A1 (en) A primary device, an accessory device, and methods for processing operations on the primary device and the accessory device
WO2015018185A1 (zh) 实现分布式遥控的方法、装置及其电视端和移动终端
WO2012028079A1 (zh) 一种移动终端备份数据的导入方法及装置
WO2018036057A1 (zh) 软件后台自适应升级方法及装置
WO2017054488A1 (zh) 电视播放控制方法、服务器及电视播放控制系统
WO2018023924A1 (zh) 电视播放控制方法及系统
WO2016101252A1 (zh) 智能电视的频道信息显示方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15893919

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 30.04.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 15893919

Country of ref document: EP

Kind code of ref document: A1