WO2018033152A1 - 视频播放方法及装置 - Google Patents

视频播放方法及装置 Download PDF

Info

Publication number
WO2018033152A1
WO2018033152A1 PCT/CN2017/098151 CN2017098151W WO2018033152A1 WO 2018033152 A1 WO2018033152 A1 WO 2018033152A1 CN 2017098151 W CN2017098151 W CN 2017098151W WO 2018033152 A1 WO2018033152 A1 WO 2018033152A1
Authority
WO
WIPO (PCT)
Prior art keywords
encoded
video
reference target
target object
video frame
Prior art date
Application number
PCT/CN2017/098151
Other languages
English (en)
French (fr)
Inventor
胡祥斌
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018033152A1 publication Critical patent/WO2018033152A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/142Detection of scene cut or scene change
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/179Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a scene or a shot
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding

Definitions

  • This document relates to, but is not limited to, the field of video playback technology, and in particular, to a video playback method and apparatus.
  • the video coding method performs pure compression on the video sequence, that is, the original video sequence is acquired/inputted, compressed and encoded by the encoder, and the code stream is generated, and then the user decodes and plays the code stream. Based on time considerations or interest needs, users may only need to efficiently and quickly pay attention to some scenes of interest in the video sequence, etc., if the traditional video coding method is to some extent an inefficient method and waste.
  • the embodiment of the invention provides a video playing method and device, which can effectively compress video content of interest to a user, save storage space, and facilitate users to quickly obtain desired video content.
  • the embodiment of the invention provides a video playing method, including:
  • the predetermined type of encoded video code stream that matches the reference target object is decoded and played.
  • the step of performing matching coding on the video frame to be encoded in the sequence of video frames to be encoded and the reference target object, and acquiring a predetermined type of coded video code stream that matches the reference target object includes: :
  • the step of performing matching coding on the video frame to be encoded in the sequence of video frames to be encoded and the reference target object, and acquiring a predetermined type of coded video code stream that matches the reference target object includes: :
  • the matching result information is that the video frame to be encoded does not match the reference target object, and the video frame to be encoded is not marked;
  • the tagged encoded video frame code stream is extracted from the encoded video bitstream to obtain a predetermined type of encoded video bitstream that matches the reference target object.
  • the step of acquiring the sequence of the video frame to be encoded and the pre-configured reference target object further includes: configuring the reference target object.
  • the step of marking the to-be-encoded video frame includes:
  • the matching result information is that the to-be-encoded video frame matches the plurality of reference target objects, corresponding to the plurality of reference target objects, performing corresponding multiple different markings on the to-be-encoded video frame;
  • extracting the encoded coded video frame code stream from the encoded video code stream, and obtaining a predetermined type of coded video code stream that matches the reference target object includes:
  • the extraction instruction After receiving the input extraction instruction, if the extraction instruction is to extract an encoded video frame that includes at least one of the plurality of reference target objects, extracting the corresponding marker according to the flag corresponding to the selected reference target object. Encoding the video frame code stream to obtain a predetermined type of coded video code stream that matches the selected reference target object.
  • the embodiment of the invention further provides a video playing device, comprising:
  • Obtaining a module configured to obtain a sequence of video frames to be encoded and a pre-configured reference target object
  • a matching coding module configured to perform matching coding on the to-be-encoded video frame in the sequence of to-be-coded video frames, and obtain a predetermined type of coded video code stream that matches the reference target object;
  • the decoding play module is configured to, when receiving the play instruction, perform decoding and playing on the predetermined type of encoded video code stream that matches the reference target object.
  • the matching coding module is configured to perform matching coding on the video frame to be encoded in the sequence of video frames to be encoded and the reference target object to obtain matching with the reference target object.
  • a predetermined type of encoded video code stream matching the to-be-encoded video frame in the sequence of video frames to be encoded with the reference target object based on the structured description, and recording matching result information; according to the matching result information Determining whether to encode the to-be-encoded video frame, if the matching result information is that the to-be-encoded video frame matches the reference target object, encoding the to-be-encoded video frame to obtain the reference
  • the matching coding module is configured to perform matching and coding of the video frame to be encoded in the sequence of video frames to be encoded and the reference target object by using the following manner.
  • Decoding a predetermined type of encoded video code stream that matches a target object traversing the sequence of video frames to be encoded; matching a video frame to be encoded in the sequence of video frames to be encoded with the reference target object, and recording a match a result information; determining, according to the matching result information, whether to mark the video frame, if the matching result information is that the to-be-coded video frame matches the reference target object, performing the to-be-coded video frame Marking; if the matching result information is that the video frame to be encoded does not match the reference target object, the video frame to be encoded is not marked; and the entire sequence of the video frame to be encoded after the matching flag is encoded Obtaining a coded video code stream; after receiving the input fetch instruction, extracting the tagged coded video frame code stream from the coded video bitstream to
  • the device further includes: a configuration module configured to configure the reference target object.
  • the matching coding module is configured to: if the matching result information is that the to-be-coded video frame matches a plurality of reference target objects, corresponding to the multiple reference target objects, to be encoded
  • the video frame performs a corresponding plurality of different markings; after receiving the input extraction instruction, if the extraction instruction is to extract an encoded video frame including at least one of the plurality of reference target objects, according to the selected reference
  • the mark corresponding to the target object extracts the encoded video frame of the corresponding mark, and obtains a predetermined type of coded video code stream that matches the selected reference target object.
  • the video playing method and device obtains a sequence of video frames to be encoded and a pre-configured reference target object, and performs matching coding on the video frame to be encoded in the sequence of video frames to be encoded and the reference target object.
  • the video content that the user is interested in saves storage space, and facilitates the user to quickly obtain the desired video content, thereby improving the user experience.
  • FIG. 1 is a schematic flow chart of a first embodiment of a video playing method according to the present invention.
  • FIG. 2 is a schematic framework diagram of a video coding standard
  • FIG. 3 is a schematic flow chart of a second embodiment of a video playing method according to the present invention.
  • FIG. 4 is a schematic flow chart of a third embodiment of a video playing method according to the present invention.
  • FIG. 5-1 and FIG. 5-2 are schematic diagrams of a video frame encoding and decoding process according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of encoding a reference target object number according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of frame encoding of a reference target object sequence according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of code stream extraction according to an embodiment of the present invention.
  • FIG. 9 is a schematic flow chart showing a further improvement of the third embodiment of the video playing method of the present invention.
  • FIG. 10 is a schematic diagram of functional modules of an embodiment of a video playback apparatus according to the present invention.
  • the solution of the embodiment of the present invention mainly includes: acquiring a sequence of a video frame to be encoded and a pre-configured reference target object; matching and encoding the to-be-encoded video frame in the sequence of the video frame to be encoded with the reference target object, and acquiring And the reference target object matches a predetermined type of coded video code stream; when receiving the play instruction, decoding and playing a predetermined type of coded video code stream that matches the reference target object, so as to facilitate the user to quickly obtain the Video content is needed to enhance the user experience.
  • an embodiment of the present invention provides a video playing method, as a first embodiment of the present invention, the method includes:
  • Step S1 acquiring a sequence of video frames to be encoded and a pre-configured reference target object
  • the execution body of the method of this embodiment may be a video playing system, and the video playing system may be carried on a terminal device such as a mobile phone, a computer, or a television.
  • the reference target object may be pre-configured, and after the video playing system is powered on, the video frame sequence to be encoded and the pre-configured reference target object are obtained.
  • the sequence of the video frame to be encoded may be from a device or a server such as a network or a set top box, or may be a video picture taken by the user.
  • the above reference target object may be an image screen of interest to the user, such as a certain program, a certain TV drama character, or a certain scene.
  • the reference target object can be configured as needed, and the number can be one or more.
  • Step S2 performing matching coding on the to-be-encoded video frame in the sequence of the video frame to be encoded and the reference target object, and acquiring a predetermined type of coded video code stream that matches the reference target object;
  • the video playing system After acquiring the video frame sequence to be encoded and the pre-configured reference target object, the video playing system matches the to-be-encoded video frame in the video frame sequence to be encoded with the pre-configured reference target object, and matches the reference target object.
  • the video frame to be encoded is encoded to obtain a predetermined type of encoded video code stream that matches the reference target object.
  • the predetermined type refers to an image screen of interest to the user.
  • FIG. 2 is a schematic framework diagram of a video coding standard, that is, a process of generating a code stream after video coding by a video sequence.
  • the original sequence image is performed.
  • Subtracting to obtain the difference then performing DCT transform on the difference and then quantizing, and finally entropy coding to generate the code stream.
  • the encoding end needs to perform the inverse process to obtain the reconstructed value, that is, the inverse quantization is needed, the DCT inverse transform IDCT, and then the loop image is used to obtain the reconstructed image as a reference frame, and the reference frame can be predicted and compensated by motion.
  • the reference frame can be predicted and compensated by motion.
  • a predicted value for inter prediction is a predicted value for inter prediction.
  • Step S3 when receiving the play instruction, decoding and playing the predetermined type of encoded video code stream that matches the reference target object.
  • the video playing system decodes and plays the predetermined type of encoded video code stream that matches the reference target object.
  • the embodiment of the present invention obtains a sequence of a video frame to be encoded and a pre-configured reference target object, and performs matching coding on the video frame to be encoded in the sequence of the video frame to be encoded with the reference target object to obtain a predetermined type that matches the reference target object.
  • a second embodiment of the present invention provides a video playing method, which is based on The first embodiment of the method is described, and the above step S2 is further improved.
  • step S2: matching and encoding the to-be-encoded video frame in the sequence of the video frame to be encoded with the reference target object, and acquiring the predetermined type of the encoded video code stream that matches the reference target object may include :
  • S21 Perform matching of the to-be-coded video frame to the reference target object in the sequence of the video frame to be encoded, and record the matching result information.
  • video structured description is a technology of video content information extraction. According to the semantic relationship of video content, it adopts the processing methods of time and space segmentation, feature extraction and object recognition to organize text information that can be understood by computers and people.
  • the video frame to be encoded that is of interest to the user is first obtained from the sequence of video frames to be encoded, and then encoded to generate a video code stream.
  • the matching result information is that the video frame to be encoded in the sequence of the video frame to be encoded matches the pre-configured reference target object
  • the video frame to be encoded is encoded, and all the codes to be encoded in the sequence of the video frame to be encoded are obtained by the above matching coding mode.
  • the video frame is judged and processed to finally obtain a predetermined type of encoded video code stream that matches the reference target object; if the matching result information is that the video frame to be encoded does not match the reference target object, the encoded video frame is not encoded.
  • the video frame to be encoded in the sequence of the video frame to be encoded that does not match the reference target object is not encoded, not only It saves the storage space of the video playback system, and also facilitates the user to quickly obtain the desired video content.
  • the embodiment of the present invention may further include step S11: configuring the reference target object.
  • the reference target object when configuring the reference target object, may be configured according to a user's needs, wherein the reference target object may be an image image that is of interest to the user, such as a certain program, a certain TV drama character, or a certain scene, etc., the number of which may be For one or more.
  • the reference target object can be stored locally at the terminal.
  • a third embodiment of the present invention provides a video playing method, which is based on the first embodiment of the foregoing method, and specifically further defines the foregoing step S2.
  • step S2 matching and encoding the to-be-encoded video frame in the video frame sequence to be encoded with the reference target object, and acquiring a predetermined type of encoded video code stream that matches the reference target object.
  • S24 Determine, according to the matching result information, whether to mark the to-be-encoded video frame in the sequence of the encoded video frames.
  • the video frame to be encoded is marked; if the matching result information is not the video frame to be encoded and the reference target object, If they match, the encoded video frame is not marked;
  • all the video frames to be encoded in the sequence of the video frames to be encoded are encoded.
  • the feature to be encoded in the video frame sequence to be encoded and the reference target are obtained through feature matching based on the structured description. If the objects match, the coded video frame is marked; if the video frame to be encoded does not match the reference target object, the encoded video frame is not marked.
  • the encoded video code stream is obtained by encoding, wherein the marked encoded video frame is a video picture of interest to the user, and the matching mark is
  • a coded video frame code stream that is, a subcode stream, which can be independently decoded is generated for the marked video frame.
  • the marked encoded video frame code stream is extracted from the encoded video code stream for decoding and playing.
  • FIG. 5-1 is a schematic diagram of the video encoding and decoding process of the first embodiment and the second embodiment, where the first embodiment may be used in real time. Coding The second embodiment can be used for the scenario of offline coding.
  • FIG. 5-2 is a schematic diagram of the video codec process of the third embodiment. The third embodiment can be used for real-time coding and offline coding.
  • the embodiment may adopt the following scheme:
  • the video frame of the matched mark can be independently decoded by designing the object label (for example, adding a corresponding syntax element in the video encoding protocol) and encoding the frame type (I frame). Substream extraction.
  • the solution of this embodiment relates to the marking of the target image of interest in the sequence of encoded frames, and the distinguishing of the plurality of target images of interest, so that corresponding syntax elements can be added to the HEVC standard protocol for labeling and recording.
  • an interest target image frame flag bit roi_pic_flag is added to the HEVC standard protocol slice header information, as shown in Table 1, to indicate whether the target image is of interest, the flag position may be 0 or 1, and then a record is added to be interested.
  • the counter roi_pic_idx of the target image category is used to record the number of target image categories of interest, which is consistent with the number of target objects.
  • the first step judging the target object matching result, if it is the target image of interest, the roi_pic_flag flag is set to 1, and the second step is entered; if it is not the target image of interest, the sixth step is entered;
  • Step 2 Determine whether the target object matches the coding sequence for the first time, and if so, forcibly set the coding frame type of the frame to an I frame, and obtain the label roi_pic_idx of the target image of interest in the target object; if not, enter the third step;
  • the third step determining whether the target object matching the current frame appears in the previous frame, if it is entering the fourth step; if not, entering the fifth step;
  • the fourth step the current frame assigns a label roi_pic_idx corresponding to the target object of interest.
  • Step 5 The encoded frame type of the frame is forcibly set to an I frame, and the label roi_pic_idx of the target image of interest in the target object is obtained.
  • Step 6 The roi_pic_flag flag is set to 0 and encoded according to the HEVC standard method.
  • the first step parsing the target image flag bit roi_pic_flag in the slice header, if the flag bit is 1, enter the second step; if the flag bit is 0, enter the third step;
  • the second step parsing the syntax element roi_pic_idx of the target image object category label of interest, determining whether the category number roi_pic_idx first appears, and if so, directly extracting the frame code stream and storing the code stream file of the new image object category label, if No, go to the third step;
  • the third step storing in the code stream file of the extracted corresponding image object category label
  • Step 4 Skip the frame and go to the next frame.
  • the video frame of the matched mark can be made by designing the object label (for example, adding a corresponding syntax element in the video coding protocol), and encoding the frame type (I frame), so that the matched marked video frame can be As an independent decodable sub-stream extraction, it improves the smoothness of video playback and meets user needs.
  • the video frame sequence to be encoded and the pre-configured reference target object are obtained by the foregoing solution.
  • the video frame to be encoded in the sequence of the video frame to be encoded is matched and encoded with the reference target object, and the reference is obtained.
  • the method is treated
  • the encoded video frame is marked, and subsequently, the encoded encoded video frame stream is extracted from the encoded video stream for decoding and playing, thereby effectively compressing the video content of interest to the user, saving storage space, and facilitating the user to quickly obtain the desired video content. , improved user experience.
  • step S24 is further limited.
  • the matching result information is that the video frame to be encoded matches the reference target object, and marking the video frame to be encoded may include:
  • the matching result information is that the video frame to be encoded in the sequence of the video frame to be encoded matches the multiple reference target objects, corresponding to the plurality of reference target objects, the corresponding coded video frames are correspondingly marked with multiple different labels.
  • step S26 is further limited.
  • the step S26 is: after receiving the input extraction instruction, extracting the marked encoded video frame code stream from the encoded video code stream, to obtain a predetermined type of encoded video code that matches the reference target object.
  • Streams can include:
  • the extraction instruction After receiving the input extraction instruction, if the extraction instruction is to extract an encoded video frame that includes at least one of the plurality of reference target objects, extract the corresponding marker according to the label corresponding to the selected reference target object.
  • the encoded video frame is subjected to a predetermined type of encoded video code stream that matches the selected reference target object.
  • This embodiment considers that the reference target objects that the user is interested in may be in the same video frame or in different video frames. Therefore, when marking, different reference target objects may be marked with different serial numbers.
  • the video frame sequence to be encoded and the pre-configured reference target object are obtained by the foregoing solution.
  • the video frame to be encoded in the sequence of the video frame to be encoded is matched and encoded with the reference target object, and the reference is obtained.
  • a predetermined type of encoded video code stream to which the target object matches wherein, in the encoding process, by the feature matching based on the structured description, if the video frame to be encoded in the sequence of the video frame to be encoded matches the reference target object, the method is treated
  • the encoded video frame is marked. When marking, the different reference target objects are marked with different serial numbers.
  • the encoded video frames of the user-specified mark are extracted from the encoded video code stream for decoding and playing, which not only effectively compresses the user sense.
  • Interested video content saves storage space and allows users to quickly get the video content they need, improving the user experience.
  • the reference target object A and the reference target object B are pre-configured in the video playback system, and the reference target object A and the reference target object B are sorted, as indicated by the corresponding bit representation of the roi_pic_idx in Table 1 (a reference target object is represented by one bit), As shown in FIG. 6, after the video playing system is powered on, the video frame sequence to be encoded and the pre-configured reference target object A and the reference target object B are obtained.
  • the video playback system After the video playback system obtains the sequence of the video frame to be encoded and the pre-configured reference target object A and the reference target object B, respectively, the video frames to be encoded in the sequence of the video frame to be encoded are respectively referenced to the reference frame.
  • the target object A and the reference target object B are matched, and the corresponding to-be-encoded video frame containing any reference target object A or B in the sequence of the video frame to be encoded is marked as an I frame (intra-coded frame), as shown in Table 1.
  • Roi_pic_flag is set to 1
  • the video frame to be encoded in the sequence of video frames to be encoded may contain both the reference target object A and the reference target object B.
  • the roi_pic_flag is set to 001; if only the reference target is included For the object B, the roi_pic_flag is set to 010; if both the reference object target A and the reference target object B are included, the roi_pic_flag is set to 011; if the video frame to be encoded in the sequence of video frames to be encoded contains neither the reference target object A, Nor does it include the reference target object B, then the roi_pic_flag in Table 1 is set to 0, and the frame type is encoded in I frame or P frame, as shown in FIG.
  • the encoded code stream is obtained by encoding all the video frames to be encoded.
  • the video playback system receives the input fetch instruction to extract the encoded video frame containing the reference target object A, it is only necessary to extract the coded stream with the encoded video roi_pic_flag of 1 and roi_pic_idx of XX1 from all encoded video frame code streams;
  • the playback system receives the input fetch instruction to extract the encoded video frame containing the reference target object B, it is only necessary to extract the code stream whose oi_pic_flag is 1 and roi_pic_idx is X1X from all coded video frame code streams.
  • the video playback system receives the play instruction, and extracts a video frame code stream containing the required reference target object according to the user's needs, as shown in FIG. In this way, users can quickly and easily obtain the desired video content.
  • the embodiment of the present invention obtains a sequence of video frames to be encoded and a pre-configured reference target object by using the foregoing solution.
  • the video frame to be encoded in the sequence of video frames to be encoded is matched and encoded with a reference target object, and is obtained and referenced.
  • a predetermined type of encoded video code stream matched by the target object when receiving the play instruction, decoding and playing a predetermined type of encoded video code stream matching the reference target object, effectively compressing the video content of interest to the user,
  • the storage space is saved, and the user can quickly obtain the required video content and improve the user experience.
  • an embodiment of the present invention further provides a video playing device.
  • the video codec device can be installed on a terminal device such as a mobile phone, a computer, or a television.
  • a first embodiment of the present invention provides a video playback apparatus, including: an acquisition module 10, a matching encoding module 20, and a decoding playback module 30.
  • the obtaining module 10 is configured to acquire a sequence of video frames to be encoded and a pre-configured reference target object;
  • the reference target object may be pre-configured in the video playing system.
  • the acquiring module 10 is configured to obtain a sequence of the video frame to be encoded and a pre-configured reference target object.
  • the video playback system can be carried on terminal devices such as mobile phones, computers, and televisions.
  • the sequence of the video frame to be encoded may be from a device or a server such as a network or a set top box, or may be a video picture taken by the user.
  • the above reference target object may be an image screen of interest to the user, such as a certain program, a certain TV drama character, or a certain scene.
  • the reference target object can be configured as needed, and the number can be one or more.
  • the matching encoding module 20 is configured to perform matching encoding on the video frame to be encoded in the sequence of video frames to be encoded with the reference target object, and acquire a predetermined type of encoded video code stream that matches the reference target object;
  • the matching encoding module 20 is configured to match the to-be-encoded video frame in the sequence of the video frame to be encoded with the pre-configured reference target object, and The video frame to be encoded that matches the reference target object is encoded to obtain a predetermined type of encoded video code stream that matches the reference target object.
  • the predetermined type refers to an image screen of interest to the user.
  • FIG. 2 is a schematic framework diagram of a video coding standard, that is, a process of generating a code stream after video coding by a video sequence.
  • a video coding standard that is, a process of generating a code stream after video coding by a video sequence.
  • the original sequence image is performed.
  • DCT transform on the difference and then quantizing
  • entropy coding to generate the code stream.
  • the encoding end needs to perform the inverse process to obtain the reconstructed value, that is, the inverse quantization is needed, and the DCT inverse transform IDCT is used as the reference frame after being filtered and reconstructed, and the reference frame can be used as the interframe after motion prediction and compensation.
  • the predicted value of the forecast is a schematic framework diagram of a video coding standard, that is, a process of generating a code stream after video coding by a video sequence.
  • the decoding play module 30 is configured to decode and play a predetermined type of encoded video code stream that matches the reference target object upon receiving the play command.
  • the video playing system decodes and plays the predetermined type of encoded video code stream that matches the reference target object.
  • the video playback device of the embodiment of the present invention may further include a configuration module 40. Set to pre-configure the reference target object.
  • the obtaining module 10 is configured to acquire a sequence of video frames to be encoded and a pre-configured reference target object.
  • the matching encoding module 20 is configured to perform a video frame to be encoded and a reference target object in a sequence of video frames to be encoded. Matching the code to obtain a predetermined type of encoded video code stream that matches the reference target object; the decoding play module 30 is configured to decode and play the predetermined type of the encoded video code stream that matches the reference target object when the play instruction is received It effectively compresses the video content that the user is interested in, saves storage space, and facilitates the user to quickly obtain the desired video content, thereby improving the user experience.
  • a second embodiment of the present invention provides a video playback apparatus based on the first embodiment of the video playback apparatus of the present invention, and further improves the function of the matching encoding module 20.
  • the matching coding module 20 is further configured to match the to-be-encoded video frame in the video frame sequence to be encoded with the reference target object based on the structured description, and record the matching result information.
  • Video structured description is a technology for extracting video content information. According to the semantic relationship of video content, it adopts the processing methods such as spatiotemporal segmentation, feature extraction and object recognition to organize text information that can be understood by computers and people.
  • the video frame to be encoded that is of interest to the user is first obtained from the sequence of video frames to be encoded, and then encoded to generate a video code stream.
  • the matching encoding module 20 in this embodiment is further configured to determine, according to the matching result information, whether to encode the video frame to be encoded in the sequence of encoded video frames.
  • the matching encoding module 20 is configured to encode the to-be-encoded video frame, and adopt the above matching coding manner to treat Determining and processing all the video frames to be encoded in the encoded video frame sequence, and finally obtaining a predetermined type of encoded video code stream that matches the reference target object; if the matching result information is that the video frame to be encoded does not match the reference target object, The matching encoding module 20 is then arranged to not encode the encoded video frame.
  • the video frame to be encoded that matches the reference target object is matched by the matching encoding module 20.
  • the video frame to be encoded in the sequence is encoded, and the video frame to be encoded in the sequence of the video frame to be encoded that does not match the reference target object is not encoded, which not only saves the storage space of the video player system, but also facilitates quick access by the user. Required video content.
  • a third embodiment of the present invention provides a video playback apparatus based on the first embodiment of the video playback apparatus of the present invention, and further improves the matching coding module 20 in detail.
  • the matching coding module 20 is further configured to: traverse the sequence of the video frame to be encoded, match the to-be-encoded video frame in the sequence of the video frame to be encoded with the reference target object, and record the matching result information, according to the matching result.
  • the information determines whether the video frame to be encoded in the sequence of encoded video frames is to be tagged.
  • the matching encoding module 20 sets the video frame to be encoded; if the matching result information is the video to be encoded The frame does not match the reference target object, and the matching encoding module 20 is set to not mark the encoded video frame.
  • the matching encoding module 20 is further configured to encode the to-be-encoded video frame after the matching flag to obtain a marked encoded video code stream.
  • the matching coding module 20 is further configured to, after receiving the input extraction instruction, extract the marked coded video frame code stream from the coded video code stream to obtain a predetermined type of code that matches the reference target object. Video stream.
  • all the video frames to be encoded in the sequence of the video frames to be encoded are encoded.
  • the feature to be encoded in the video frame sequence to be encoded and the reference target are obtained through feature matching based on the structured description. If the objects match, the coded video frame is marked; if the video frame to be encoded does not match the reference target object, the encoded video frame is not marked.
  • the encoded video code stream is obtained by encoding, wherein the marked encoded video frame is a video picture of interest to the user, and the matching mark is
  • a coded video frame code stream that is, a subcode stream, which can be independently decoded is generated for the marked video frame.
  • the marked encoded video frame code stream is extracted from the encoded video code stream for decoding and playing.
  • the video codec process of this embodiment can be as shown in Figure 5-2.
  • the embodiment may adopt the following scheme:
  • the video frame of the matched mark can be independently decoded by designing the object label (for example, adding a corresponding syntax element in the video encoding protocol) and encoding the frame type (I frame). Substream extraction,
  • the solution of this embodiment relates to the marking of the target image of interest in the sequence of encoded frames, and the distinguishing of the plurality of target images of interest, so that corresponding syntax elements can be added to the HEVC standard protocol for labeling and recording.
  • an interest target image frame flag bit roi_pic_flag is added to the HEVC standard protocol slice header information, as shown in Table 1, to indicate whether the target image is of interest, and the flag position can be 0 or 1, and the coding module is matched according to the target object.
  • the feedback result is determined to determine the value of the flag bit, and secondly, a counter roi_pic_idx for recording the target image category of interest is added to record the number of target image categories of interest, which is consistent with the target object number.
  • the first step judging the target object matching result, if it is the target image of interest, the roi_pic_flag flag is set to 1, and the second step is entered; if it is not the target image of interest, the sixth step is entered;
  • the second step is to determine whether the target object matches the coding sequence for the first time. If yes, the coded frame type of the frame is forcibly set to an I frame, and the label roi_pic_idx of the target image of interest in the target object is obtained. If no, go to the third step;
  • the third step determining whether the target object matching the current frame appears in the previous frame, if it is entering the fourth step; if not, entering the fifth step;
  • the fourth step the current frame assigns a label roi_pic_idx corresponding to the target object of interest.
  • Step 5 The encoded frame type of the frame is forcibly set to an I frame, and the label roi_pic_idx of the target image of interest in the target object is obtained.
  • Step 6 The roi_pic_flag flag is set to 0 and encoded according to the HEVC standard method.
  • the first step parsing the target image flag bit roi_pic_flag in the slice header, if the flag bit is 1, enter the second step; if the flag bit is 0, enter the third step;
  • the second step parsing the syntax element roi_pic_idx of the target image object category label of interest, determining whether the category number roi_pic_idx first appears, and if so, directly extracting the frame code stream and storing the code stream file of the new image object category label, if No, go to the third step;
  • the third step storing in the code stream file of the extracted corresponding image object category label
  • Step 4 Skip the frame and go to the next frame.
  • the video frame of the matched mark can be made by designing the object label (for example, adding a corresponding syntax element in the video coding protocol), and encoding the frame type (I frame), so that the matched marked video frame can be As an independent decodable sub-stream extraction, it improves the smoothness of video playback and meets user needs.
  • the video frame sequence to be encoded and the pre-configured reference target object are obtained by using the foregoing solution, and the video frame to be encoded in the sequence of the video frame to be encoded is performed with the reference target object.
  • Matching a code to obtain a predetermined type of coded video code stream that matches the reference target object wherein, in the encoding process, by feature matching based on the structured description, if the video frame to be encoded in the sequence of video frames to be encoded is When the reference target object matches, the coded video frame is marked, and subsequently, the coded video frame code stream is extracted from the encoded video stream for decoding and playing, thereby effectively compressing the video content of interest to the user, thereby saving storage space. It is convenient for users to quickly obtain the required video content and enhance the user experience.
  • the matching coding module 20 is configured to: if the matching result information is obtained, the video frame to be encoded in the sequence of video frames to be encoded matches the plurality of reference target objects, corresponding to multiple Referring to the target object, the encoded video frame is subjected to a corresponding plurality of different tags.
  • the matching encoding module 20 is configured to: after receiving the input extraction instruction, if the extraction instruction is to extract the encoded video frame including at least one of the plurality of reference target objects, extract the corresponding according to the flag corresponding to the selected reference target object
  • the tagged encoded video frame results in a predetermined type of encoded video bitstream that matches the selected reference target object.
  • This embodiment considers that the reference target objects that the user is interested in may be in the same video frame or in different video frames. Therefore, when marking, different reference target objects may be marked with different serial numbers.
  • the video frame sequence to be encoded and the pre-configured reference target object are obtained by the foregoing solution.
  • the video frame to be encoded in the sequence of the video frame to be encoded is matched and encoded with the reference target object, and the reference is obtained.
  • a predetermined type of encoded video code stream to which the target object matches wherein, in the encoding process, by the feature matching based on the structured description, if the video frame to be encoded in the sequence of the video frame to be encoded matches the reference target object, the method is treated
  • the encoded video frame is marked. When marking, the different reference target objects are marked with different serial numbers.
  • the encoded video frames of the user-specified mark are extracted from the encoded video code stream for decoding and playing, which not only effectively compresses the user sense.
  • Interested video content saves storage space and allows users to quickly get the video content they need, improving the user experience.
  • the configuration module 40 is configured to pre-configure the reference target object A and the reference target object B in the video playing system, and the matching encoding module 20 is set to the reference target object A and the reference target object B. Sorting, and marking the reference target object A as the serial number I, and marking the reference target object B as the serial number II.
  • the obtaining module 10 is configured to obtain the video frame sequence to be encoded and the pre-configured reference target object A and Refer to target object B.
  • the obtaining module 10 is configured to obtain a sequence of video frames to be encoded and a pre-configured reference target object A and a reference target object B
  • the matching encoding module 20 is configured to respectively set the to-be-encoded video frames in the sequence of video frames to be encoded with the reference target object A and The reference target object B is matched, and the video frame to be encoded corresponding to the reference target object A in the sequence of the video frame to be encoded is marked as an I frame, and the video frame to be encoded containing the reference target object B in the sequence of the video frame to be encoded is corresponding.
  • the corresponding frame of the video frame to be encoded is marked as an I frame and an II frame; If the video frame to be encoded in the encoded video frame sequence contains neither the reference target object A nor the reference target object B, no labeling is performed.
  • the matching encoding module 20 is configured to encode the marked video frame I frame to be encoded, the video frame II frame to be encoded, the I frame and the II frame to be encoded, and the to-be-encoded video frame that is not marked to obtain the encoded video I.
  • the matching encoding module 20 is configured to: if the extracted instruction to receive the input is to extract the encoded video frame including the reference target object A, extract the encoded video I frame code stream from all the encoded video frame code streams; if the input extraction instruction is received When extracting the encoded video frame including the reference target object B, extracting the encoded video II frame code stream from all encoded video frame code streams, and if receiving the input extraction instruction is to extract the encoded video frame containing the reference target object B, The encoded video I frame and the II frame code stream are extracted from all coded video frame code streams.
  • the decoding play module 30 is configured to receive the play instruction, and perform decoding play after extracting the encoded video I frame or the encoded video I frame or the encoded video I frame and the II frame according to the user's needs. In this way, users can quickly and easily obtain the desired video content.
  • the obtaining module 10 is configured to acquire a sequence of video frames to be encoded and a pre-configured reference target object.
  • the matching encoding module 20 is configured to perform a video frame to be encoded and a reference target object in a sequence of video frames to be encoded. Matching the code to obtain a predetermined type of encoded video code stream that matches the reference target object; the decoding play module 30 is configured to receive the play finger In order to decode, a predetermined type of encoded video code stream that matches the reference target object is decoded and played.
  • the video content that is of interest to the user is effectively compressed, which saves storage space, facilitates the user to quickly obtain the desired video content, and improves the user experience.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the method described in the foregoing embodiments.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules, or other data. , removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media.
  • the foregoing embodiment effectively compresses video content that is of interest to the user, saves storage space, facilitates users to quickly obtain desired video content, and improves user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种视频播放方法及装置。该方法包括:获取待编码视频帧序列及预先配置的参考目标对象(S1);将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流(S2);在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放(S3)。

