Video processing method and device

文档序号:142688 发布日期:2021-10-22 浏览:20次 中文

阅读说明:本技术 视频的处理方法和装置 (Video processing method and device ) 是由 常炎隆 于 2021-07-09 设计创作,主要内容包括:本公开提供了视频的处理方法和装置,涉及人工智能技术领域,进一步涉及云计算中的媒体云技术领域。具体实施方式包括:建立对视频中关键帧的时间的索引;响应于接收到拖动播放进度seek请求,确定所述seek请求指示的拖动目标时间;在所述索引的非后于所述拖动目标时间的方向上,查找与所述拖动目标时间最近的、关键帧的时间,并将该时间作为目标关键帧时间;从所述目标关键帧时间指示的视频帧的待解码数据开始,向所述视频的在后方向进行视频帧的待解码数据的解码;响应于解码出所述拖动目标时间指示的视频帧,播放该视频帧的解码结果。本公开通过关键帧PTS索引,可以快速定位到与seek请求指示的视频帧最近的关键帧,从而提高了执行seek步骤的效率。(The disclosure provides a video processing method and device, relates to the technical field of artificial intelligence, and further relates to the technical field of media cloud in cloud computing. The specific implementation mode comprises the following steps: establishing an index of the time of the key frame in the video; in response to receiving a seek request of a dragging playing progress, determining a dragging target time indicated by the seek request; searching the time of a key frame closest to the dragging target time in the direction of the index not following the dragging target time, and taking the time as target key frame time; starting from the data to be decoded of the video frame indicated by the target key frame time, decoding the data to be decoded of the video frame in the backward direction of the video; and responding to the video frame indicated by the dragging target time, and playing the decoding result of the video frame. According to the method and the device, the key frame closest to the video frame indicated by the seek request can be quickly positioned through the key frame PTS index, so that the efficiency of executing the seek step is improved.)

1. A method of processing video, the method comprising:

in response to receiving a seek request of a playing progress of a first video, determining a first display time stamp (PTS) indicated by the seek request;

acquiring a second PTS in a key frame PTS index, wherein the second PTS is a key frame PTS which is earlier than or equal to the first PTS and is closest to the first PTS;

determining a target key frame according to the second PTS and the video data queue index of the first video;

decoding the first video according to the playing time sequence from the target key frame;

and responding to the decoded video frame corresponding to the first PTS, and playing a second video in the first video, wherein the first frame of the second video is the video frame.

2. The method of claim 1, wherein the video data queue index comprises: the video time index value corresponds to the first data set one by one, the first data set corresponds to at least one third video one by one, and the first video is composed of a plurality of third videos with equal duration;

the determining a target key frame according to the second PTS and the video data queue index of the first video, comprising:

determining a target time index value corresponding to the second PTS in the video time index values corresponding to the at least one first data set;

determining a second data set corresponding to the target time index value in the video data queue index, wherein the first data set comprises the second data set;

determining the target keyframe from the second set of data.

3. The method of claim 2, wherein the second set of data includes video frame information of the corresponding third video, the video frame information including: PTS, key frame identification and frame data;

said determining said target keyframe from said second set of data comprises:

traversing the video frame information;

acquiring target video frame information with the same PTS as the second PTS;

and determining the target video frame information as the information of the target key frame.

4. The method of claim 2, wherein said decoding said first video in play-time order starting from said target key frame comprises:

decoding the first video according to the playing time sequence from the target key frame according to the video data queue index; and

the method further comprises the following steps:

acquiring a third PTS of a currently decoded video frame according to the video data queue index;

in response to determining that the third PTS is the same as the first PTS, determining that a video frame corresponding to the first PTS has been decoded.

5. The method of claim 2, wherein the third video is 1 second in duration.

6. The method of claim 3, wherein the determining the target video frame information as the information of the target key frame comprises:

determining the target video frame information as information of the target key frame in response to determining that the key frame identification in the target video frame information indicates that the video frame is a key frame.

7. An apparatus for processing video, the apparatus comprising:

a time determination unit configured to determine a first display time stamp PTS indicated by a seek request in response to receiving the seek request for a playback progress of a first video;

