[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112887784A - Method, device, equipment and system for playing encrypted video - Google Patents

Method, device, equipment and system for playing encrypted video Download PDF

Info

Publication number
CN112887784A
CN112887784A CN202110096506.7A CN202110096506A CN112887784A CN 112887784 A CN112887784 A CN 112887784A CN 202110096506 A CN202110096506 A CN 202110096506A CN 112887784 A CN112887784 A CN 112887784A
Authority
CN
China
Prior art keywords
data
video
playing
frame
encrypted
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.)
Pending
Application number
CN202110096506.7A
Other languages
Chinese (zh)
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.)
Netposa Technologies Ltd
Original Assignee
Netposa Technologies Ltd
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 Netposa Technologies Ltd filed Critical Netposa Technologies Ltd
Priority to CN202110096506.7A priority Critical patent/CN112887784A/en
Publication of CN112887784A publication Critical patent/CN112887784A/en
Pending legal-status Critical Current

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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention relates to a method, a device, equipment and a system for playing an encrypted video. The method comprises the following steps: receiving user operation data and determining whether to start an encrypted video play mode; if the file is started, audio and video parameter information stored in a preset file packaging container and data required by decryption are obtained; the file packaging container comprises a plurality of data blocks, audio and video parameter information and data required for decryption are stored in the first data block, and encrypted video data are stored in the remaining data blocks; determining the play mode of the encrypted video: if the video data are played sequentially, the encrypted video data in the rest databases are read sequentially to serve as the video data to be decrypted; if the skip play is carried out, reading corresponding encrypted video data in the residual data blocks according to the skip position to serve as video data to be decrypted; and decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption. The method improves the efficiency and the accuracy of playing the encrypted video by using the data blocks in the file encapsulation container.

Description

