CN113423009A - Video progress adjusting method and device and electronic equipment - Google Patents

Video progress adjusting method and device and electronic equipment Download PDF

Info

Publication number
CN113423009A
CN113423009A CN202110964776.5A CN202110964776A CN113423009A CN 113423009 A CN113423009 A CN 113423009A CN 202110964776 A CN202110964776 A CN 202110964776A CN 113423009 A CN113423009 A CN 113423009A
Authority
CN
China
Prior art keywords
video frame
current
frame
decoding result
decoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110964776.5A
Other languages
Chinese (zh)
Other versions
CN113423009B (en
Inventor
任晓明
王树波
涂远友
许磊
陈琦
张亚楠
吴西亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xintuoyun (Beijing) Technology Co.,Ltd.
Original Assignee
Beijing Tuoke Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tuoke Network Technology Co ltd filed Critical Beijing Tuoke Network Technology Co ltd
Priority to CN202110964776.5A priority Critical patent/CN113423009B/en
Publication of CN113423009A publication Critical patent/CN113423009A/en
Application granted granted Critical
Publication of CN113423009B publication Critical patent/CN113423009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations

Landscapes

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

Abstract

本发明提供了一种视频进度调整方法、装置及电子设备,其中,该方法包括:获取对当前视频的进度调整事件,进度调整事件用于定位到当前视频的目标视频帧;确定目标视频帧所处的目标区间;若当前解码视频帧位于目标区间内,在当前解码结果的基础上,执行确定目标视频帧的解码结果的第一操作,并显示第一操作对应的解码结果。通过本发明实施例提供的视频进度调整方法、装置及电子设备,无需从目标视频帧的前关键帧依次解码至目标视频帧,能直接在当前解码视频帧的解码结果的基础上执行第一操作,利于快速得到目标视频帧的解码结果,减少了解码帧数,提高了解码速度。且相对于传统的快速定位法,本方法能够解码至目标视频帧,准确地显示解码结果。

Figure 202110964776

The present invention provides a video progress adjustment method, device and electronic equipment, wherein the method includes: acquiring a progress adjustment event for a current video, and the progress adjustment event is used to locate a target video frame of the current video; If the current decoded video frame is located in the target interval, the first operation of determining the decoding result of the target video frame is performed on the basis of the current decoding result, and the decoding result corresponding to the first operation is displayed. With the video progress adjustment method, device, and electronic device provided by the embodiments of the present invention, it is not necessary to sequentially decode from the previous key frame of the target video frame to the target video frame, and the first operation can be directly performed on the basis of the decoding result of the currently decoded video frame , which is conducive to quickly obtaining the decoding result of the target video frame, reduces the number of decoding frames, and improves the decoding speed. And compared with the traditional fast positioning method, the method can decode to the target video frame and display the decoding result accurately.

Figure 202110964776

Description

Video progress adjusting method and device and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a video progress adjusting method and device, electronic equipment and a computer readable storage medium.
Background
With the development of computer technology and streaming media technology, video players are becoming an indispensable application software in electronic devices. The video player not only can provide basic functions of browsing, watching and the like, but also can adjust the video playing progress through a positioning function of moving the progress of the player to a specified position. For example, a positioning function is triggered to perform fast forward or fast backward operation by a manual drag bar of a user, and a video node to be watched is determined according to a video frame when the drag bar is set by the user.
At present, two methods are mainly used for realizing the positioning function, namely quick positioning and accurate positioning. The fast positioning means that when the video player detects a progress adjustment event, the player needs to find the previous key frame closest to the time point of the event, use the key frame as the video frame when the event ends, and decode and display the video frame on the player screen. Although the scheme can quickly realize the positioning function and play the video content, the displayed result is only the picture corresponding to the key frame adjacent to the video frame when the progress adjustment event is finished, and the display result is not accurate. The accurate positioning means that when the video player detects a progress adjustment event, the player finds the previous key frame closest to the time point of the event, and reads and decodes the previous key frame from the key frame backward frame by frame until the video frame at the end of the event is reached, and the video frame is accurately displayed on the player screen. Although the method can realize accurate positioning, when continuous dragging is carried out, the method needs to finish a process of decoding frames by frames from a key frame every time of positioning, the number of the video frames needing to be decoded is large, time is consumed, and the player has low decoding efficiency and cannot be played quickly.
Therefore, in the process of adjusting the video playing progress by the positioning function in the two conventional methods, the video player has the problems of inaccurate display picture or slow decoding speed and incapability of playing quickly.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a video progress adjustment method, apparatus, electronic device, and computer-readable storage medium.
In a first aspect, an embodiment of the present invention provides a method for adjusting a video progress, including: acquiring a progress adjustment event of a current video, wherein the progress adjustment event is used for positioning a target video frame of the current video; determining a target interval in which the target video frame is located, wherein the target interval is an interval between two adjacent key frames; and if the current decoding video frame is positioned in the target interval, executing a first operation for determining the decoding result of the target video frame on the basis of the current decoding result, and displaying the decoding result corresponding to the first operation.
Optionally, the progress adjustment event includes fast forwarding and/or fast rewinding the current video; the first operation includes: decoding from the current decoded video frame to the target video frame based on a decoding result of the current decoded video frame if the progress adjustment event is a fast forward of the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame; under the condition that the progress adjustment event is fast backward of the current video, extracting a decoding result corresponding to the target video frame from the current decoding result; wherein the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
Optionally, decoding from the current decoded video frame to the target video frame comprises: decoding the current decoded video frame to the target video frame, under the condition that a new progress adjustment event is not triggered, until the decoding result of the target video frame is determined, wherein the decoding result corresponding to the first operation comprises the decoding result of the target video frame; in the process of decoding from the current decoded video frame to the target video frame, when a new progress adjustment event is triggered, ending the process of decoding from the current decoded video frame to the target video frame, and determining a decoding result of a first end video frame, where the first end video frame is a video frame corresponding to the end of the process of decoding from the current decoded video frame to the target video frame, and the decoding result corresponding to the first operation includes the decoding result of the first end video frame.
Optionally, the method further comprises: and if the current decoded video frame is not positioned in the target interval, executing a second operation of determining the decoding result of the target video frame on the basis of the previous key frame of the target interval, and displaying the decoding result corresponding to the second operation.
Optionally, the second operation comprises: decoding the target video frame from the previous key frame, and under the condition that a new progress adjustment event is not triggered, determining the decoding result of the target video frame, wherein the decoding result corresponding to the second operation comprises the decoding result of the target video frame; in the process of decoding from the previous key frame to the target video frame, when a new progress adjustment event is triggered, ending the process of decoding from the previous key frame to the target video frame, and determining a decoding result of a second ending video frame, where the second ending video frame is a video frame corresponding to the end of the process of decoding from the previous key frame to the target video frame, and the decoding result corresponding to the second operation includes the decoding result of the second ending video frame.
Optionally, the progress adjustment event is an event triggered by performing a dragging and/or clicking operation on a cursor of the current video progress bar.
In a second aspect, an embodiment of the present invention provides a video progress adjusting apparatus, including: the device comprises an acquisition module, a positioning module and a processing module.
The acquisition module is used for acquiring a progress adjustment event of a current video, wherein the progress adjustment event is used for positioning a target video frame of the current video.
The positioning module is used for determining a target interval where the target video frame is located, wherein the target interval is an interval between two adjacent key frames.
The processing module is used for executing a first operation of determining the decoding result of the target video frame on the basis of the current decoding result if the current decoding video frame is positioned in the target interval, and displaying the decoding result corresponding to the first operation.
Optionally, the progress adjustment event includes fast forwarding and/or fast rewinding the current video; the processing module includes a first decoding unit and a second decoding unit capable of performing a first operation.
The first decoding unit is used for decoding the current decoding video frame to the target video frame based on the decoding result of the current decoding video frame under the condition that the progress adjustment event is to fast forward the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame.
The second decoding unit is used for extracting a decoding result corresponding to the target video frame from the current decoding result under the condition that the progress adjustment event is fast backward of the current video; wherein the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a bus, a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor; the transceiver, the memory and the processor are connected via the bus, and the computer program, when executed by the processor, implements the steps in the schedule adjustment event method as described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including: a computer program stored on a readable storage medium; the computer program, when executed by a processor, implements the steps in the progress adjustment event method as described above.
According to the video progress adjusting method, the video progress adjusting device, the electronic equipment and the computer readable storage medium, under the condition that the current decoding video frame is in the target interval, the decoding result of the target video frame is determined on the basis of the current decoding result. The method does not need to decode the previous key frame of the target video frame to the target video frame in sequence, can directly execute the first operation on the basis of the decoding result of the current decoded video frame, is favorable for quickly obtaining the decoding result of the target video frame, reduces the number of the video frames needing to be decoded, improves the decoding speed in the progress adjustment process, and can quickly display the picture corresponding to the decoding result of the target video frame on the player screen. And compared with the traditional quick positioning method, the method directly decodes the previous key frame adjacent to the target video frame and displays the decoding result of the previous key frame on the player screen.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
Fig. 1 is a flowchart illustrating a video progress adjustment method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a first operation in the video progress adjustment method according to the embodiment of the present invention;
fig. 3 is a detailed flowchart of a video progress adjustment method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a video progress adjusting apparatus according to an embodiment of the present invention;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described below with reference to the drawings.
Fig. 1 shows a flowchart of a video progress adjustment method according to an embodiment of the present invention. As shown in fig. 1, the method comprises steps 101-103.
Step 101: and acquiring a progress adjustment event of the current video, wherein the progress adjustment event is used for positioning to a target video frame of the current video.
In the embodiment of the present invention, the current video is a video currently displayed by a player operated by a user, and the video may be a video being played or a video during a pause period of playing. When the current video needs to be fast-forwarded or fast-rewound, a user may perform a progress adjustment operation, for example, a dragging and/or clicking operation is performed on a cursor of a progress bar of the current video, and a corresponding event, that is, a progress adjustment event, may be triggered based on the progress adjustment operation; moreover, the operation of the progress adjustment points to a certain video frame in the current video, where the video frame is a video frame that the user needs to locate, and this embodiment is referred to as a target video frame; in general, the target video frame is a video frame corresponding to the end time point of the progress adjustment event. After the progress adjustment event of the current video is acquired, the picture displayed by the current video can be adjusted to a corresponding picture, for example, a picture represented by the target video frame, through subsequent positioning processing.
For example, by dragging the progress bar of the current video by the user or directly clicking on the progress bar of the current video, the position of the target video frame corresponding to the progress bar can be changed, and after subsequent positioning processing, the picture displayed by the current video can be adjusted to the picture corresponding to the decoding result of the target video frame, so that the player can display the decoding result of the video frame corresponding to the position adjusted by the user on the screen, which can be referred to as a progress adjustment event.
Step 102: and determining a target interval in which the target video frame is positioned, wherein the target interval is an interval between two adjacent key frames.
The video is characterized in that a series of pictures are played by utilizing the principle of human eye visual persistence, so that human eyes generate motion feeling, and accordingly, continuous and smooth image animation is formed in the human eyes. The decoding result of the video frame is a single image picture of the minimum unit in the image animation, a single video frame is just a static picture after being decoded, and the decoding results of a plurality of video frames are displayed in a rapid and continuous manner to form the motion artifact which is presented as the image animation in human eyes, such as the video watched by people. The video generally includes a plurality of key frames and a plurality of non-key frames, the key frames are also called intra-frame coded frames, are independent frames with all information, can be independently decoded without referring to other image frames, and can be simply understood as a static picture, specifically, a frame where a key action in the motion or change of a character or an object is located. Non-key frames need to be decoded based on other image frames, for example, the non-key frames may be P frames or B frames. All key frames in the current video can be determined, and thus which two adjacent key frames the target video frame is located between can be determined, based on which the target interval can be determined. Since the current video may have multiple key frames, there may be multiple intervals determined by two adjacent key frames.
In the embodiment of the invention, the position of a target video frame on a progress bar of a current video can be determined through an obtained progress adjustment event, and a key frame which has a timestamp earlier than that of the target video frame and is adjacent to the target video frame on the progress bar is selected as a previous key frame; selecting a key frame which is later than the time stamp of the target video frame on the time stamp of the progress bar and is adjacent to the target video frame as a rear key frame; and taking the interval between the front key frame and the rear key frame as a target interval, wherein the target interval represents the interval where the progress adjustment event is located, and the target interval contains a target video frame. For example, the user drags a progress bar cursor and positions the cursor from the 3 rd minute position of the current video to the 4 th minute position of the current video, wherein the video frame corresponding to the 4 th minute position of the current video is the target video frame of the progress adjustment event. And taking the interval between the front key frame and the rear key frame of the video frame corresponding to the 4 th minute on the progress bar containing the current video as a target interval.
Step 103: and if the current decoding video frame is positioned in the target interval, executing a first operation of determining the decoding result of the target video frame on the basis of the current decoding result, and displaying the decoding result corresponding to the first operation.
Decoding is the process of restoring the compression-encoded video to uncompressed video. Wherein the currently decoded video frame represents a video frame currently being decoded upon receipt of the progress adjustment event. If the position of the current decoding video frame on the progress bar is in the target interval corresponding to the current progress adjustment event, namely the current decoding video frame and the target video frame are between the same front key frame and the same rear key frame, the range of the current progress adjustment event is small and the interval determined by other adjacent key frames is not involved. In this case, a first operation of determining a decoding result of the target video frame is performed on the current video based on the current decoding result. In the implementation of the present invention, the current decoding result may include a decoding result of the current decoded video frame, or a decoding result of a video frame from the previous key frame to the current decoded video frame.
The process of executing the first operation may include decoding the target video frame by frame starting from the current decoded video frame until the target video frame is decoded and a decoding result of the target video frame is obtained; and ending the first operation after obtaining the decoding result of the target video frame. The decoding result corresponding to the first operation refers to a decoding result obtained when the first operation is ended. After the decoding result of the target video frame is obtained through the first operation, the decoding result corresponding to the first operation is the decoding result of the target video frame, and a picture corresponding to the decoding result of the target video frame can be displayed on a player screen. For example, a user moves a cursor position corresponding to a 3 rd frame (i.e., a currently decoded video frame) being decoded in a plurality of video frames in a current video to a position corresponding to a 5 th frame by operating a progress bar cursor, that is, a target video frame located by a progress adjustment event is the 5 th frame; according to two key frames adjacent to the 5 th frame in front and back, if the front key frame is the 1 st frame and the back key frame is the 6 th frame, the target interval can be determined to be the interval between the 1 st frame and the 6 th frame, namely the target interval is [1,6 ]; it follows that the 3 rd frame (the currently decoded video frame) and the 5 th frame (the target video frame) are in the same target interval. At this time, a decoding operation is performed based on the decoding result of the currently decoded 3 rd frame, and the decoding result of the 5 th frame can be determined, which is referred to as a first operation; if the decoding result of the 5 th frame is obtained, the picture corresponding to the decoding result of the 5 th frame can be displayed on the player screen.
In the embodiment of the invention, under the condition that the current decoding video frame is in the target interval, the decoding result of the target video frame is determined on the basis of the current decoding result. The method does not need to decode the previous key frame of the target video frame to the target video frame in sequence, can directly execute the first operation on the basis of the decoding result of the current decoded video frame, is favorable for quickly obtaining the decoding result of the target video frame, reduces the number of the video frames needing to be decoded, improves the decoding speed in the progress adjustment process, and can quickly display the picture corresponding to the decoding result of the target video frame on the player screen. And compared with the traditional quick positioning method, the method directly decodes the previous key frame adjacent to the target video frame and displays the decoding result of the previous key frame on the player screen.
Optionally, when the user adjusts the playing progress of the current video, the triggered progress adjustment event may be a fast forward operation performed on the current video, or a fast rewind operation performed on the current video, so the progress adjustment event includes fast forward and/or fast rewind of the current video; referring to fig. 2, the "first operation" described in the above step 103 includes the following step 1031 or step 1032.
Step 1031: decoding from the current decoded video frame to a target video frame based on a decoding result of the current decoded video frame when the progress adjustment event is a fast forward for the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame.
When the progress adjustment event is fast-forwarding the current video, the position of the current decoded video frame on the progress bar is definitely before the position of the target video frame on the progress bar, that is, the target video frame is located behind the current decoded video frame, the target video frame is not decoded yet, the current decoding result at this time includes the decoding result of the current decoded video frame, and a decoding operation needs to be performed based on the decoding result of the current decoded video frame to obtain the decoding result of the target video frame. In this embodiment of the present invention, the first operation may be to decode from a current decoded video frame to a next frame, which is not limited in this embodiment as to whether a target video frame is decoded.
Alternatively, decoding from the current decoded video frame to the target video frame may include the following step a1 or step a 2.
Step A1: and decoding the current decoded video frame to the target video frame, under the condition that no new progress adjustment event is triggered, until the decoding result of the target video frame is determined, wherein the decoding result corresponding to the first operation comprises the decoding result of the target video frame.
In the embodiment of the present invention, if the currently decoded video frame is located in the target interval and is fast-forwarded, the first operation may be to decode the currently decoded video frame backward frame by frame along the progress bar, and if a new progress adjustment event is not triggered in the decoding process, the decoding may be continued until the target video frame is decoded, and the decoding of the target video frame is completed. For example, when the target interval is [1,6], the currently decoded video frame is the 3 rd frame, the target video frame is the 5 th frame, and the current progress adjustment event is fast forward, since the current video is already decoded to the 3 rd frame, it is not necessary to decode again from the 1 st frame, decoding can be continued from the 3 rd frame to the 5 th frame direction directly, and the decoding results of the 3 rd frame, the 4 th frame, and the 5 th frame are obtained sequentially, and the decoding result of the 5 th frame is the decoding result of the target video frame, which is also the decoding result corresponding to the first operation that can be displayed.
Step A2: in the process of decoding from the current decoded video frame to the target video frame, when a new progress adjustment event is triggered, the process of decoding from the current decoded video frame to the target video frame is ended, and a decoding result of a first end video frame is determined, wherein the first end video frame is a video frame corresponding to the process of ending decoding from the current decoded video frame to the target video frame, and the decoding result corresponding to the first operation comprises the decoding result of the first end video frame.
In the process of executing the first operation, that is, in the process of decoding from the current decoded video frame to the target video frame, when the first operation is not yet executed to decode the target video frame, if a user triggers a new progress adjustment event, that is, at this time, a plurality of progress adjustment events exist in the current video, or a continuously triggered progress adjustment event, for example, in the process of dragging the current video progress bar by the user, the player may periodically read the position of the progress bar, each determined position corresponds to a position to be adjusted, and each determined position corresponds to a progress adjustment event. For example, in the process that the user continuously drags the current video progress bar from the 1 st frame to the 100 th frame, if the 20 th frame and the 60 th frame can be read in the middle, corresponding progress adjustment events are also respectively triggered when the current video progress bar moves to the 20 th frame and the 60 th frame, and the target video frames corresponding to the progress adjustment events are respectively the 20 th frame and the 60 th frame. In the embodiment of the present invention, at the time of triggering a new progress adjustment event, on one hand, processing of the new progress adjustment event is started, and on the other hand, a first operation being executed is immediately stopped, and a decoding result corresponding to a video frame at the time of stopping the first operation is determined and is used as a decoding result of a first end video frame, where the decoding result of the first end video frame is a decoding result corresponding to the first operation.
For example, if the target interval is [6,15], the progress adjustment event triggered for the first time by the user is to position the playing progress of the current video from the 7 th frame to the 10 th frame, where the 7 th frame is the current decoded video frame in the progress adjustment event, and the 10 th frame is the target video frame in the progress adjustment event; when the first operation currently being executed is executed to decode the 9 th frame, namely, when the first operation is decoded from the 7 th frame to the 9 th frame, the user continues to trigger a new progress adjustment event, wherein the new progress adjustment event is to position the playing progress of the current video from the 10 th frame to the 14 th frame, and the 14 th frame is a target video frame in the new progress adjustment event. In the embodiment of the present invention, on the one hand, the process of the first operation is stopped immediately, that is, the decoding process from the 9 th frame to the 10 th frame, which has not been executed in the process of decoding from the 7 th frame to the 10 th frame, is stopped, and the decoding is not continued to the 10 th frame any more, even if the 10 th frame is the target video frame in the progress adjustment event. Meanwhile, a video frame (namely, a 9 th frame) at a first operation ending moment corresponding to the moment triggering the new progress adjustment event is taken as a first ending video frame, a decoding result of the 9 th frame is determined, and the decoding result of the 9 th frame is a decoding result corresponding to the first operation; on the other hand, the new progress adjustment event is processed, and since the currently decoded video frame is the 9 th frame, the 14 th frame (new target video frame) can be decoded according to the decoding result of the 9 th frame.
In the implementation of the invention, in the process of decoding from the current decoded video frame to the target video frame, if a new progress adjustment event is triggered, the first operation is stopped no matter whether the target video frame is decoded or not, and at this time, a certain video frame between the current decoded video frame and the target video frame is taken as a first end video frame, and the decoding result of the first end video frame is rendered to be displayed in a player; the method directly stops the current first operation, does not influence the decoding process in the subsequent new progress adjustment event, does not need to decode the video frame between the first end video frame and the target video frame, reduces the number of decoding frames, and can improve the decoding efficiency. In addition, compared with the traditional quick positioning method, the video frame positioned by the progress adjustment event can be displayed more accurately when the first end video frame is displayed in the player.
Step 1032: under the condition that the progress adjustment event is that the current video is fast-backed, extracting a decoding result corresponding to the target video frame from the current decoding result; and the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
When the progress adjustment event is fast-backward of the current video, the position of the current decoded video frame on the progress bar is generally behind the position of the target video frame on the progress bar, that is, the target video frame is located before the current decoded video frame, so the target video frame is probably decoded. In the embodiment of the present invention, if the current decoded video frame is located in the target interval, it can be basically determined that the current video has completed all decoding processes from the previous key frame in the target interval to the current decoded video frame, and a decoding result from the previous key frame to each frame in the current decoded video frame is obtained. And taking the decoding result of each frame from the previous key frame to the current decoding video frame as the current decoding result. Since the progress adjustment event is fast backward, and the target video frame is located between the previous key frame and the currently decoded video frame in the target interval, the decoding result of the target video frame is also obtained through the decoding process, and the decoding result of the target video frame is one of a plurality of current decoding results starting from the previous key frame to the currently decoded video frame in the target interval. Therefore, in the embodiment of the present invention, the decoding result corresponding to the target video frame can be directly extracted from the current decoding result. For example, when the target interval is [1,6], the current decoded video frame is the 5 th frame, the target video frame is the 3 rd frame, and the current schedule adjustment event is fast backward, since the current video has been decoded from the 1 st frame to the 5 th frame, which includes the decoding result of the 3 rd frame, the decoding result of the 3 rd frame can be directly extracted from the current decoding results of the 1 st frame to the 5 th frame, and the decoding result of the 3 rd frame is the decoding result of the target video frame and is the decoding result corresponding to the first operation.
Because a large number of video frames need to be decoded when the video is played, decoding results corresponding to the video frames cannot be saved after the video is decoded under normal conditions, so that a large amount of buffer space is avoided; therefore, in order to make the video play smoothly and save the storage space, the decoding results of all the video frames in a smaller range, such as the decoding results of all the already decoded video frames in the section where the current decoded video frame is located, can be saved in a buffer manner during video decoding.
The embodiment of the invention classifies the progress adjustment events, utilizes the difference of the position relation between the current decoding video frame and the target video frame under the two conditions of fast forward and fast backward, and adopts two different means to execute the first operation. And when the progress adjustment event is fast forward, directly decoding the current decoded video frame to the target video frame to obtain a decoding result of the target video frame. In this case, since the decoding can be directly started from the currently decoded video frame, a repeated process from re-decoding from the previous key frame to the currently decoded video frame is avoided, the number of decoded video frames is reduced, and the decoding speed is increased. When the progress adjustment event is fast backward, the decoding result of the target video frame which is decoded and temporarily cached in the player is directly extracted from the current decoding result, any video frame does not need to be decoded again, and the speed of displaying the picture corresponding to the decoding result by the player is greatly improved.
Optionally, the method further comprises: and if the current decoded video frame is not positioned in the target interval, executing a second operation for determining the decoding result of the target video frame on the basis of the previous key frame of the target interval, and displaying the decoding result corresponding to the second operation.
If the current decoded video frame is not in the target interval corresponding to the current progress adjustment event, that is, the current decoded video frame and the target video frame are not between the same front key frame and the same rear key frame, it indicates that the range of the current progress adjustment event already relates to the interval determined by other adjacent key frames. In this case, the second operation of determining the decoding result of the target video frame is performed on the current video based on the previous key frame of the target interval, and may be performed to obtain the decoding result of the target video frame regardless of whether the progress adjustment event is fast forward or fast backward.
For example, when the key frames of the current video are the 1 st frame, the 6 th frame, and the 15 th frame … … in sequence, the user moves the cursor position corresponding to the 3 rd frame (i.e., the current decoded video frame) being decoded within the [1,6] interval of the current video to the position corresponding to the 10 th frame (i.e., the target video frame) by controlling the progress bar cursor, that is, the current progress adjustment event positions the target video frame in the target interval [6,15] in which the previous key frame is the 6 th frame and the next key frame is the 15 th frame. At this time, based on the previous key frame (i.e., the 6 th frame) of the target video frame, a process of determining the decoding result of the target video frame, which may be referred to as a second operation, can be performed, and after determining the decoding result of the 10 th frame, the decoding result of the 10 th frame is displayed on the player screen.
Or, when the progress adjustment event is fast backward, the user moves the cursor position corresponding to the 10 th frame being decoded (i.e. the current decoded video frame) in the [6,15] interval of the current video to the position corresponding to the 3 rd frame (i.e. the target video frame) by controlling the progress bar cursor, that is, the current progress adjustment event positions the target video frame to the target interval [1,6] in which the previous key frame is the 1 st frame and the next key frame is the 6 th frame. At this time, based on the previous key frame (i.e. the 1 st frame) of the target video frame, a process of determining the decoding result of the target video frame, which may be referred to as a second operation, may be performed, and finally, the decoding result of the 3 rd frame may also be displayed on the player screen.
The embodiment of the invention can realize the adjustment of the video progress under the condition that the current decoding video frame which is decoded currently and the target video frame after the progress adjustment are positioned in the same target interval, and is also suitable for the condition that the target video frame and the current decoding video frame are respectively positioned in different intervals. The second operation can be started to decode only from the previous key frame of the target video frame, and has no interference to the progress adjustment event, namely fast forward or fast backward, so that the analysis result of the target video frame can be accurately obtained on the basis of the previous key frame of the target video frame, and the picture displayed after the player is positioned is more accurate.
Alternatively, the second operation described above includes the following step B1 or step B2.
Step B1: and decoding the previous key frame to the target video frame, and under the condition that a new progress adjustment event is not triggered, determining the decoding result of the target video frame, wherein the decoding result corresponding to the second operation comprises the decoding result of the target video frame.
If the current decoded video frame and the target video frame are not in the same interval, namely the current decoded video frame is not in the target interval, the second operation is to decode backward frame by frame from the previous key frame of the target video frame until the target video frame is decoded, and finish the decoding of the target video frame. For example, the current decoded video frame is frame 3, the target video frame is frame 10, the current decoded video frame is in the interval [1,6], and the target interval is [6,15], which are not in the same interval. Therefore, when moving from the 3 rd frame to the 10 th frame, the decoding result of the 6 th frame to the 10 th frame is obtained only by decoding the 10 th frame of the target key frame by frame from the 6 th frame of the previous key frame in the target interval [6,15] where the 10 th frame is located.
Step B2: in the process of decoding from the previous key frame to the target video frame, when a new progress adjustment event is triggered, ending the process of decoding from the previous key frame to the target video frame, and determining a decoding result of a second ending video frame, wherein the second ending video frame is a video frame corresponding to the process of ending the decoding from the previous key frame to the target video frame, and the decoding result corresponding to the second operation comprises the decoding result of the second ending video frame.
When the second operation is not yet executed to decode the target video frame during the process of executing the second operation, that is, during the process of decoding from the previous key frame to the target video frame, if a new progress adjustment event is triggered by a user, the second operation being executed is immediately stopped no matter whether the new progress adjustment event is fast forward or fast backward, and a decoding result corresponding to the video frame at the second operation stop time is determined and is used as a decoding result of a second ending video frame, where the decoding result of the second ending video frame is a decoding result corresponding to the second operation.
For example, the progress adjustment event triggered by the user for the first time is to position the playing progress of the current video from the 3 rd frame to the 10 th frame, where the 3 rd frame is the current decoded video frame in the progress adjustment event, and the interval where the 3 rd frame is located is [1,6 ]; the 10 th frame is a target video frame in the progress adjustment event, and the target interval is [6,15 ]. Since the interval in which the currently decoded video frame is located is not in the target interval corresponding to the current progress adjustment event, the second operation of decoding the 10 th frame from the 6 th frame, which is the key frame before the 10 th frame of the target video frame, frame by frame may be performed. When the second operation currently being executed is executed to decode the 8 th frame, if the user continues to trigger a new progress adjustment event, the new progress adjustment event positions the playing progress of the current video from the 10 th frame to the 19 th frame, where the 19 th frame is a target video frame in the new progress adjustment event, and a target interval in which the 19 th frame of the target video frame is located in the new progress adjustment event triggered for the second time is [15,20 ]. In the embodiment of the present invention, on the one hand, the process of the second operation corresponding to the previous progress adjustment event is stopped immediately, that is, the decoding process from the 8 th frame to the 10 th frame, which is not executed in the process of decoding from the 6 th frame to the 10 th frame, is stopped, and the decoding process is not continued to the 10 th frame, even if the 10 th frame is the target video frame in the progress adjustment event. Meanwhile, a video frame (namely, 8 th frame) at a second operation ending time corresponding to the time of triggering the new progress adjustment event is used as a second ending video frame, a decoding result of the 8 th frame is determined, and the decoding result of the 8 th frame is a decoding result corresponding to the second operation. On the other hand, for processing the new progress adjustment event, since the 19 th frame of the target video frame in the new progress adjustment event and the 8 th frame of the video frame currently being decoded are respectively in different intervals, the second operation of determining the 19 th frame of the target video frame in the new progress adjustment event, namely, decoding from the 15 th frame of the previous key frame of the 19 th frame to the 19 th frame one by one, can be performed.
In the implementation of the invention, in the process of decoding from the current decoded video frame to the target video frame, if a new progress adjustment event is triggered, the second operation is stopped no matter whether the target video frame is decoded or not, at this time, a certain video frame between the current decoded video frame and the target video frame is taken as a second ending video frame, and the decoding result of the second ending video frame is rendered to be displayed in a player; the method directly stops the current second operation, does not influence the decoding process in the subsequent new progress adjustment event, does not need to decode the video frame between the second ending video frame and the target video frame, reduces the number of decoding frames, and can improve the decoding efficiency. In addition, compared with the traditional quick positioning method, the second ending video frame is displayed in the player, and the video frame positioned by the progress adjustment event can be displayed more accurately.
The following describes the flow of the video progress adjustment method in detail by an embodiment. The method is applied to video playing scenes to realize the adjustment of the video playing progress. Referring to fig. 3, the method comprises the following steps 301-308.
Step 301: all key frames of the current video are obtained, and the current video is divided into a plurality of intervals according to the mode that every two adjacent key frames are divided into one interval.
Step 302: acquiring a progress adjustment event triggered by the operation of a current video progress bar cursor by a user, determining a target video frame of the progress adjustment event, and taking an interval where the target video frame is located as a target interval.
The target interval can be determined based on the process described in step 102, and details are not repeated.
Step 303: and determining the current decoding video frame corresponding to the moment of triggering the progress adjustment event.
Step 304: judging whether the current decoding video frame is positioned in the target interval, if so, executing step 305; if not, proceed to step 308.
Step 305: and judging whether the progress adjustment event is fast forward, if so, performing step 306, and otherwise, performing step 307.
Step 306: and executing a first operation of decoding the current decoded video frame to the target video frame by frame based on the decoding result of the current decoded video frame, and displaying the decoding result corresponding to the first operation.
The first operation may be performed based on the process described in step a1 or a2, and will not be described herein again.
Step 307: and extracting a decoding result corresponding to the target video frame from the current decoding result, and displaying the decoding result corresponding to the target video frame.
Step 308: and executing a second operation of determining the decoding result of the target video frame on the basis of the previous key frame of the target interval, and displaying the decoding result corresponding to the second operation.
For a specific implementation of the second operation, reference may be made to the processes described in the above steps B1 and B2, and the specific processes are not described in detail.
An embodiment of the present invention provides a video progress adjustment device, as shown in fig. 4, the video progress adjustment device includes: an acquisition module 41, a positioning module 42 and a processing module 43.
The obtaining module 41 is configured to obtain a progress adjustment event for a current video, where the progress adjustment event is used to locate a target video frame of the current video.
The positioning module 42 is configured to determine a target interval in which the target video frame is located, where the target interval is an interval between two adjacent key frames.
The processing module 43 is configured to, if the current decoded video frame is located in the target interval, execute a first operation of determining a decoding result of the target video frame on the basis of the current decoding result, and display the decoding result corresponding to the first operation.
Optionally, the progress adjustment event includes fast forwarding and/or fast rewinding the current video; the processing module 43 includes a first decoding unit and a second decoding unit capable of performing a first operation.
The first decoding unit is used for decoding the current decoding video frame to the target video frame based on the decoding result of the current decoding video frame under the condition that the progress adjustment event is to fast forward the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame.
The second decoding unit is used for extracting a decoding result corresponding to the target video frame from the current decoding result under the condition that the progress adjustment event is fast backward of the current video; wherein the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
Optionally, the first decoding unit includes: a first decoding sub-unit and a second decoding sub-unit.
The first decoding subunit is configured to decode from the current decoded video frame to the target video frame, and under the condition that no new progress adjustment event is triggered, until a decoding result of the target video frame is determined, where the decoding result corresponding to the first operation includes a decoding result of the target video frame.
The second decoding subunit is configured to, in a process of decoding from the current decoded video frame to the target video frame, end the process of decoding from the current decoded video frame to the target video frame when a new progress adjustment event is triggered, and determine a decoding result of a first end video frame, where the first end video frame is a video frame corresponding to the end of the process of decoding from the current decoded video frame to the target video frame, and the decoding result corresponding to the first operation includes the decoding result of the first end video frame.
Optionally, the apparatus further comprises an adjustment module.
The adjusting module is used for executing a second operation of determining the decoding result of the target video frame on the basis of the previous key frame of the target interval if the current decoding video frame is not located in the target interval, and displaying the decoding result corresponding to the second operation.
Optionally, the adjusting module includes a third decoding unit and a fourth decoding unit capable of performing the second operation.
The third decoding unit is configured to decode from the previous key frame to the target video frame, and under the condition that a new progress adjustment event is not triggered, until a decoding result of the target video frame is determined, where the decoding result corresponding to the second operation includes the decoding result of the target video frame.
The fourth decoding unit is configured to, in a process of decoding from the previous key frame to the target video frame, end the process of decoding from the previous key frame to the target video frame when a new progress adjustment event is triggered, and determine a decoding result of a second end video frame, where the second end video frame is a video frame corresponding to the end of the process of decoding from the previous key frame to the target video frame, and the decoding result corresponding to the second operation includes the decoding result of the second end video frame.
Optionally, the progress adjustment event is an event triggered by performing a dragging and/or clicking operation on a cursor of the current video progress bar.
According to the video progress adjusting device provided by the embodiment of the invention, under the condition that the current decoding video frame is in the target interval, the decoding result of the target video frame is determined on the basis of the current decoding result. The device does not need to decode the previous key frame of the target video frame to the target video frame in sequence, can directly execute the first operation on the basis of the decoding result of the current decoded video frame, is favorable for quickly obtaining the decoding result of the target video frame, reduces the number of the video frames needing to be decoded, improves the decoding speed in the progress adjustment process, and can quickly display the picture corresponding to the decoding result of the target video frame on the player screen. And compared with the traditional device which utilizes the rapid positioning method and directly decodes the previous key frame adjacent to the target video frame, the device can decode the target video frame and further can display the accurate decoding result.
In addition, an embodiment of the present invention further provides an electronic device, which includes a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the transceiver, the memory, and the processor are connected via the bus, and when the computer program is executed by the processor, the processes of the video schedule adjustment method embodiment are implemented, and the same technical effect can be achieved, and details are not repeated here to avoid repetition.
Specifically, referring to fig. 5, an embodiment of the present invention further provides an electronic device, which includes a bus 1110, a processor 1120, a transceiver 1130, a bus interface 1140, a memory 1150, and a user interface 1160.
In an embodiment of the present invention, the electronic device further includes: a computer program stored on the memory 1150 and executable on the processor 1120, the computer program, when executed by the processor 1120, implementing the various processes of the video progress adjustment method embodiments described above.
A transceiver 1130 for receiving and transmitting data under the control of the processor 1120.
In embodiments of the invention in which a bus architecture (represented by bus 1110) is used, bus 1110 may include any number of interconnected buses and bridges, with bus 1110 connecting various circuits including one or more processors, represented by processor 1120, and memory, represented by memory 1150.
Bus 1110 represents one or more of any of several types of bus structures, including a memory bus, and memory controller, a peripheral bus, an Accelerated Graphics Port (AGP), a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include: an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA), a Peripheral Component Interconnect (PCI) bus.
Processor 1120 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits in hardware or instructions in software in a processor. The processor described above includes: general purpose processors, Central Processing Units (CPUs), Network Processors (NPs), Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), Complex Programmable Logic Devices (CPLDs), Programmable Logic Arrays (PLAs), Micro Control Units (MCUs) or other Programmable Logic devices, discrete gates, transistor Logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. For example, the processor may be a single core processor or a multi-core processor, which may be integrated on a single chip or located on multiple different chips.
Processor 1120 may be a microprocessor or any conventional processor. The steps of the method disclosed in connection with the embodiments of the present invention may be directly performed by a hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), a register, and other readable storage media known in the art. The readable storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The bus 1110 may also connect various other circuits such as peripherals, voltage regulators, or power management circuits to provide an interface between the bus 1110 and the transceiver 1130, as is well known in the art. Therefore, the embodiments of the present invention will not be further described.
The transceiver 1130 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. For example: the transceiver 1130 receives external data from other devices, and the transceiver 1130 transmits data processed by the processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, such as: touch screen, physical keyboard, display, mouse, speaker, microphone, trackball, joystick, stylus.
It is to be appreciated that in embodiments of the invention, the memory 1150 may further include memory located remotely with respect to the processor 1120, which may be coupled to a server via a network. One or more portions of the above-described networks may be an ad hoc network (ad hoc network), an intranet (intranet), an extranet (extranet), a Virtual Private Network (VPN), a Local Area Network (LAN), a Wireless Local Area Network (WLAN), a Wide Area Network (WAN), a Wireless Wide Area Network (WWAN), a Metropolitan Area Network (MAN), the Internet (Internet), a Public Switched Telephone Network (PSTN), a plain old telephone service network (POTS), a cellular telephone network, a wireless fidelity (Wi-Fi) network, and combinations of two or more of the above. For example, the cellular telephone network and the wireless network may be a global system for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Worldwide Interoperability for Microwave Access (WiMAX) system, a General Packet Radio Service (GPRS) system, a Wideband Code Division Multiple Access (WCDMA) system, a Long Term Evolution (LTE) system, an LTE Frequency Division Duplex (FDD) system, an LTE Time Division Duplex (TDD) system, a long term evolution-advanced (LTE-a) system, a Universal Mobile Telecommunications (UMTS) system, an enhanced Mobile Broadband (eMBB) system, a mass Machine Type Communication (mtc) system, an Ultra Reliable Low Latency Communication (urrllc) system, or the like.
It is to be understood that the memory 1150 in embodiments of the present invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. Wherein the nonvolatile memory includes: Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or Flash Memory.
The volatile memory includes: random Access Memory (RAM), which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as: static random access memory (Static RAM, SRAM), Dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DRRAM). The memory 1150 of the electronic device described in the embodiments of the invention includes, but is not limited to, the above and any other suitable types of memory.
In an embodiment of the present invention, memory 1150 stores the following elements of operating system 1151 and application programs 1152: an executable module, a data structure, or a subset thereof, or an expanded set thereof.
Specifically, the operating system 1151 includes various system programs such as: a framework layer, a core library layer, a driver layer, etc. for implementing various basic services and processing hardware-based tasks. Applications 1152 include various applications such as: media Player (Media Player), Browser (Browser), for implementing various application services. A program implementing a method of an embodiment of the invention may be included in application program 1152. The application programs 1152 include: applets, objects, components, logic, data structures, and other computer system executable instructions that perform particular tasks or implement particular abstract data types.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements each process of the video progress adjustment method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The computer-readable storage medium includes: permanent and non-permanent, removable and non-removable media may be tangible devices that retain and store instructions for use by an instruction execution apparatus. The computer-readable storage medium includes: electronic memory devices, magnetic memory devices, optical memory devices, electromagnetic memory devices, semiconductor memory devices, and any suitable combination of the foregoing. The computer-readable storage medium includes: phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), non-volatile random access memory (NVRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic tape cartridge storage, magnetic tape disk storage or other magnetic storage devices, memory sticks, mechanically encoded devices (e.g., punched cards or raised structures in a groove having instructions recorded thereon), or any other non-transmission medium useful for storing information that may be accessed by a computing device. As defined in embodiments of the present invention, the computer-readable storage medium does not include transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses traveling through a fiber optic cable), or electrical signals transmitted through a wire.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, electronic device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electrical, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to solve the problem to be solved by the embodiment of the invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be substantially or partially contributed by the prior art, or all or part of the technical solutions may be embodied in a software product stored in a storage medium and including instructions for causing a computer device (including a personal computer, a server, a data center, or other network devices) to execute all or part of the steps of the methods of the embodiments of the present invention. And the storage medium includes various media that can store the program code as listed in the foregoing.
In the description of the embodiments of the present invention, it should be apparent to those skilled in the art that the embodiments of the present invention can be embodied as methods, apparatuses, electronic devices, and computer-readable storage media. Thus, embodiments of the invention may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), a combination of hardware and software. Furthermore, in some embodiments, embodiments of the invention may also be embodied in the form of a computer program product in one or more computer-readable storage media having computer program code embodied in the medium.
The computer-readable storage media described above may take any combination of one or more computer-readable storage media. The computer-readable storage medium includes: an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium include: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only Memory (ROM), an erasable programmable read-only Memory (EPROM), a Flash Memory, an optical fiber, a compact disc read-only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any combination thereof. In embodiments of the invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, device, or apparatus.
The computer program code embodied on the computer readable storage medium may be transmitted using any appropriate medium, including: wireless, wire, fiber optic cable, Radio Frequency (RF), or any suitable combination thereof.
Computer program code for carrying out operations for embodiments of the present invention may be written in assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages, including an object oriented programming language, such as: java, Smalltalk, C + +, and also include conventional procedural programming languages, such as: c or a similar programming language. The computer program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be over any of a variety of networks, including: a Local Area Network (LAN) or a Wide Area Network (WAN), which may be connected to the user's computer, may be connected to an external computer.
The method, the device and the electronic equipment are described through the flow chart and/or the block diagram.
It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions. These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner. Thus, the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The above description is only a specific implementation of the embodiments of the present invention, but the scope of the embodiments of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present invention, and all such changes or substitutions should be covered by the scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A video progress adjustment method is characterized by comprising the following steps:
acquiring a progress adjustment event of a current video, wherein the progress adjustment event is used for positioning a target video frame of the current video;
determining a target interval in which the target video frame is located, wherein the target interval is an interval between two adjacent key frames;
and if the current decoding video frame is positioned in the target interval, executing a first operation for determining the decoding result of the target video frame on the basis of the current decoding result, and displaying the decoding result corresponding to the first operation.
2. The method of claim 1, wherein the progress adjustment event comprises fast forwarding and/or fast rewinding the current video; the first operation includes:
decoding from the current decoded video frame to the target video frame based on a decoding result of the current decoded video frame if the progress adjustment event is a fast forward of the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame;
under the condition that the progress adjustment event is fast backward of the current video, extracting a decoding result corresponding to the target video frame from the current decoding result; wherein the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
3. The method of claim 2, wherein the decoding from the current decoded video frame to the target video frame comprises:
decoding the current decoded video frame to the target video frame, under the condition that a new progress adjustment event is not triggered, until the decoding result of the target video frame is determined, wherein the decoding result corresponding to the first operation comprises the decoding result of the target video frame;
in the process of decoding from the current decoded video frame to the target video frame, when a new progress adjustment event is triggered, ending the process of decoding from the current decoded video frame to the target video frame, and determining a decoding result of a first end video frame, where the first end video frame is a video frame corresponding to the end of the process of decoding from the current decoded video frame to the target video frame, and the decoding result corresponding to the first operation includes the decoding result of the first end video frame.
4. The method of claim 1, further comprising:
and if the current decoded video frame is not positioned in the target interval, executing a second operation of determining the decoding result of the target video frame on the basis of the previous key frame of the target interval, and displaying the decoding result corresponding to the second operation.
5. The method of claim 4, wherein the second operation comprises:
decoding the target video frame from the previous key frame, and under the condition that a new progress adjustment event is not triggered, determining the decoding result of the target video frame, wherein the decoding result corresponding to the second operation comprises the decoding result of the target video frame;
in the process of decoding from the previous key frame to the target video frame, when a new progress adjustment event is triggered, ending the process of decoding from the previous key frame to the target video frame, and determining a decoding result of a second ending video frame, where the second ending video frame is a video frame corresponding to the end of the process of decoding from the previous key frame to the target video frame, and the decoding result corresponding to the second operation includes the decoding result of the second ending video frame.
6. The method according to claim 1, wherein the progress adjustment event is an event triggered by a drag and/or click operation performed on a cursor of the current video progress bar.
7. A video progress adjustment device, comprising: the device comprises an acquisition module, a positioning module and a processing module;
the acquisition module is used for acquiring a progress adjustment event of a current video, wherein the progress adjustment event is used for positioning a target video frame of the current video;
the positioning module is used for determining a target interval where the target video frame is located, wherein the target interval is an interval between two adjacent key frames;
and the processing module is used for executing a first operation of determining the decoding result of the target video frame on the basis of the current decoding result and displaying the decoding result corresponding to the first operation if the current decoding video frame is positioned in the target interval.
8. The apparatus of claim 7, wherein the progress adjustment event comprises fast forwarding and/or fast rewinding the current video; the processing module comprises a first decoding unit and a second decoding unit capable of performing the first operation;
the first decoding unit is configured to decode from the current decoded video frame to the target video frame based on a decoding result of the current decoded video frame when the progress adjustment event is to fast forward the current video; wherein the current decoding result comprises a decoding result of the current decoded video frame;
the second decoding unit is configured to extract a decoding result corresponding to the target video frame from the current decoding result when the progress adjustment event is that the current video is fast backed; wherein the current decoding result comprises a decoding result from a previous key frame of the target interval to the current decoding video frame.
9. An electronic device comprising a bus, a transceiver, a memory, a processor and a computer program stored on the memory and executable on the processor, the transceiver, the memory and the processor being connected via the bus, characterized in that the computer program realizes the steps in the video progress adjustment method according to any one of claims 1 to 6 when executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps in the video progress adjustment method according to any one of claims 1 to 6.
CN202110964776.5A 2021-08-23 2021-08-23 A video progress adjustment method, device and electronic device Active CN113423009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110964776.5A CN113423009B (en) 2021-08-23 2021-08-23 A video progress adjustment method, device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110964776.5A CN113423009B (en) 2021-08-23 2021-08-23 A video progress adjustment method, device and electronic device