Description

视频播放方法及装置 技术领域
本文涉及但不限于视频播放技术领域,尤其涉及一种视频播放方法及装置。
背景技术
随着宽带技术的发展和视频编解码技术的进步,高清视频在人们生活中已日益普及,用户每天接触的视频数量惊人。
然而,通常视频编码方法都是对视频序列进行纯粹的压缩,即采集/输入原始视频序列,经过编码器压缩编码,生成码流,然后用户对码流进行解码播放观看。用户基于时间考虑,或者兴趣需要,可能只需要高效快速关注视频序列中感兴趣的部分场景画面等,这时候如果按照传统的视频编码方法从某种程度上说是一种低效方式和浪费。
因此,在视频编码时,如何快速有效获取用户感兴趣的内容画面等需求变得日益迫切。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种视频播放方法及装置,能够有效压缩用户感兴趣的视频内容,节省存储空间,方便用户快速获取所需视频内容。
本发明实施例提出一种视频播放方法,包括:
获取待编码视频帧序列及预先配置的参考目标对象;
将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流;
在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
可选地,所述将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流的步骤包括:
将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息;
根据所述匹配结果信息确定是否对所述待编码视频帧进行编码,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行编码,得到与所述参考目标对象相匹配的预定类型的编码视频码流;若所述匹配结果信息为所述待编码视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行编码。
可选地,所述将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流的步骤包括:
遍历所述待编码视频帧序列;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配,并记录匹配结果信息;
根据所述匹配结果信息确定是否对所述视频帧进行标记,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行标记;若所述匹配结果信息为所述待编码的视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行标记;
对匹配标记后的整个待编码视频帧序列进行编码,得到编码视频码流;
在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,得到与所述参考目标对象相匹配的预定类型的编码视频码流。
可选地,所述获取待编码视频帧序列及预先配置的参考目标对象的步骤之前还包括:配置参考目标对象。
可选地,所述若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行标记的步骤包括:
若所述匹配结果信息为所述待编码视频帧与多个参考目标对象相匹配,则对应所述多个参考目标对象,对所述待编码视频帧进行相应的多个不同标记;
所述在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,,得到与所述参考目标对象相匹配的预定类型的编码视频码流的步骤包括:
在接收到输入的提取指令后,若所述提取指令为提取包含多个参考目标对象中的至少一个参考目标对象的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧码流,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流。
本发明实施例还提供了一种视频播放装置,包括:
获取模块,设置为获取待编码视频帧序列及预先配置的参考目标对象;
匹配编码模块,设置为将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流;
解码播放模块,设置为在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
可选地,所述匹配编码模块,是设置为通过如下方式实现将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流:将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息;根据所述匹配结果信息确定是否对所述待编码视频帧进行编码,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行编码,得到与所述参考目标对象相匹配的预定类型的编码视频码流;若所述匹配结果信息为所述待编码视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行编码。
可选地,所述匹配编码模块,是设置为通过如下方式实现将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所 述参考目标对象相匹配的预定类型的编码视频码流:遍历所述待编码视频帧序列;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配,并记录匹配结果信息;根据所述匹配结果信息确定是否对所述视频帧进行标记,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行标记;若所述匹配结果信息为所述待编码的视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行标记;对匹配标记后的整个待编码视频帧序列进行编码,得到编码视频码流;在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,得到与所述参考目标对象相匹配的预定类型的编码视频码流。
可选地,所述装置还包括:配置模块,设置为配置参考目标对象。
可选地,所述匹配编码模块,是设置为若所述匹配结果信息为所述待编码视频帧与多个参考目标对象相匹配,则对应所述多个参考目标对象,对所述待编码视频帧进行相应的多个不同标记;在接收到输入的提取指令后,若所述提取指令为提取包含多个参考目标对象中的至少一个参考目标对象的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流。
本发明实施例提出的视频播放方法及装置,通过获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流;在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1是本发明视频播放方法第一实施例的流程示意图;
图2是视频编码标准的原理框架图;
图3是本发明视频播放方法第二实施例的流程示意图;
图4是本发明视频播放方法第三实施例的流程示意图;
图5-1、图5-2是本发明实施例中的视频帧编解码流程示意图;
图6是本发明实施例参考目标对象序号编码示意图;
图7是本发明实施例参考目标对象序列帧编码示意图;
图8是本发明实施例码流提取示意图;
图9是本发明视频播放方法第三实施例进一步改进的流程示意图;
图10是本发明视频播放装置一实施例的功能模块示意图。
本发明的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例的解决方案主要包括:获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流;在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放,以方便用户快速获取所需视频内容,提升用户体验。
参照图1所示,本发明实施例提供了一种视频播放方法,作为本发明的第一种实施例,该方法包括:
步骤S1,获取待编码视频帧序列及预先配置的参考目标对象;
本实施例方法的执行主体可以是视频播放系统,该视频播放系统可以承载于手机、电脑、电视机等终端设备上。
具体实施时,可以预先配置参考目标对象,视频播放系统开机后,获取待编码视频帧序列及预先配置的参考目标对象。
其中,待编码视频帧序列可以来自网络、机顶盒等设备或服务器,也可以是用户拍摄的视频画面。
上述参考目标对象可以是用户感兴趣的图像画面,比如某个节目,某个电视剧人物,或者某个场景等。
该参考目标对象可以根据需要配置,其数量可以为一个或多个。
步骤S2,将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;
视频播放系统获取到待编码视频帧序列及预先配置的参考目标对象后,将待编码视频帧序列中的待编码视频帧与预先配置的参考目标对象进行匹配,并对与参考目标对象相匹配的待编码视频帧进行编码,获取与参考目标对象相匹配的预定类型的编码视频码流。
本实施例中,预定类型即指用户感兴趣的图像画面。
如图2所示,图2是视频编码标准的原理框架图,即由视频序列经过视频编码后生成码流的过程,视频序列输入后,经过帧内或帧间预测后,与原始序列图像进行相减得到差值,然后对差值进行DCT变换后量化,最后进行熵编码生成码流。为了得到预测值,编码端需要进行逆过程得到重建值,即需要进行反向量化,DCT反变换IDCT,再经过环路滤波得到重建图像后作为参考帧,参考帧经过运动预测与补偿后就可以作为帧间预测的预测值。
步骤S3,在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
若用户需要播放自己感兴趣的视频画面,则可以点击播放相应的按钮,视频播放系统在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
本发明实施例通过获取待编码视频帧序列及预先配置的参考目标对象;将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
如图3所示,本发明第二实施例提出一种视频播放方法,该方法基于上 述方法第一实施例,并对上述步骤S2作进一步改进。
可选地,本实施例中,上述步骤S2:将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流可以包括:
S21,将待编码视频帧序列中的待编码视频帧与参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息。
其中,视频结构化描述是一种视频内容信息提取的技术,对视频内容按照语义关系,采用时空分割、特征提取、对象识别等处理手段,组织成可供计算机和人理解的文本信息的技术。
在本实施例中,通过基于结构化描述的特征匹配,首先从待编码视频帧序列中获取用户感兴趣的待编码视频帧,然后进行编码,生成视频码流。
S22,根据匹配结果信息确定是否对待编码视频帧序列中的待编码视频帧进行编码。
如果匹配结果信息为待编码视频帧序列中的待编码视频帧与预先配置的参考目标对象相匹配,则对待编码视频帧进行编码,通过上述匹配编码方式,对待编码视频帧序列中的所有待编码视频帧进行判断和处理,最终得到与参考目标对象相匹配的预定类型的编码视频码流;如果匹配结果信息为待编码视频帧与参考目标对象不相匹配,则不对待编码视频帧进行编码。
如此,通过对与参考目标对象相匹配的待编码视频帧序列中的待编码视频帧进行编码,对与参考目标对象不相匹配的待编码视频帧序列中的待编码视频帧不进行编码,不仅节省了视频播放系统的存储空间,还方便用户快速获取所需视频内容。
进一步地,参照图3,本发明实施例在上述步骤S1之前,还可以包括步骤S11:配置参考目标对象。
可选地,在配置参考目标对象时,可以根据用户需要配置,其中,参考目标对象可以是用户感兴趣的图像画面,比如某个节目,某个电视剧人物,或者某个场景等,其数量可以为一个或多个。
在完成参考目标对象的配置后,可以将参考目标对象存储在终端本地。
如图4所示,本发明第三实施例提出一种视频播放方法,该方法基于上述方法第一实施例,并具体对上述步骤S2作进一步限定。
可选地,在本实施例中,上述步骤S2:将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流可以包括:
S23,遍历待编码视频帧序列,将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配,并记录匹配结果信息;
S24,根据匹配结果信息确定是否对待编码视频帧序列中的待编码视频帧进行标记;
可选地,如果匹配结果信息为待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记;若匹配结果信息为待编码的视频帧与参考目标对象不相匹配,则不对待编码视频帧进行标记;
S25,对匹配标记后的整个待编码视频帧序列进行编码,得到标记的编码视频码流;
S26,在接收到输入的提取指令后,从编码视频码流中提取标记的编码视频帧码流,得到与参考目标对象相匹配的预定类型的编码视频码流。
在本实施例中,对待编码视频帧序列中的所有待编码视频帧进行编码,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记;若待编码的视频帧与参考目标对象不相匹配,则不对待编码视频帧进行标记。
在完成待编码视频帧序列中所有待编码视频帧的匹配标记处理后,通过编码得到编码视频码流,其中,有标记的编码视频帧则为用户感兴趣的视频画面,而且,在对匹配标记后的待编码视频帧序列进行编码时,对其中已标记的视频帧会生成能够独立解码的编码视频帧码流,即子码流。
然后,在用户需要播放自己感兴趣的视频画面时,从编码视频码流中提取标记的编码视频帧码流进行解码播放。
本实施例的视频编解码流程可以如图5-1、5-2所示,图5-1是第一实施例和第二实施例的视频编解码流程示意图,其中第一实施例可用于实时编码 的场景,第二实施例可用于离线编码的场景,图5-2是第三实施例的视频编解码流程示意图,第三实施例可用于实时编码和离线编码的场景。
需要说明的是,上述对待编码视频帧序列进行匹配标记编码的过程中,为了便于从整个编码视频帧码流中提取标记的子码流,本实施例可以采用如下方案:
将已匹配标记的视频帧,通过设计对象标号(比如,在视频编码协议中增加相应的句法元素),以及编码帧类型(I帧)等方式,使得已匹配标记的视频帧可作为独立可解码的子码流提取。
下面以HEVC视频标准为参考,对本实施例方案作进一步的详细描述。
本实施例方案涉及到对待编码帧序列中感兴趣目标图像的标记,和多个感兴趣目标图像的区分,因此可以在HEVC标准协议中增加相应的句法元素来标示和记录。
首先在HEVC标准协议slice头信息中增加一个感兴趣目标图像帧标志位roi_pic_flag,如表1所示,用以指示是否感兴趣目标图像,可将该标志位置0或者1,其次增加一个记录感兴趣目标图像类别的计数器roi_pic_idx,用以记录感兴趣目标图像类别数,与目标对象数一致。
在编码时,具体过程如下:
第一步:判断目标对象匹配结果,若是感兴趣目标图像,则将roi_pic_flag标志置为1,进入第二步;若不是感兴趣目标图像,进入第六步;
第二步:判断目标对象是否与编码序列首次匹配,若是,则将该帧的编码帧类型强制设置为I帧,获取该感兴趣目标图像在目标对象中的标号roi_pic_idx;若否,进入第三步;
第三步:判断与当前帧匹配的目标对象是否在前一帧出现,若是进入第四步;若否,进入第五步;
第四步:当前帧分配与该感兴趣目标对象对应的标号roi_pic_idx。
第五步:该帧的编码帧类型强制设置为I帧,获取该感兴趣目标图像在目标对象中的标号roi_pic_idx。
第六步:roi_pic_flag标志置为0,按HEVC标准方法进行编码。
后续,在从标记的码流中提取已标记的感兴趣目标图像时,提取流程如下:
第一步:解析slice头中的感兴趣目标图像标志位roi_pic_flag,若该标志位为1,进入第二步;若该标志位为0,进入第三步;
第二步:解析感兴趣目标图像对象类别标号的句法元素roi_pic_idx,判断该类别号roi_pic_idx是否首次出现,如果是,直接提取该帧码流,存入新的图像对象类别标号的码流文件,如果不是,进入第三步;
第三步:存入提取的对应图像对象类别标号的码流文件中;
第四步:跳过该帧,进入下一帧。
通过上述方案,将已匹配标记的视频帧,通过设计对象标号(比如,在视频编码协议中增加相应的句法元素),以及编码帧类型(I帧)等方式,使得已匹配标记的视频帧可作为独立可解码的子码流提取,提高视频播放的流畅性,满足用户需求。
本实施例通过上述方案,获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流,其中,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记,后续,从编码视频码流中提取标记的编码视频帧码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
参照图9所示,作为本发明的第三种实施例的进一步的改进,对上述步骤S24作进一步的限定。
可选地,上述步骤S24:匹配结果信息为待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记可以包括:
S241,若匹配结果信息为待编码视频帧序列中的待编码视频帧与多个参考目标对象相匹配,则对应多个参考目标对象,对待编码视频帧进行相应的多个不同标记。
再次参照图9所示,作为本发明的第三种实施例的进一步的改进,对上述步骤S26作进一步的限定。
可选地,上述步骤S26:在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,得到与所述参考目标对象相匹配的预定类型的编码视频码流可以包括:
S261,在接收到输入的提取指令后,若所述提取指令为提取包含多个参考目标对象中的至少一个标记的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流。
本实施例考虑到,用户所感兴趣的参考目标对象可能处于同一个视频帧,或者处于不同的视频帧中,因此,在标记时,可以对不同的参考目标对象采用不同的序号进行标记。
本实施例通过上述方案,获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流,其中,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记,在标记时,对不同的参考目标对象采用不同的序号进行标记,后续,从编码视频码流中提取用户指定标记的编码视频帧进行解码播放,不仅有效地压缩了用户感兴趣的视频内容,节省了存储空间,而且方便用户快速获取所需视频内容,提升了用户体验。
下面通过举例对本发明的第三种实施例的进一步的改进作详细的阐述:
在视频播放系统中预先配置参考目标对象A及参考目标对象B,对参考目标对象A及参考目标对象B进行排序,如表1中的roi_pic_idx对应比特表示(一个参考目标对象用一个比特表示),如图6所示,视频播放系统开机后,获取待编码视频帧序列及预先配置的参考目标对象A及参考目标对象B。
视频播放系统获取到待编码视频帧序列及预先配置的参考目标对象A及参考目标对象B后,将待编码视频帧序列中的待编码视频帧分别与参考目 标对象A及参考目标对象B进行匹配,并将待编码视频帧序列中含有任意参考目标对象A或者B的待编码视频帧相应的标记为Ⅰ帧(帧内编码帧),如表1中的roi_pic_flag置为1,,待编码视频帧序列中待编码视频帧可能既包含参考目标对象A,也包含参考目标对象B,如果只包含参考目标对象A,则roi_pic_flag置为001;如果只包含参考目标对象B,则roi_pic_flag置为010;如果既包含参考对象目标A,也包含参考目标对象B,则roi_pic_flag置为011;如果待编码视频帧序列中的待编码视频帧既不包含参考目标对象A,也不包含参考目标对象B,则如表1中的roi_pic_flag置为0,且帧类型按I帧或者P帧编码,如图7所示。对所有待编码视频帧编码后得到编码码流。
如果视频播放系统接收到输入的提取指令为提取包含参考目标对象A的编码视频帧时,只需从所有编码视频帧码流中提取编码视频roi_pic_flag为1,且roi_pic_idx为XX1的码流;如果视频播放系统接收到输入的提取指令为提取包含参考目标对象B的编码视频帧时,只需从所有编码视频帧码流中提取oi_pic_flag为1,且roi_pic_idx为X1X的码流。
在视频播放系统接收到播放指令,并根据用户需要提取到包含所需的参考目标对象的视频帧码流,如图8所示,进行解码播放。如此,用户就能方便快速的获取所需视频内容。
综上所述,本发明实施例通过上述方案,获取待编码视频帧序列及预先配置的参考目标对象;将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
鉴于上述视频播放方法,本发明实施例还提供了一种视频播放装置。该视频编解码装置可以设置于手机、电脑、电视机等终端设备上。
参照图10所示,本发明的第一实施例提供了一种视频播放装置,包括:获取模块10、匹配编码模块20以及解码播放模块30。
其中,获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象;
具体实施时,可以在视频播放系统中预先配置参考目标对象,视频播放系统开机后,获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象。该视频播放系统可以承载于手机、电脑、电视机等终端设备上。
其中,待编码视频帧序列可以来自网络、机顶盒等设备或服务器,也可以是用户拍摄的视频画面。
上述参考目标对象可以是用户感兴趣的图像画面,比如某个节目,某个电视剧人物,或者某个场景等。
该参考目标对象可以根据需要配置,其数量可以为一个或多个。
匹配编码模块20设置为将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;
获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象后,匹配编码模块20设置为将待编码视频帧序列中的待编码视频帧与预先配置的参考目标对象进行匹配,并对与参考目标对象相匹配的待编码视频帧进行编码,获取与参考目标对象相匹配的预定类型的编码视频码流。
本实施例中,预定类型即指用户感兴趣的图像画面。
如图2所示,图2是视频编码标准的原理框架图,即由视频序列经过视频编码后生成码流的过程,视频序列输入后,经过帧内或帧间预测后,与原始序列图像进行相减得到差值,然后对差值进行DCT变换后量化,最后进行熵编码生成码流。为了得到预测值,编码端需要进行逆过程得到重建值,即需要进行反向量化,DCT反变换IDCT,再滤波后即重建后作为参考帧,参考帧经过运动预测与补偿后就可以作为帧间预测的预测值。
解码播放模块30设置为在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
若用户需要播放自己感兴趣的视频画面,则可以点击播放相应的按钮,视频播放系统在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
另外,进一步地,本发明实施例视频播放装置还可以包括配置模块40, 设置为预先配置参考目标对象。
本发明实施例通过上述方案,获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象;匹配编码模块20设置为将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;解码播放模块30设置为在接收到播放指令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
再次参照图10所示,本发明第二种实施例提出一种视频播放装置,该装置基于本发明视频播放装置的第一实施例,并具体对匹配编码模块20的功能作了进一步改进。
可选地,本实施例中匹配编码模块20还设置为将待编码视频帧序列中的待编码视频帧与参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息。
视频结构化描述是一种视频内容信息提取的技术,对视频内容按照语义关系,采用时空分割、特征提取、对象识别等处理手段,组织成可供计算机和人理解的文本信息的技术。
在本实施例中,通过基于结构化描述的特征匹配,首先从待编码视频帧序列中获取用户感兴趣的待编码视频帧,然后进行编码,生成视频码流。
除此之外,本实施例中匹配编码模块20还设置为根据匹配结果信息确定是否对待编码视频帧序列中的待编码视频帧进行编码。
如果匹配结果信息为待编码视频帧序列中的待编码视频帧与预先配置的参考目标对象相匹配,匹配编码模块20则设置为对所述待编码视频帧进行编码,通过上述匹配编码方式,对待编码视频帧序列中的所有待编码视频帧进行判断和处理,最终得到与参考目标对象相匹配的预定类型的编码视频码流;如果匹配结果信息为待编码视频帧与参考目标对象不相匹配,匹配编码模块20则设置为不对待编码视频帧进行编码。
如此,通过匹配编码模块20对与参考目标对象相匹配的待编码视频帧 序列中的待编码视频帧进行编码,对与参考目标对象不相匹配的待编码视频帧序列中的待编码视频帧不进行编码,不仅节省了视频播放器系统的存储空间,还方便用户快速获取所需视频内容。
本发明的第三种实施例提出一种视频播放装置,该方法基于本发明视频播放装置的第一实施例,并具体对匹配编码模块20作更进一步改进。
在本实施例中,匹配编码模块20还设置为遍历待编码视频帧序列,将待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配,并记录匹配结果信息,根据匹配结果信息确定是否对待编码视频帧序列中的待编码视频帧进行标记。
可选地,如果匹配结果信息为待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,匹配编码模块20则设置为对待编码视频帧进行标记;若匹配结果信息为待编码的视频帧与参考目标对象不相匹配,匹配编码模块20则设置为不对待编码视频帧进行标记。匹配编码模块20还设置为对匹配标记后的待编码视频帧进行编码,得到标记的编码视频码流。另外,匹配编码模块20在本实施例中还设置为在接收到输入的提取指令后,从编码视频码流中提取标记的编码视频帧码流,得到与参考目标对象相匹配的预定类型的编码视频码流。
在本实施例中,对待编码视频帧序列中的所有待编码视频帧进行编码,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记;若待编码的视频帧与参考目标对象不相匹配,则不对待编码视频帧进行标记。
在完成待编码视频帧序列中所有待编码视频帧的匹配标记处理后,通过编码得到编码视频码流,其中,有标记的编码视频帧则为用户感兴趣的视频画面,而且,在对匹配标记后的待编码视频帧序列进行编码时,对其中已标记的视频帧会生成能够独立解码的编码视频帧码流,即子码流。
然后,在用户需要播放自己感兴趣的视频画面时,从编码视频码流中提取标记的编码视频帧码流进行解码播放。
本实施例的视频编解码流程可以如图5-2所示。
需要说明的是,上述对待编码视频帧序列进行匹配标记编码的过程中,为了便于从整个编码视频帧码流中提取标记的子码流,本实施例可以采用如下方案:
将已匹配标记的视频帧,通过设计对象标号(比如,在视频编码协议中增加相应的句法元素),以及编码帧类型(I帧)等方式,使得已匹配标记的视频帧可作为独立可解码的子码流提取,
下面以HEVC视频标准为参考,对本实施例方案作进一步的详细描述。
本实施例方案涉及到对待编码帧序列中感兴趣目标图像的标记,和多个感兴趣目标图像的区分,因此可以在HEVC标准协议中增加相应的句法元素来标示和记录。
首先在HEVC标准协议slice头信息中增加一个感兴趣目标图像帧标志位roi_pic_flag,如表1所示,用以指示是否感兴趣目标图像,可将该标志位置0或者1,根据目标对象匹配编码模块判断反馈结果来确定该标志位的值,其次增加一个记录感兴趣目标图像类别的计数器roi_pic_idx,用以记录感兴趣目标图像类别数,与目标对象数一致。
表1
Figure PCTCN2017098151-appb-000001
在编码时,具体过程如下:
第一步:判断目标对象匹配结果,若是感兴趣目标图像,则将roi_pic_flag标志置为1,进入第二步;若不是感兴趣目标图像,进入第六步;
第二步:判断目标对象是否与编码序列首次匹配,若是,则将该帧的编码帧类型强制设置为I帧,获取该感兴趣目标图像在目标对象中的标号roi_pic_idx。若否,进入第三步;
第三步:判断与当前帧匹配的目标对象是否在前一帧出现,若是进入第四步;若否,进入第五步;
第四步:当前帧分配与该感兴趣目标对象对应的标号roi_pic_idx。
第五步:该帧的编码帧类型强制设置为I帧,获取该感兴趣目标图像在目标对象中的标号roi_pic_idx。
第六步:roi_pic_flag标志置为0,按HEVC标准方法进行编码。
后续,在从标记的码流中提取已标记的感兴趣目标图像时,提取流程如下:
第一步:解析slice头中的感兴趣目标图像标志位roi_pic_flag,若该标志位为1,进入第二步;若该标志位为0,进入第三步;
第二步:解析感兴趣目标图像对象类别标号的句法元素roi_pic_idx,判断该类别号roi_pic_idx是否首次出现,如果是,直接提取该帧码流,存入新的图像对象类别标号的码流文件,如果不是,进入第三步;
第三步:存入提取的对应图像对象类别标号的码流文件中;
第四步:跳过该帧,进入下一帧。
通过上述方案,将已匹配标记的视频帧,通过设计对象标号(比如,在视频编码协议中增加相应的句法元素),以及编码帧类型(I帧)等方式,使得已匹配标记的视频帧可作为独立可解码的子码流提取,提高视频播放的流畅性,满足用户需求。
本实施例通过上述方案,获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行 匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流,其中,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记,后续,从编码视频码流中提取标记的编码视频帧码流进行解码播放,有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
作为对本发明第三种实施例作进一步的改进,匹配编码模块20设置为若获取到匹配结果信息为待编码视频帧序列中的待编码视频帧与多个参考目标对象相匹配,则对应多个参考目标对象,对待编码视频帧进行相应的多个不同标记。
匹配编码模块20设置为在接收到输入的提取指令后,若提取指令为提取包含多个参考目标对象中的至少一个标记的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流。
本实施例考虑到,用户所感兴趣的参考目标对象可能处于同一个视频帧,或者处于不同的视频帧中,因此,在标记时,可以对不同的参考目标对象采用不同的序号进行标记。
本实施例通过上述方案,获取待编码视频帧序列及预先配置的参考目标对象;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流,其中,在编码过程中,通过基于结构化描述的特征匹配,若待编码视频帧序列中的待编码视频帧与参考目标对象相匹配,则对待编码视频帧进行标记,在标记时,对不同的参考目标对象采用不同的序号进行标记,后续,从编码视频码流中提取用户指定标记的编码视频帧进行解码播放,不仅有效地压缩了用户感兴趣的视频内容,节省了存储空间,而且方便用户快速获取所需视频内容,提升了用户体验。
下面通过举例对本发明的第三种实施例的进一步的改进作详细的阐述:
配置模块40设置为在视频播放系统中预先配置参考目标对象A及参考目标对象B,匹配编码模块20设置为对参考目标对象A及参考目标对象B 进行排序,并将参考目标对象A标记为序号Ⅰ,将参考目标对象B标记为序号Ⅱ,视频播放系统开机后,获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象A及参考目标对象B。
获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象A及参考目标对象B,匹配编码模块20设置为将待编码视频帧序列中的待编码视频帧分别与参考目标对象A及参考目标对象B进行匹配,并将待编码视频帧序列中含有参考目标对象A的待编码视频帧相应的标记为Ⅰ帧,将待编码视频帧序列中含有参考目标对象B的待编码视频帧相应的标记为Ⅱ帧,如果待编码视频帧序列中的待编码视频帧既包含参考目标对象A,也包含参考目标对象B,则将待编码视频帧相应的标记为Ⅰ帧和Ⅱ帧;如果待编码视频帧序列中的待编码视频帧既不包含参考目标对象A,也不包含参考目标对象B,则不进行标记。
匹配编码模块20设置为对标记后的待编码视频帧Ⅰ帧、待编码视频帧Ⅱ帧、待编码视频帧Ⅰ帧和Ⅱ帧,以及没有进行标记的待编码视频帧进行编码,得到编码视频Ⅰ帧码流、编码视频帧Ⅱ码流、编码视频Ⅰ帧和Ⅱ帧码流,以及没有进行标记的编码视频码流。
匹配编码模块20设置为若接收到输入的提取指令为提取包含参考目标对象A的编码视频帧时,从所有编码视频帧码流中提取编码视频Ⅰ帧码流;若接收到输入的提取指令为提取包含参考目标对象B的编码视频帧时,从所有编码视频帧码流中提取编码视频Ⅱ帧码流,若接收到输入的提取指令为提取既包含参考目标对象B的编码视频帧时,从所有编码视频帧码流中提取编码视频Ⅰ帧和Ⅱ帧码流。
解码播放模块30设置为接收到播放指令,并根据用户需要提取到编码视频Ⅰ帧或者编码视频Ⅱ帧或者编码视频Ⅰ帧和Ⅱ帧后,进行解码播放。如此,用户就能方便快速的获取所需视频内容。
本发明实施例通过上述方案,获取模块10设置为获取待编码视频帧序列及预先配置的参考目标对象;匹配编码模块20设置为将待编码视频帧序列中的待编码视频帧与参考目标对象进行匹配编码,获取与参考目标对象相匹配的预定类型的编码视频码流;解码播放模块30设置为在接收到播放指 令时,对与参考目标对象相匹配的预定类型的编码视频码流进行解码播放。有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述实施例所述的方法。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理单元的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上所述仅为本发明的可选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本发明的专利保护范围内。
工业实用性
上述实施例有效地压缩了用户感兴趣的视频内容,节省了存储空间,方便用户快速获取所需视频内容,提升了用户体验。