Method, device, equipment and system for playing encrypted video
Technical Field
The invention relates to the technical field of encrypted video playing, in particular to a method, a device, equipment and a system for playing an encrypted video.
Background
With the rapid development of the network era, the network propagation speed of information is also rapidly increased. The video is used as the most intuitive and efficient information transmission carrier, and the copyright or privacy of the content of the video is emphasized under specific conditions, so that the copyright or privacy problem of the video has to be protected by technical means, and the video encryption technology is produced accordingly. After the video is encrypted, the real-time playing of the video must decrypt the encrypted video to play the video normally.
At present, under the condition of not considering safety factors and skipping, the whole encrypted video file can be completely decrypted to generate a normal video file, and then the normal video file is played by a general player. However, in more scenes, the encrypted video file needs to be protected, in order to support operations such as quick skip of the encrypted video, the encrypted video file is indexed when being generated, index information, encryption parameters and key information are written into an index file, then when a playing end plays, audio and video streams, the encryption parameters and the like are taken out according to the index file, then the code stream is decrypted, and finally decoding playing is achieved. The method for indexing the encrypted file firstly has higher requirement on operation normativity when the encrypted video file is stored or filed in a row, the loss of one index file can cause the permanent invalidation of the encrypted video, the hierarchical directory of the file placement and the like are required during playing, once an error occurs, the normal playing of the video can be influenced, and the error rate of the normal playing of the video is higher.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a system for playing an encrypted video to overcome the shortcomings of the prior art. The problem of high error rate when playing the encrypted video at present is solved.
In order to achieve the purpose, the invention adopts the following technical scheme:
a playing method of an encrypted video comprises the following steps:
receiving user operation data, and determining whether to start an encrypted video playing mode according to the user operation data;
if the encrypted video playing mode is started, acquiring audio and video parameter information stored in a preset file packaging container and needed data for decryption; the file packaging container comprises a set number of data blocks, the first data block is stored with the audio and video parameter information and the data required for decryption, and the rest data blocks are stored with encrypted video data;
determining a playing mode of the encrypted video according to the user operation data; the playing mode comprises sequential playing and skip playing;
if the playing mode is the sequential playing, sequentially reading the encrypted video data in the remaining database as the video data to be decrypted;
if the playing mode is the skip playing, reading corresponding encrypted video data in the residual data block according to a skip position preset by a user, and using the encrypted video data as video data to be decrypted;
and decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption.
Optionally, the process of constructing the file packaging container includes:
constructing the set number of data blocks, and sequentially constructing and connecting all the data blocks according to a preset sequence; the space size of the data block is a set frame;
storing the audio and video parameter information and the data required by decryption into a first data block;
and storing the encrypted video data into the data block connected with the first data block until the space of the data block connected with the first data block is used up, and then sequentially storing the encrypted video data into the next data block according to a preset sequence.
Optionally, the reading, according to a skip position preset by a user, corresponding encrypted video data in the remaining data block as video data to be decrypted includes:
calculating to obtain the position of a target frame to be jumped to according to the jump position;
determining a target data block according to the target frame position and the setting frame;
traversing the target data block to obtain target I frame data corresponding to the target frame position;
and acquiring the encrypted video data where the target I frame data is located as video data to be decrypted.
Optionally, traversing the target data block to obtain target I frame data corresponding to the target frame position includes:
acquiring frame video data at the position of the target frame in the target data block;
judging whether the frame video data is I frame data;
if the frame video data is the I frame data, the frame video data is the target I frame data;
and if not, sequentially traversing the encrypted video data before the target frame position from the frame video data until the data of the type of the I frame is obtained and is used as the target I frame data.
Optionally, the encrypted video data includes header recording data and audio-video data; the head recording data includes: adding the length of the code stream; (ii) a
The acquiring the encrypted video data where the target I frame data is located includes:
reading the length of the encrypted code stream in the head record data;
and reading the whole frame of the audio and video data which contains the target I frame data and has the same length as the length of the encryption code stream as the video data to be decrypted.
Optionally, the recording data by the head further includes: whether a key frame flag is present;
the determining whether the frame video data is I frame data includes:
reading the key frame mark;
and determining whether the frame video data is I frame data according to the key frame mark.
Optionally, the audio/video data includes encrypted code stream data and encrypted audio/video content;
the decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption comprises the following steps:
decrypting the encrypted code stream data according to the data required for decryption to obtain a decrypted code stream;
and decrypting and playing the encrypted audio and video content according to the audio and video parameter information and the decryption code stream.
A playback apparatus of an encrypted video, comprising:
the user request receiving module is used for receiving user operation data and determining whether to start an encrypted video playing mode according to the user operation data;
the first data acquisition module is used for acquiring audio and video parameter information stored in a preset file packaging container and data required by decryption if the encrypted video playing mode is started; the file packaging container comprises a set number of data blocks, the first data block is stored with the audio and video parameter information and the data required for decryption, and the rest data blocks are stored with encrypted video data;
the play mode determining module is used for determining the play mode of the encrypted video according to the user operation data; the playing mode comprises sequential playing and skip playing;
the video playing mode comprises a sequential playing video module, a video playing module and a video playing module, wherein the sequential playing video module is used for reading the encrypted video data in the residual database in sequence to serve as video data to be decrypted if the playing mode is sequential playing;
a skip playing video obtaining module, configured to, if the playing mode is skip playing, read corresponding encrypted video data in the remaining data blocks according to a skip position preset by a user, and use the encrypted video data as video data to be decrypted;
and the decryption playing module is used for decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption.
A playback device of an encrypted video, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the playing method of the encrypted video;
the processor is used for calling and executing the computer program in the memory.
A playback system for encrypted video, comprising:
the file packaging container and the playing device which is in communication connection with the file packaging container are disclosed.
The technical scheme provided by the application can comprise the following beneficial effects:
the application discloses a playing method of an encrypted video, which comprises the following steps: when a user needs to play an encrypted video, a play mode that the user operates data to start the encrypted video is generated, audio and video parameter information and data required for decryption are read from a first data block of a file packaging container, then a play mode selected by the user is determined, if the sequential play is selected, video data to be decrypted stored in the data block is sequentially read from a second data block of the file packaging container, if the skip play is selected, video data to be decrypted corresponding to a skip position is searched in the data block according to the skip position selected by the user, and then the video data to be decrypted is decrypted and played according to the audio and video parameter information and the data required for decryption. In the method, the encrypted video data is stored in the file packaging container, and the video data is stored in the file packaging container in the form of data blocks. When decryption is needed, the encrypted video data and the related data needed by decryption are read from the data block of the file packaging container, and then decryption and playing are carried out. According to the method, the video data is stored in the form of the data blocks in the file packaging container, so that the functions of data safety, quick skip and the like are guaranteed, no additional index file is generated, the files are convenient to store and are not easy to lose, and the playing efficiency and accuracy of the encrypted video are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a playing method of an encrypted video according to an embodiment of the present invention;
fig. 2 is a block diagram of a playing apparatus for encrypted video according to an embodiment of the present invention;
fig. 3 is a block diagram of a playing device for encrypted video according to an embodiment of the present invention;
fig. 4 is a block diagram of a playing system of an encrypted video according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Fig. 1 is a flowchart of a playing method of an encrypted video according to an embodiment of the present invention. Referring to fig. 1, a method for playing an encrypted video includes:
step 101: and receiving user operation data, and determining whether to start an encrypted video playing mode according to the user operation data. When the user needs to play the encrypted video data, the user operates the device and then generates user operation data. The video data may be audio data or video data.
Step 102: if the encrypted video playing mode is started, acquiring audio and video parameter information stored in a preset file packaging container and needed data for decryption; the file packaging container comprises a set number of data blocks, the audio and video parameter information and the data required for decryption are stored in the first data block, and the encrypted video data are stored in the remaining data blocks. The file packaging container is composed of a plurality of data blocks (blocks) with the same size, wherein audio and video parameter information and data required by decryption are stored in a first data block, and the audio and video parameter information comprises: coding mode, frame rate, resolution, audio decoding parameters, etc. Decrypting the desired data includes: encryption parameters and keys, others are null. And sequentially inserting the encrypted audio and video data, namely the video data to be decrypted, from the second data block, wherein a header with a fixed length is added in front of each encrypted and decrypted data block and is used for recording information such as the audio and video type, the data length, whether a key frame exists and the like of the encrypted data. It should be noted that the size of the data block can be set according to the user requirement, for example, enough size is reserved according to the video stream with the common code rate, the space of 100 frames of video stream is ensured, and 4-10MB is recommended.
Step 103: determining a playing mode of the encrypted video according to the user operation data; the play mode includes sequential play and skip play. When playing the video, the user can select to play in sequence or jump. And then, corresponding video playing is carried out according to the playing mode selected by the user.
Step 104: and if the playing mode is the sequential playing, sequentially reading the encrypted video data in the residual database as the video data to be decrypted. When the user selects to play the video in sequence, the video data is read from the second data block of the file packaging container as the video data to be decrypted.
Step 105: and if the playing mode is the skip playing, reading corresponding encrypted video data in the residual data block according to a skip position preset by a user to serve as video data to be decrypted. And when the user selects the jump playing, determining the corresponding video data according to the jump progress bar position selected by the user.
The specific process comprises the following steps: and receiving the jump position selected by the user. When the user selects the jump position, the user generally drags the progress bar of the video playing interface, and the position of the progress bar represents the jump position.
And calculating to obtain the position of the target frame to be jumped to according to the jump position. The corresponding frame position having regulation, i.e. the target frame position, can be obtained from the progress bar position.
And determining a target data block according to the target frame position and the setting frame. When the file encapsulation container is constructed, the space size of the data blocks is set according to the user requirement, for example, each data block is set to store 100 frames of video code streams. Then, when jumping playing is carried out, the data block where the target frame needing jumping is located can be determined by dividing the position of the target frame selected by the user by the space size of the data block.
And traversing the target data block to obtain target I frame data corresponding to the position of the target frame, and obtaining the encrypted video data where the target I frame data is located as video data to be decrypted. After the data block where the target frame is located is determined, data in the data block are traversed until I-frame type data corresponding to the target frame is found. And then acquiring the encrypted video data of the target I frame data.
When traversing the data block, firstly determining frame video data corresponding to the frame in the data block according to the target frame, then judging whether the frame video data is I frame data, only the I frame data can be played, if not, traversing the data in the data block from the position of the target frame to the front until the first I frame data before the target frame is obtained, and taking the I frame data as the data to be played.
Meanwhile, when video data to be decrypted is obtained, firstly reading the length of the encryption code stream in the data recorded by a reading head; and then, reading the audio/video data with the length being the length of the encrypted code stream and containing the target I frame data as the video data to be decrypted. And reading the data with the length of the encrypted stream, wherein the read data can be ensured to be played as the whole frame of data.
Meanwhile, the head recording data further includes: audio video type. By reading the audio and video type, whether the video or the audio is to be played can be determined, if the video is to be played, a preset video decoder is selected for decoding, and if the audio is to be played, a preset audio decoder is selected for decoding.
Step 106: and decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption. The audio and video data comprise encrypted code stream data and encrypted audio and video contents. The head recording data is stored in the first data block in the file packaging container, and the audio and video data is stored in the rest data blocks in the file packaging container. When the video data to be decrypted is decrypted, the data of the code stream to be encrypted is decrypted according to the data required by decryption in the first data block, and then the encrypted audio and video content is decrypted according to the audio and video parameter information.
Further, the head recording data further includes: whether a key frame flag. When video data to be decrypted is acquired according to a jump position selected by a user, whether the acquired encrypted data is I frame data needs to be judged, and the basis for judging whether the acquired encrypted data is the I frame data is a key frame mark in the data recorded according to the header. If the key frame mark is not the key frame mark, the frame of video data is represented as I frame data and can be played, and if the key frame mark is not the key frame mark, the frame of video data is represented as not the I frame data and can not be played, and the data block needs to be traversed forward until the I frame data is found.
To describe the playing process of the encrypted video in this application in more detail, a skip playing manner is illustrated, and the following details are provided:
and 100 frames of video code streams are stored in each data block in the preset file packaging container. The user selects the frame position of the jump to be 250 frames. When video playing is carried out, audio and video parameter information, encryption parameters and keys required by decoding are read from a first data block in a file packaging container, and then a target frame to be played is found. The user selects the data at the position of 250 frames to play, since 100 frames of video code streams are stored in the data blocks, 250/100 can be used to determine that the target frame is in the 3 rd data block storing the encrypted video data, and since the encrypted video data is stored in the file packaging container from the second data block, the target frame is in the 4 th data block of the whole file packaging container. Then traversing the data in the 4 th data block until the data traverse to the 50 th frame position in the data block, acquiring the encrypted video data of the frame, namely the required 250 th frame encrypted data, then reading whether a key frame mark is in the head record data stored in the 4 th data block, determining that the frame data is not I frame data through the mark, then traversing the data before the 50 th frame data in the 4 th data block to obtain the first I frame data, then reading the encrypted video data corresponding to the frame position, decrypting the encrypted code stream data in the encrypted video data through the encryption parameter and the key, determining the audio and video type in the head record data of the encrypted video data corresponding to the frame position as the video type on the basis, selecting a video decoder, and then decrypting the encrypted audio and video content through the audio and video parameter information by using the video decoder, and then jumping to play.
In the application, all encrypted video data are stored in a file packaging container, and when video playing is needed, the encrypted video data are directly called from the file packaging container to be decrypted and played. Meanwhile, data required for decryption are stored in the file packaging container. Meanwhile, the data blocks are partitioned by the file encapsulation container, so that the data blocks are conveniently utilized to realize quick positioning, and the effect of the target frame position is obtained. Meanwhile, in order to support the streaming media capability of the encrypted stream, the design of the data structure in the container. According to the video playing method, when the encrypted video is stored, functions such as safety and fast skip are guaranteed, meanwhile, no additional index file is generated, file storage is facilitated, and the video playing method is not easy to lose.
Furthermore, on the basis of the above embodiments, the present application also discloses a process for constructing a document packaging container, specifically:
the method comprises the steps of firstly constructing a plurality of data blocks, simultaneously connecting the data blocks in sequence, wherein the space sizes of all the data blocks are the same, and the setting of the space sizes is set by a user according to actual requirements. And then storing the audio and video parameter information and the data required by decryption into a first data block, then sequentially storing the encrypted video data into the remaining data blocks, and after the space of one data block is used up, storing the encrypted video data into the next data block until all the data blocks are full of data.
In the embodiment, all relevant information is directly written into the file encapsulation container together with the encrypted video data as a part of the container in a protocol mode, so that the functions of safety, quick jump playing and the like are ensured, no additional index file is generated, the storage of the file is facilitated, and the file is not easy to lose.
Corresponding to the playing method of the encrypted video provided by the embodiment of the invention, the embodiment of the invention also provides a playing device of the encrypted video. Please see the examples below.
Fig. 2 is a block diagram of a playback apparatus for encrypted video according to an embodiment of the present invention. Referring to fig. 2, a playback apparatus of an encrypted video includes:
a user request receiving module 201, configured to receive user operation data, and determine whether to start an encrypted video playing mode according to the user operation data.
The first data acquisition module 202 is configured to acquire audio and video parameter information and decryption required data stored in a preset file encapsulation container if the encrypted video play mode is started; the file packaging container comprises a set number of data blocks, the audio and video parameter information and the data required for decryption are stored in the first data block, and the encrypted video data are stored in the remaining data blocks.
A play mode determining module 203, configured to determine a play mode of the encrypted video according to the user operation data; the playing mode comprises sequential playing and skip playing;
and an acquire sequential playing video module 204, configured to, if the playing mode is the sequential playing, sequentially read the encrypted video data in the remaining database as video data to be decrypted.
A skip playing video obtaining module 205, configured to, if the playing mode is skip playing, read corresponding encrypted video data in the remaining data blocks according to a skip position preset by a user, as video data to be decrypted.
And the decryption playing module 206 is configured to decrypt and play the video data to be decrypted according to the audio/video parameter information and the data required for decryption.
Still further, the above apparatus further comprises:
the data block construction module is used for constructing the data blocks with the set number and sequentially constructing and connecting all the data blocks according to a preset sequence; the space size of the data block is a set frame;
the first data storage module is used for storing the audio and video parameter information and the data required by decryption into a first data block;
and the second data storage module is used for storing the encrypted video data into the data blocks connected with the first data block until the space of the data blocks connected with the first data block is used up and then sequentially storing the encrypted video data into the next data block according to a preset sequence. For example: 100 frames of video data are stored in each data block, and when the data stored in the data block is full of 100 frames of data, the encrypted video data is written into the next connected data block. Meanwhile, the encrypted video data and the encrypted audio data exist in the encrypted video data, and the storage space occupied by the encrypted audio data is usually small, so that the space occupied by the audio data in the data block is not counted after the audio data is written into the data block.
The skip playing video acquiring module 205 is specifically configured to: calculating to obtain the position of a target frame to be jumped to according to the jump position; determining a target data block according to the target frame position and the setting frame; traversing the target data block to obtain target I frame data corresponding to the target frame position; and acquiring the encrypted video data where the target I frame data is located as video data to be decrypted.
The decryption playing module 206 is specifically configured to: decrypting the encrypted code stream data according to the data required for decryption to obtain a decrypted code stream; and decrypting and playing the encrypted audio and video content according to the audio and video parameter information and the decryption code stream.
The device stores the encrypted video data into the file packaging container by citing the file packaging container, and directly reads the encrypted video data from the file packaging container when playing the video.
In order to more clearly introduce a hardware system for implementing the embodiment of the present invention, an embodiment of the present invention further provides a playing system for an encrypted video, which corresponds to the playing method for an encrypted video provided in the embodiment of the present invention. Please see the examples below.
Fig. 3 is a block diagram of a playing device for encrypted video according to an embodiment of the present invention. Referring to fig. 3, a playback apparatus of an encrypted video includes:
a processor 301, and a memory 302 connected to the processor 301;
the memory 302 is used for storing a computer program, and the computer program is at least used for executing the playing method of the encrypted video;
the processor 301 is used for calling and executing the computer program in the memory 302.
Meanwhile, fig. 4 is a structural diagram of a playing system of an encrypted video according to an embodiment of the present invention. Referring to fig. 4, a playing system of an encrypted video includes:
a file packaging container 401, and a playback device 402 as described above communicatively coupled to the file packaging container 401.
The device or the system introduces the concept of a file packaging container, stores the encrypted video data into the file packaging container, ensures the functions of safety, quick jump and the like when storing the encrypted video, does not generate other index files, is convenient for storing the files and is not easy to lose.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A method for playing encrypted video, comprising:
receiving user operation data, and determining whether to start an encrypted video playing mode according to the user operation data;
if the encrypted video playing mode is started, acquiring audio and video parameter information stored in a preset file packaging container and needed data for decryption; the file packaging container comprises a set number of data blocks, the first data block is stored with the audio and video parameter information and the data required for decryption, and the rest data blocks are stored with encrypted video data;
determining a playing mode of the encrypted video according to the user operation data; the playing mode comprises sequential playing and skip playing;
if the playing mode is the sequential playing, sequentially reading the encrypted video data in the remaining database as the video data to be decrypted;
if the playing mode is the skip playing, reading corresponding encrypted video data in the residual data block according to a skip position preset by a user, and using the encrypted video data as video data to be decrypted;
and decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption.
2. The method of claim 1, wherein constructing the document packaging container comprises:
constructing the set number of data blocks, and sequentially constructing and connecting all the data blocks according to a preset sequence; the space size of the data block is a set frame;
storing the audio and video parameter information and the data required by decryption into a first data block;
and storing the encrypted video data into the data blocks connected with the first data block, and sequentially storing the data blocks connected with the first data block into the next data block according to a preset sequence after the space of the data blocks is used up.
3. The method according to claim 2, wherein the reading the corresponding encrypted video data in the remaining data block according to the jumping position preset by the user as the video data to be decrypted comprises:
calculating to obtain the position of a target frame to be jumped to according to the jump position;
determining a target data block according to the target frame position and the setting frame;
traversing the target data block to obtain target I frame data corresponding to the target frame position;
and acquiring the encrypted video data where the target I frame data is located as video data to be decrypted.
4. The method of claim 3, wherein traversing the target data block to obtain target I frame data corresponding to the target frame position comprises:
acquiring frame video data at the position of the target frame in the target data block;
judging whether the frame video data is I frame data;
if the frame video data is the I frame data, the frame video data is the target I frame data;
and if not, sequentially traversing the encrypted video data before the target frame position from the frame video data until the data of the type of the I frame is obtained and is used as the target I frame data.
5. The method of claim 4, wherein the encrypted video data comprises header recording data and audio-video data; the head recording data includes: adding the length of the code stream; (ii) a
The acquiring the encrypted video data where the target I frame data is located includes:
reading the length of the encrypted code stream in the head record data;
and reading the whole frame of the audio and video data which contains the target I frame data and has the same length as the length of the encryption code stream as the video data to be decrypted.
6. The method of claim 5, wherein the head recording data further comprises: whether a key frame flag is present;
the determining whether the frame video data is I frame data includes:
reading the key frame mark;
and determining whether the frame video data is I frame data according to the key frame mark.
7. The method of claim 5, wherein the audio-video data comprises encrypted codestream data and encrypted audio-video content;
the decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption comprises the following steps:
decrypting the encrypted code stream data according to the data required for decryption to obtain a decrypted code stream;
and decrypting and playing the encrypted audio and video content according to the audio and video parameter information and the decryption code stream.
8. A playback apparatus for encrypted video, comprising:
the user request receiving module is used for receiving user operation data and determining whether to start an encrypted video playing mode according to the user operation data;
the first data acquisition module is used for acquiring audio and video parameter information stored in a preset file packaging container and data required by decryption if the encrypted video playing mode is started; the file packaging container comprises a set number of data blocks, the first data block is stored with the audio and video parameter information and the data required for decryption, and the rest data blocks are stored with encrypted video data;
the play mode determining module is used for determining the play mode of the encrypted video according to the user operation data; the playing mode comprises sequential playing and skip playing;
the video playing mode comprises a sequential playing video module, a video playing module and a video playing module, wherein the sequential playing video module is used for reading the encrypted video data in the residual database in sequence to serve as video data to be decrypted if the playing mode is sequential playing;
a skip playing video obtaining module, configured to, if the playing mode is skip playing, read corresponding encrypted video data in the remaining data blocks according to a skip position preset by a user, and use the encrypted video data as video data to be decrypted;
and the decryption playing module is used for decrypting and playing the video data to be decrypted according to the audio and video parameter information and the data required for decryption.
9. A playback apparatus for encrypted video, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program for executing at least the playback method of an encrypted video according to any one of claims 1 to 7;
the processor is used for calling and executing the computer program in the memory.
10. A playback system for encrypted video, comprising:
a file packaging container, and a playback device according to claim 9 communicatively coupled to the file packaging container.
CN202110096506.7A 2021-01-25 2021-01-25 Method, device, equipment and system for playing encrypted video Pending CN112887784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110096506.7A CN112887784A (en) 2021-01-25 2021-01-25 Method, device, equipment and system for playing encrypted video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110096506.7A CN112887784A (en) 2021-01-25 2021-01-25 Method, device, equipment and system for playing encrypted video