Publications (2)

Publication Number Publication Date
CN113423009A true CN113423009A (en) 2021-09-21
CN113423009B CN113423009B (en) 2021-12-24

Family

ID=77719110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110964776.5A Active CN113423009B (en) 2021-08-23 2021-08-23 A video progress adjustment method, device and electronic device

Country Status (1)

Country Link
CN (1) CN113423009B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915850A (en) * 2022-04-22 2022-08-16 网易(杭州)网络有限公司 Video playing control method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686343A (en) * 2012-09-25 2014-03-26 三星电子(中国)研发中心 A method and an apparatus for positioning scenes in a recorded video
CN104918136A (en) * 2015-05-28 2015-09-16 北京奇艺世纪科技有限公司 Video positioning method and device
US20190272088A1 (en) * 2018-03-05 2019-09-05 Qingdao Hisense Media Network Technology Co., Ltd. Playing media
CN110267096A (en) * 2019-06-21 2019-09-20 北京达佳互联信息技术有限公司 Video broadcasting method, device, electronic equipment and storage medium
CN110913272A (en) * 2019-12-03 2020-03-24 腾讯科技(深圳)有限公司 Video playing method and device, computer readable storage medium and computer equipment
CN111436005A (en) * 2019-01-15 2020-07-21 北京字节跳动网络技术有限公司 Method and apparatus for displaying image
US20200267452A1 (en) * 2015-12-23 2020-08-20 Shenzhen Tcl Digital Technology Ltd. Method and device for previewing video playback progress

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103686343A (en) * 2012-09-25 2014-03-26 三星电子(中国)研发中心 A method and an apparatus for positioning scenes in a recorded video
CN104918136A (en) * 2015-05-28 2015-09-16 北京奇艺世纪科技有限公司 Video positioning method and device
US20200267452A1 (en) * 2015-12-23 2020-08-20 Shenzhen Tcl Digital Technology Ltd. Method and device for previewing video playback progress
US20190272088A1 (en) * 2018-03-05 2019-09-05 Qingdao Hisense Media Network Technology Co., Ltd. Playing media
CN111436005A (en) * 2019-01-15 2020-07-21 北京字节跳动网络技术有限公司 Method and apparatus for displaying image
CN110267096A (en) * 2019-06-21 2019-09-20 北京达佳互联信息技术有限公司 Video broadcasting method, device, electronic equipment and storage medium
CN110913272A (en) * 2019-12-03 2020-03-24 腾讯科技(深圳)有限公司 Video playing method and device, computer readable storage medium and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WENHAO WU: "Multi-Agent Reinforcement Learning Based Frame Sampling for Effective Untrimmed Video Recognition", 《2019 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV)》 *
申志伟: "流媒体客户端的分析与研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915850A (en) * 2022-04-22 2022-08-16 网易(杭州)网络有限公司 Video playing control method and device, electronic equipment and storage medium
CN114915850B (en) * 2022-04-22 2023-09-12 网易(杭州)网络有限公司 Video playing control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113423009B (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN108066986B (en) A kind of streaming media determination method and device and storage medium
CN111436005B (en) Method and apparatus for displaying image
CN108737908B (en) Media playing method, device and storage medium
US10705709B2 (en) Playing media
US10771565B2 (en) Sending application input commands over a network
US11670339B2 (en) Video acquisition method and device, terminal and medium
US20240305860A1 (en) Method and apparatus for playing back video at multiple-speed, electronic device and storage medium
WO2020015334A1 (en) Video processing method and apparatus, terminal device, and storage medium
EP3739895A1 (en) Media playback
EP4145837A1 (en) Video processing method and apparatus, device and medium
EP3410290B1 (en) Audio processing method, server, user equipment, and system
CN110324717A (en) Video playing method and device and computer readable storage medium
EP4485951A1 (en) Bullet screen adding method and apparatus, electronic device and storage medium
WO2012092725A1 (en) Method, device and mobile terminal for processing fast forward/fast backward during video playing
RU2666626C1 (en) Playback state controlling method and device
WO2023273562A1 (en) Video playback method and apparatus, electronic device, and medium
CN113423009B (en) A video progress adjustment method, device and electronic device
WO2022134997A1 (en) Video jump playback method and apparatus, terminal device, and storage medium
WO2017080241A1 (en) Time-lapse photographing method and device
CN111147942A (en) Video playing method and device, electronic equipment and storage medium
CN112711368B (en) Operation guidance method and device and electronic equipment
CN112711477A (en) Method and device for switching application programs and electronic equipment
CN113301424A (en) Play control method, device, storage medium and program product
CN107710754A (en) Audio, video data synchronous method and device
EP4270930A1 (en) Video recording method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 1-71, Wang'an Park Innovation Center, Xiji Town, Tongzhou District, Beijing 101100

Patentee after: Xintuoyun (Beijing) Technology Co.,Ltd.

Country or region after: China

Address before: Room 905, 9th Floor, Building 5, No.15 Hongjunying South Road, Chaoyang District, Beijing

Patentee before: Beijing TUOKE Network Technology Co.,Ltd.

Country or region before: China