an acquisition unit configured to acquire a second PTS, which is a closest key frame PTS to the first PTS among key frame PTS's earlier than or equal to the first PTS, in a key frame PTS index;

a frame determination unit configured to determine a target key frame according to the second PTS and a video data queue index of the first video;

a decoding unit configured to decode the first video in a play time order from the target key frame;

a playing unit configured to play a second video of the first video in response to decoding a video frame corresponding to the first PTS, wherein a first frame of the second video is the video frame.

8. The apparatus of claim 7, wherein the video data queue index comprises: the video time index value corresponds to the first data set one by one, the first data set corresponds to at least one third video one by one, and the first video is composed of a plurality of third videos with equal duration;

the frame determination unit is further configured to perform the determining a target key frame from the second PTS and the video data queue index of the first video as follows:

determining a target time index value corresponding to the second PTS in the video time index values corresponding to the at least one first data set;

determining a second data set corresponding to the target time index value in the video data queue index, wherein the first data set comprises the second data set;

determining the target keyframe from the second set of data.

9. The apparatus of claim 8, wherein the second set of data comprises video frame information of the corresponding third video, the video frame information comprising: PTS, key frame identification and frame data;

the frame determination unit is further configured to perform the determining the target key frame from the second data set as follows:

traversing the video frame information;

acquiring target video frame information with the same PTS as the second PTS;

and determining the target video frame information as the information of the target key frame.

10. The apparatus of claim 8, wherein the decoding unit is further configured to perform the decoding the first video in a play-time order starting from the target key frame as follows:

decoding the first video according to the playing time sequence from the target key frame according to the video data queue index; and

the device further comprises:

a time obtaining unit configured to obtain a third PTS of a currently decoded video frame according to the video data queue index;

an execution unit configured to determine that a video frame corresponding to the first PTS has been decoded in response to determining that the third PTS is the same as the first PTS.

11. The apparatus of claim 8, wherein the third video is 1 second in duration.

12. The apparatus of claim 9, wherein the frame determination unit is further configured to perform the determining the target video frame information as the information of the target key frame as follows:

determining the target video frame information as information of the target key frame in response to determining that the key frame identification in the target video frame information indicates that the video frame is a key frame.

13. An electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.

15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.

Technical Field

The disclosure relates to the technical field of artificial intelligence, and further relates to the technical field of media cloud in cloud computing, in particular to a video processing method and device.

Background

Video technology was originally developed for television systems, but has now evolved into a variety of different formats to facilitate consumer recording of video. With the development of internet technology, various internet platforms, such as video websites, are gradually emerging.

When a user watches a video, a situation that a progress bar is dragged is likely to occur, and a seek request is generated, where the seek request refers to a request for dragging a playing progress.

Disclosure of Invention

A video processing method, a video processing device, an electronic device and a storage medium are provided.

According to a first aspect, there is provided a video processing method, including: in response to receiving a seek request of a playing progress of a first video, determining a first display time stamp (PTS) indicated by the seek request; acquiring a second PTS in the key frame PTS index, wherein the second PTS is the key frame PTS which is earlier than or equal to the first PTS and is closest to the first PTS; determining a target key frame according to the second PTS and the video data queue index of the first video; decoding the first video according to the playing time sequence from the target key frame; and responding to the decoded video frame corresponding to the first PTS, and playing a second video in the first video, wherein the first frame of the second video is a video frame.

According to a second aspect, there is provided a video processing apparatus comprising: a time determination unit configured to determine a first display time stamp PTS indicated by a seek request in response to receiving the seek request of the play progress of the first video; an acquisition unit configured to acquire a second PTS, which is a closest key frame PTS to the first PTS among key frame PTS's earlier than or equal to the first PTS, in the key frame PTS index; a frame determination unit configured to determine a target key frame according to the second PTS and the video data queue index of the first video; a decoding unit configured to decode the first video in a play time order from the target key frame; and the playing unit is configured to play a second video in the first video in response to decoding the video frame corresponding to the first PTS, wherein the first frame of the second video is a video frame.

According to a third aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any of the embodiments of the method of processing video.

According to a fourth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method according to any one of the embodiments of the processing method of video.