Publications (1)

Publication Number Publication Date
CN112887784A true CN112887784A (en) 2021-06-01

Family

ID=76050942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110096506.7A Pending CN112887784A (en) 2021-01-25 2021-01-25 Method, device, equipment and system for playing encrypted video

Country Status (1)

Country Link
CN (1) CN112887784A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333236A (en) * 2011-10-27 2012-01-25 中国华录集团有限公司 Video content encryption and decryption system
CN109862424A (en) * 2019-03-29 2019-06-07 北京金山安全软件有限公司 Video playing method and device and electronic equipment
CN110545448A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Media playing method and device based on data encryption and storage medium
CN110611830A (en) * 2019-09-29 2019-12-24 腾讯科技(深圳)有限公司 Video processing method, device, equipment and medium
CN110909371A (en) * 2019-11-21 2020-03-24 广东美的厨房电器制造有限公司 Data encryption method, electronic device and medium
CN111031353A (en) * 2019-12-11 2020-04-17 上海乐相科技有限公司 Video encryption method and device
US20200296453A1 (en) * 2017-12-06 2020-09-17 Hong Kong Liveme Corporation Limited Video playing method and apparatus, and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333236A (en) * 2011-10-27 2012-01-25 中国华录集团有限公司 Video content encryption and decryption system
US20200296453A1 (en) * 2017-12-06 2020-09-17 Hong Kong Liveme Corporation Limited Video playing method and apparatus, and electronic device
CN110545448A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Media playing method and device based on data encryption and storage medium
CN109862424A (en) * 2019-03-29 2019-06-07 北京金山安全软件有限公司 Video playing method and device and electronic equipment
CN110611830A (en) * 2019-09-29 2019-12-24 腾讯科技(深圳)有限公司 Video processing method, device, equipment and medium
CN110909371A (en) * 2019-11-21 2020-03-24 广东美的厨房电器制造有限公司 Data encryption method, electronic device and medium
CN111031353A (en) * 2019-12-11 2020-04-17 上海乐相科技有限公司 Video encryption method and device