Claims (11)

  1. 一种视频播放方法,包括:
    获取待编码视频帧序列及预先配置的参考目标对象(S1);
    将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流(S2);
    在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放(S3)。
  2. 根据权利要求1所述的视频播放方法,其中,所述将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流(S2)的步骤包括:
    将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息(S21);
    根据所述匹配结果信息确定是否对所述待编码视频帧进行编码,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行编码,得到与所述参考目标对象相匹配的预定类型的编码视频码流;若所述匹配结果信息为所述待编码视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行编码(S22)。
  3. 根据权利要求1所述的视频播放方法,其中,所述将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流(S2)的步骤包括:
    遍历所述待编码视频帧序列;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配,并记录匹配结果信息(S23);
    根据所述匹配结果信息确定是否对所述视频帧进行标记,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视 频帧进行标记;若所述匹配结果信息为所述待编码的视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行标记(S24);
    对匹配标记后的整个待编码视频帧序列进行编码,得到编码视频码流(S25);
    在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,得到与所述参考目标对象相匹配的预定类型的编码视频码流(S26)。
  4. 根据权利要求3所述的视频播放方法,还包括:
    所述获取待编码视频帧序列及预先配置的参考目标对象(S1)的步骤之前,配置参考目标对象(S11)。
  5. 根据权利要求3所述的视频播放方法,其中,
    所述若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行标记(S24)的步骤包括:
    若所述匹配结果信息为所述待编码视频帧与多个参考目标对象相匹配,则对应所述多个参考目标对象,对所述待编码视频帧进行相应的多个不同标记(S241);
    所述在接收到输入的提取指令后,从所述编码视频码流中提取标记的编码视频帧码流,得到与所述参考目标对象相匹配的预定类型的编码视频码流(S26)的步骤包括:
    在接收到输入的提取指令后,若所述提取指令为提取包含多个参考目标对象中的至少一个参考目标对象的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧码流,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流(S261)。
  6. 一种视频播放装置,包括:
    获取模块(10),设置为获取待编码视频帧序列及预先配置的参考目标对象;
    匹配编码模块(20),设置为将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流;
    解码播放模块(30),设置为在接收到播放指令时,对与所述参考目标对象相匹配的预定类型的编码视频码流进行解码播放。
  7. 根据权利要求6所述的视频播放装置,其中,
    所述匹配编码模块(20),是设置为通过如下方式实现将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流:
    将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行基于结构化描述的特征匹配,并记录匹配结果信息;根据所述匹配结果信息确定是否对所述待编码视频帧进行编码,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行编码,得到与所述参考目标对象相匹配的预定类型的编码视频码流;若所述匹配结果信息为所述待编码视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行编码。
  8. 根据权利要求6所述的视频播放装置,其中,
    所述匹配编码模块(20),是设置为通过如下方式实现将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配编码,获取与所述参考目标对象相匹配的预定类型的编码视频码流:
    遍历所述待编码视频帧序列;将所述待编码视频帧序列中的待编码视频帧与所述参考目标对象进行匹配,并记录匹配结果信息;根据所述匹配结果信息确定是否对所述视频帧进行标记,若所述匹配结果信息为所述待编码视频帧与所述参考目标对象相匹配,则对所述待编码视频帧进行标记;若所述 匹配结果信息为所述待编码的视频帧与所述参考目标对象不相匹配,则不对所述待编码视频帧进行标记;对匹配标记后的整个待编码视频帧序列进行编码,得到编码视频码流;在接收到输入的提取指令后;从所述编码视频码流中提取标记的编码视频帧码流;得到与所述参考目标对象相匹配的预定类型的编码视频码流。
  9. 根据权利要求8所述的视频播放装置,所述装置还包括:
    配置模块(40),设置为配置参考目标对象。
  10. 根据权利要求8所述的视频播放装置,其中,
    所述匹配编码模块(20),是设置为若所述匹配结果信息为所述待编码视频帧与多个参考目标对象相匹配,则对应所述多个参考目标对象,对所述待编码视频帧进行相应的多个不同标记;在接收到输入的提取指令后,若所述提取指令为提取包含多个参考目标对象中的至少一个参考目标对象的编码视频帧时,根据所选择的参考目标对象对应的标记,提取对应的标记的编码视频帧,得到与所选择的参考目标对象相匹配的预定类型的编码视频码流。
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述权利要求1至5中任一项所述的方法。
PCT/CN2017/098151 2016-08-19 2017-08-18 视频播放方法及装置 WO2018033152A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610697803.6 2016-08-19
CN201610697803.6A CN107770528B (zh) 2016-08-19 2016-08-19 视频播放方法及装置