According to a fifth aspect, a computer program product is provided, comprising a computer program which, when executed by a processor, implements a method according to any embodiment of the method of processing of video.

According to the scheme disclosed by the invention, the key frame closest to the video frame indicated by the seek request can be quickly positioned through the PTS index of the key frame, so that the efficiency of executing the seek step is improved.

Drawings

Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;

FIG. 2 is a flow diagram for one embodiment of a method of processing video, according to the present disclosure;

FIG. 3 is a schematic diagram of an application scenario of a method of processing video according to the present disclosure;

FIG. 4A is a flow diagram of yet another embodiment of a method of processing video according to the present disclosure;

FIG. 4B is a schematic diagram of a data set in a method of processing video according to the present disclosure;

FIG. 5 is a schematic block diagram illustrating one embodiment of a video processing apparatus according to the present disclosure;

fig. 6 is a block diagram of an electronic device for implementing a video processing method according to an embodiment of the present disclosure.

Detailed Description

Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.

Fig. 1 shows an exemplary system architecture 100 to which embodiments of the video processing method or video processing apparatus of the present disclosure may be applied.

As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as video applications, live applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 101, 102, and 103.

Here, the terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.

The server 105 may be a server providing various services, such as a background server providing support for the terminal devices 101, 102, 103. The background server may analyze and otherwise process the received data such as the video request, and feed back a processing result (e.g., the first video) to the terminal device.

It should be noted that the video processing method provided by the embodiment of the present disclosure may be executed by the server 105 or the terminal devices 101, 102, and 103, and accordingly, the video processing apparatus may be disposed in the server 105 or the terminal devices 101, 102, and 103.

It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.

With continued reference to fig. 2, a flow 200 of one embodiment of a method of processing video in accordance with the present disclosure is shown. The video processing method comprises the following steps:

in step 201, in response to receiving a seek request of a playing progress of a first video, a first display timestamp PTS indicated by the seek request is determined.

In this embodiment, an execution subject (for example, the terminal device shown in fig. 1) on which the video processing method operates may determine, when receiving a seek request, a first Presentation Time Stamp (PTS) indicated by the seek request, that is, a first PTS. Specifically, the seek request is for requesting a seek operation for the first video. seek refers to the playing progress, i.e. the dragging playing progress.

In practice, reception herein may refer to detection or reception from other devices.

The execution body may obtain the key frame PTS index before receiving the seek request. Specifically, the executing body may establish a key frame PTS index for the first video in the present device, or may obtain the key frame PTS index from another electronic device.

Step 202, a second PTS is obtained from the key frame PTS index, wherein the second PTS is the closest key frame PTS to the first PTS among the key frame PTS earlier than or equal to the first PTS.

In this embodiment, the executing body may acquire a key frame PTS earlier than or equal to the first PTS in the key frame PTS index and use the key frame PTS as the second PTS. The second PTS is a key frame PTS closest to the first PTS among key frame PTS earlier than or equal to the first PTS. The key frame PTS index includes a correspondence between an identification of a key frame of the first video and the PTS.

Video frames in video can be classified into I-frame type, P-frame type, and B-frame type. Wherein the video frame of the I frame type is a key frame. The data to be decoded of the key frame can be independently decoded into a complete displayable image of one frame without depending on the data of other frames. Other types of frame data often need to rely on other frames of data to decode a displayable image.

Step 203, determining the target key frame according to the second PTS and the video data queue index of the first video.

In this embodiment, the execution body may determine the target key frame according to the second PTS and the video data queue index of the first video. The video data queue index may be used to find an index for the video data. The video data refers to data to be decoded for decoding video content, for example, the video data may include frame data to be decoded.

In practice, the execution body described above may determine the target key frame from the video data queue index of the first video and the second PTS in various ways. For example, the executing entity may obtain a preset model, and input the second PTS and the video data queue index into the preset model to obtain the target key frame output from the preset model. The preset model may predict the target key frame through the second PTS and the video data queue index.

And step 204, starting from the target key frame, decoding the first video according to the playing time sequence.

In this embodiment, the execution body may start decoding data to be decoded (i.e., compressed data) of a video frame. Specifically, the start position of decoding may be the above-described target key frame. After the data to be decoded of the video frame is decoded, the video frame for display can be obtained.