Similar Documents

Publication Publication Date Title
JP4527164B2 (en) Recording medium, recording apparatus, and reproducing apparatus
US8320733B2 (en) Method of preparing DVD-video formatted data, method for reconstructing DVD-video data and DVD-video data structure
JP4481889B2 (en) Data recording apparatus and method, program, and recording medium
JP2010238354A (en) Information storage medium storing multi-angle data, and recording method and reproducing apparatus thereof
CA2509106A1 (en) Editing of real time information on a record carrier
KR19990083631A (en) Method and apparatus for recording a continuous data
AU763849B2 (en) Signal processing on information files so as to obtain characteristic point information sequences
TW200421302A (en) Recording medium having data structure for managing reproduction of still pictures recorded thereon and recording and reproducing methods and apparatuses
KR101375058B1 (en) Apparatus, method, and recording medium recoding computer program for processing information
JP2010283837A (en) Method for recording data, method for retrieving set of data, data file, data structure, and medium for storing the data
JP2008047163A (en) Information processor, information processing method, and computer program
CN112887784A (en) Method, device, equipment and system for playing encrypted video
JP2004128938A (en) Av data recording/reproducing device and method
US7471872B2 (en) Reproducing apparatus for data stored in disk-shape storage media
JP4072044B2 (en) Moving image recording method
KR20080033433A (en) Method and apparatus for reproducing data, recording medium, and method and apparatus for recording data
KR20080050480A (en) Information processing device, information processing method, and computer program
KR100920655B1 (en) Method for managing still picture of high density optical disc
JP5120479B2 (en) Data signal recording apparatus and data signal reproducing apparatus
JP2001285800A (en) Data signal recording and reproducing device and data signal recording and reproducing method
JP5240014B2 (en) Video recording device
JP5299043B2 (en) Video recording / reproducing apparatus, video recording / reproducing method, and video recording / reproducing program
JP2006031744A (en) Device for recording and reproducing av data
JP2009200567A (en) Video recording and playback apparatus
JP2006033028A (en) Av data recording/reproducing device

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210601

WD01 Invention patent application deemed withdrawn after publication