Publications (1)

Publication Number Publication Date
WO2018033152A1 true WO2018033152A1 (zh) 2018-02-22

Family

ID=61196379

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098151 WO2018033152A1 (zh) 2016-08-19 2017-08-18 视频播放方法及装置

Country Status (2)

Country Link
CN (1) CN107770528B (zh)
WO (1) WO2018033152A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898416A (zh) * 2020-06-17 2020-11-06 绍兴埃瓦科技有限公司 视频流处理方法、装置、计算机设备和存储介质
CN112954433A (zh) * 2021-02-01 2021-06-11 游密科技(深圳)有限公司 视频处理方法、装置、电子设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109842797B (zh) * 2018-12-28 2020-04-24 城云科技(中国)有限公司 大数据编码方法及计算机可读存储介质
CN111885332A (zh) * 2020-07-31 2020-11-03 歌尔科技有限公司 一种视频存储方法、装置、摄像头及可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0805405A2 (en) * 1996-02-05 1997-11-05 Texas Instruments Incorporated Motion event detection for video indexing
CN101692269A (zh) * 2009-10-16 2010-04-07 北京中星微电子有限公司 一种处理视频节目的方法和装置
CN102054510A (zh) * 2010-11-08 2011-05-11 武汉大学 一种视频预处理与播放的方法及系统
CN102810208A (zh) * 2012-07-24 2012-12-05 武汉大千信息技术有限公司 基于行进方向检测的刑侦视频预处理方法
CN103020624A (zh) * 2011-09-23 2013-04-03 杭州海康威视系统技术有限公司 混合车道监控视频智能标记、检索回放方法及其装置
CN105760472A (zh) * 2016-02-06 2016-07-13 中国农业大学 视频检索方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588445B (zh) * 2009-06-09 2011-01-19 宁波大学 一种基于深度的视频感兴趣区域提取方法
CA2716637A1 (en) * 2009-10-07 2011-04-07 Telewatch Inc. Video analytics with pre-processing at the source end
JP6016332B2 (ja) * 2011-05-12 2016-10-26 キヤノン株式会社 画像処理装置、画像処理方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0805405A2 (en) * 1996-02-05 1997-11-05 Texas Instruments Incorporated Motion event detection for video indexing
CN101692269A (zh) * 2009-10-16 2010-04-07 北京中星微电子有限公司 一种处理视频节目的方法和装置
CN102054510A (zh) * 2010-11-08 2011-05-11 武汉大学 一种视频预处理与播放的方法及系统
CN103020624A (zh) * 2011-09-23 2013-04-03 杭州海康威视系统技术有限公司 混合车道监控视频智能标记、检索回放方法及其装置
CN102810208A (zh) * 2012-07-24 2012-12-05 武汉大千信息技术有限公司 基于行进方向检测的刑侦视频预处理方法
CN105760472A (zh) * 2016-02-06 2016-07-13 中国农业大学 视频检索方法及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898416A (zh) * 2020-06-17 2020-11-06 绍兴埃瓦科技有限公司 视频流处理方法、装置、计算机设备和存储介质
CN112954433A (zh) * 2021-02-01 2021-06-11 游密科技(深圳)有限公司 视频处理方法、装置、电子设备及存储介质
CN112954433B (zh) * 2021-02-01 2024-01-09 游密科技(深圳)有限公司 视频处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN107770528A (zh) 2018-03-06
CN107770528B (zh) 2023-08-25