Step 205, in response to decoding the video frame corresponding to the first PTS, playing a second video in the first video, where a first frame of the second video is a video frame.

In this embodiment, the executing body may perform decoding until the video frame corresponding to the first PTS is decoded, that is, a decoding result of the data to be decoded of the video frame is obtained, and then display of the decoding result of the video frame is started.

The method provided by the above embodiment of the present disclosure can quickly locate the key frame closest to the video frame indicated by the seek request through the key frame PTS index, thereby improving the efficiency of executing the seek step.

With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the video processing method according to the present embodiment. In the application scenario of fig. 3, the execution main body 301, in response to receiving a seek request of a play progress of a first video, determines a first display timestamp PTS 302 indicated by the seek request: 3 minutes, 4 seconds, 5. The execution body 301 acquires the second PTS 303 in the key frame PTS index: 3 min 4 sec 1, where the second PTS is the closest key frame PTS to the first PTS among the key frame PTS earlier than or equal to the first PTS. The executing body 301 determines the target key frame 305 from the second PTS 303 and the video data queue index 304 of the first video. The execution body 301 decodes the first video in the playback time order starting from the target key frame 305. The execution main body 301 plays the second video 306 in the first video in response to decoding the video frame corresponding to the first PTS, where the first frame of the second video is a video frame.

With further reference to fig. 4A, a flow 400 of yet another embodiment of a method of processing video is shown. The process 400 includes the following steps:

in step 401, in response to receiving a seek request of a playing progress of a first video, a first display timestamp PTS indicated by the seek request is determined.

In this embodiment, the video data queue index includes: the video time index system comprises at least one first data set and video time indexes corresponding to the first data set one by one, wherein the first data set corresponds to at least one third video one by one, and the first video is composed of a plurality of third videos with equal time length.

The duration of the third video may be a preset duration, such as a unit duration, e.g., 1 second, 1 minute, 0.5 second, etc.

Each first data set has a corresponding index value, i.e. a time index value in the video time index, and the video time index values of different first data sets are different. The video time index indicates a target time value corresponding to a third video. The target time value here may be a time range value of the third video, or a time midpoint value, or the like. The time range value here may be the time of the first frame and/or the time of the last frame of the third video.

In practice, the target time value may be an integer time value, such as a full-second time value in case the duration of the third video is 1 second, and a full-minute time value in case the duration of the third video is 1 minute.

For example, if the second PTS is 9.02 seconds and the video time index is an entire second time value, the video time index is 9 seconds.

A first data set in which data of respective video frames in the third video are present corresponds to a third video.

Step 402, a second PTS is obtained from the key frame PTS index, wherein the second PTS is the closest key frame PTS to the first PTS among the key frame PTS earlier than or equal to the first PTS.

Step 403, determining a target time index value corresponding to the second PTS in the video time index values corresponding to the at least one first data set.

In the present embodiment, the video time index is composed of a plurality of video time index values. Each video time index value corresponds to a first set of data. The execution body may determine a video time index value corresponding to the second PTS among the respective video time index values as a target time index value.

In step 404, a second data set corresponding to the target time index value is determined in the video data queue index, and the first data set includes the second data set.

In this embodiment, the second data set may be a data set of at least one video frame, or may be a data set of a video segment in the third video.

In practice, a second data set may be a first data set (target first data set). The execution body may use the first data set corresponding to the target time index value as the second data set.

Step 405, determining a target key frame from the second data set.

In this embodiment, the execution subject may determine the target key frame according to the second data set. The execution subject may determine the target key frame from the second data set in various ways. For example, the execution subject may directly use a key frame (e.g., any corresponding key frame) corresponding to the second data set as the target key frame. Or, in the case that the second data set is a data set of at least one video frame, the executing body may determine a key frame corresponding to data of any key frame in the data set as a target key frame.

Step 406, starting from the target key frame, the first video is decoded according to the playing time sequence.

Step 407, in response to decoding the video frame corresponding to the first PTS, playing a second video in the first video, where a first frame of the second video is a video frame.

The embodiment can reduce the search range, firstly finds the data set corresponding to the second PTS, and then carries out accurate search through the data set, thereby avoiding searching through the video frame and improving the search efficiency.

In some optional implementations of this embodiment, the second data set includes video frame information of a corresponding third video, where the video frame information includes: PTS, key frame identification and frame data; determining a target keyframe from a second set of data, comprising: traversing video frame information; acquiring target video frame information with the same PTS and second PTS; and determining the target video frame information as the information of the target key frame.

In these optional implementation manners, the execution main body may traverse each piece of video frame information of the third video corresponding to the second data set, so as to obtain target video frame information with the same PTS as the second PTS. Then, the execution subject may determine the target video frame information as the information of the target key frame. The key frame identification indicates whether the video frame corresponding to the video frame information is a key frame.

The implementation modes can accurately find the data to be decoded of the target key frame in a small amount of data of the data set so as to decode the displayable target key frame.

Specifically, the determining the target video frame information as the target key frame information may include: in response to determining that the key frame identification in the target video frame information indicates that the video frame is a key frame, determining the target video frame information as information of the target key frame.

The execution main body may perform verification by using the key frame identifier, and specifically, in a case where the key frame identifier indicates that the video frame is a key frame, a verification result is that the verification is passed, so that information of the target key frame may be determined. The video frame refers to a video frame corresponding to the target video frame information.

These implementations may check through the key frame identification to avoid the occurrence of a determined target key frame not being a key frame.

Optionally, the 406 may include: decoding a first video according to a playing time sequence from a target key frame according to the video data queue index; and the above method may further comprise: acquiring a third PTS of a currently decoded video frame according to the video data queue index; in response to determining that the third PTS is the same as the first PTS, it is determined that a video frame corresponding to the first PTS has been decoded.

In these alternative implementations, in order to start playing from the first PTS, the executing body may search for a video frame with the same PTS as the first PTS while continuously decoding frame data in the video data queue index. If found, the execution body may determine that the video frame corresponding to the first PTS has been decoded.

These alternative implementations may accurately decode the video frame corresponding to the first PTS via the video data queue index.

Alternatively, the duration of the third video may be 1 second.

Accordingly, the time index value may be an integer second value of 1 second, 2 seconds, 3 seconds, and so on.

These optional implementations may use standard 1 second as the duration corresponding to the data set, so that the calculation time for determining the video time index value may be reduced, and the target time index value corresponding to the second PTS may also be determined quickly.

Optionally, the video frame data further includes a time of the video frame and indication information indicating whether the video frame is a key frame; step 406 may include: determining video frames with the same time as the target key time in the video frame data in the video segment indicated by the index value; and in response to determining that the indication information of the video frame indicates that the video frame is a key frame, determining that the video frame is a video frame indicated by the target key frame time.

In practice, the execution subject may find the video frame indicated by the target key time in the video segment indicated by the index value. The time of the video frame in the video frame data of the video frame is the same as the target key time.

After that, the execution main body may check the found video frame through the indication information in the video frame data, specifically, the execution main body may determine whether the indication information of the video frame indicates that the video frame is a key frame, and in case of determining the indication, take the video frame as the video frame indicated by the target key frame time.

The implementation modes can accurately find the video frame indicated by the target key frame time through the time in the video frame data, and verify the found video frame through the indication information so as to ensure that the found video frame is the key frame.

As shown in FIG. 4B, a plurality of data sets are shown. Wherein the video frame data of each video frame (such as the 1 st frame) in the third video (such as the 1 st second) includes PTS, whether it is an I frame (key frame identification), frame data. Each third video (i.e., each second) has a corresponding set of data.

With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for processing a video, the apparatus embodiment corresponding to the method embodiment shown in fig. 2, and the apparatus embodiment may further include the same or corresponding features or effects as the method embodiment shown in fig. 2, in addition to the features described below. The device can be applied to various electronic equipment.