Similar Documents

Publication Publication Date Title
WO2018033152A1 (zh) 视频播放方法及装置
US8634652B2 (en) Video entity recognition in compressed digital video streams
JP5144522B2 (ja) スケーラブルビデオ符号化でroiを定義し、再構成するための装置および方法
CN102396221B (zh) 阻止特技模式操作的支持
TWI692245B (zh) 視訊解碼裝置、視訊編碼方法及裝置與電腦可讀儲存媒體
RU2675154C1 (ru) Способ кодирования видео и устройство кодирования видео и способ декодирования видео и устройство декодирования видео для сигнализации параметров sao
CN107634930B (zh) 一种媒体数据的获取方法和装置
CN105359544B (zh) 数字视频流传输中的特技播放
US9860607B2 (en) Method and apparatus for transmitting and receiving broadcast signal for providing trick play service
CN103460698A (zh) 组合参考图片列表建构和映射
CN102484712A (zh) 用于数字视频记录器的视频编辑和重新格式化
CN109963176B (zh) 视频码流处理方法、装置、网络设备和可读存储介质
US20110135286A1 (en) Apparatus and method for extracting key frames and apparatus and method for recording broadcast signals using the same
CN110662084B (zh) 一种mp4文件流直播的方法、移动终端及存储介质
KR20230125723A (ko) 비디오 코딩에서의 서브픽쳐 시그널링
US20060209947A1 (en) Video compression
US20240098297A1 (en) Video coding and decoding
US20060268989A1 (en) Bit stream generation method and bit stream generatation apparatus
WO2022042325A1 (zh) 视频处理方法、装置、设备及存储介质
CN101193321B (zh) 编码设备、解码设备、记录设备、音频/视频数据传送系统
CN110855619B (zh) 播放音视频数据的处理方法、装置、存储介质及终端设备
TWI794076B (zh) 多媒體資源中軌道資料的處理方法、裝置、媒體及設備
JP6748657B2 (ja) 圧縮ビデオビットストリームに付属メッセージデータを含めるシステムおよび方法
CN114615549B (zh) 流媒体seek方法、客户端、存储介质和移动设备
US20240073410A1 (en) Video coding and decoding

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: 17841124

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17841124

Country of ref document: EP

Kind code of ref document: A1