As shown in fig. 5, the video processing apparatus 500 of the present embodiment includes: a time determination unit 501, an acquisition unit 502, a frame determination unit 503, a decoding unit 504, and a playback unit 505. Wherein, the time determining unit 501 is configured to determine, in response to receiving a seek request of a playing progress of a first video, a first display timestamp PTS indicated by the seek request; an obtaining unit 502 configured to obtain a second PTS, which is a closest key frame PTS to the first PTS among key frame PTS's earlier than or equal to the first PTS, in the key frame PTS index; a frame determination unit 503 configured to determine a target key frame from the second PTS and the video data queue index of the first video; a decoding unit 504 configured to decode the first video in the playback time order from the target key frame; and a playing unit 505 configured to play a second video in the first video in response to decoding the video frame corresponding to the first PTS, wherein a first frame of the second video is a video frame.

In this embodiment, specific processes of the time determining unit 501, the obtaining unit 502, the frame determining unit 503, the decoding unit 504, and the playing unit 505 of the video processing apparatus 500 and technical effects brought by the specific processes can refer to related descriptions of step 201, step 202, step 203, step 204, and step 205 in the corresponding embodiment of fig. 2, which are not described herein again.

In some optional implementations of this embodiment, the video data queue index includes: the video time index value corresponds to the first data set one by one, the first data set corresponds to at least one third video one by one, and the first video is composed of a plurality of third videos with equal duration; a frame determination unit further configured to perform determining a target key frame based on the second PTS and the video data queue index of the first video as follows: determining a target time index value corresponding to the second PTS in the video time index values corresponding to the at least one first data set; in the video data queue index, determining a second data set corresponding to a target time index value, wherein the first data set comprises the second data set; a target key frame is determined from the second data set.

In some optional implementations of this embodiment, the second data set includes video frame information of a corresponding third video, where the video frame information includes: PTS, key frame identification and frame data; a frame determination unit further configured to perform determining the target key frame from the second set of data as follows: traversing video frame information; acquiring target video frame information with the same PTS and second PTS; and determining the target video frame information as the information of the target key frame.

In some optional implementations of this embodiment, the decoding unit is further configured to perform decoding the first video in the playing time order starting from the target key frame as follows: decoding a first video according to a playing time sequence from a target key frame according to the video data queue index; and the apparatus further comprises: a time acquisition unit configured to acquire a third PTS of a currently decoded video frame according to the video data queue index; and an execution unit configured to determine that the video frame corresponding to the first PTS has been decoded in response to determining that the third PTS is the same as the first PTS.

In some optional implementations of this embodiment, the duration of the third video is 1 second.

In some optional implementations of the present embodiment, the frame determination unit is further configured to perform the determining the target video frame information as the information of the target key frame as follows: in response to determining that the key frame identification in the target video frame information indicates that the video frame is a key frame, determining the target video frame information as information of the target key frame.

The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.

As shown in fig. 6, is a block diagram of an electronic device of a video processing method according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.

As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.

The memory 602 is a non-transitory computer readable storage medium provided by the present disclosure. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the video processing methods provided by the present disclosure. The non-transitory computer-readable storage medium of the present disclosure stores computer instructions for causing a computer to execute the processing method of video provided by the present disclosure.

The memory 602, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the processing method of video in the embodiments of the present disclosure (for example, the time determination unit 501, the acquisition unit 502, the frame determination unit 503, the decoding unit 504, and the playing unit 505 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing, i.e., implements the processing method of the video in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 602.

The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the processing electronics of the video, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory located remotely from the processor 601, which may be connected to the video processing electronics via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The electronic device of the video processing method may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.

The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the video processing electronics, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.

Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a time determination unit, an acquisition unit, a frame determination unit, a decoding unit, and a playback unit. Where the names of these elements do not in some cases constitute a limitation on the element itself, for example, the acquisition element may also be described as "an element that acquires a second PTS in a key frame PTS index".

As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: in response to receiving a seek request of a playing progress of a first video, determining a first display time stamp (PTS) indicated by the seek request; acquiring a second PTS in the key frame PTS index, wherein the second PTS is the key frame PTS which is earlier than or equal to the first PTS and is closest to the first PTS; determining a target key frame according to the second PTS and the video data queue index of the first video; decoding the first video according to the playing time sequence from the target key frame; and responding to the decoded video frame corresponding to the first PTS, and playing a second video in the first video, wherein the first frame of the second video is a video frame.

The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:列表视频播放方法、装置、计算机设备及其存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类