CN110868642B - Video playing method, device and storage medium - Google Patents

Video playing method, device and storage medium Download PDF

Info

Publication number
CN110868642B
CN110868642B CN201911051151.9A CN201911051151A CN110868642B CN 110868642 B CN110868642 B CN 110868642B CN 201911051151 A CN201911051151 A CN 201911051151A CN 110868642 B CN110868642 B CN 110868642B
Authority
CN
China
Prior art keywords
video
time point
progress
playing
progress bar
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.)
Active
Application number
CN201911051151.9A
Other languages
Chinese (zh)
Other versions
CN110868642A (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen 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 Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201911051151.9A priority Critical patent/CN110868642B/en
Publication of CN110868642A publication Critical patent/CN110868642A/en
Application granted granted Critical
Publication of CN110868642B publication Critical patent/CN110868642B/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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The application discloses a video playing method, a video playing device and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: when a progress bar dragging instruction of a video is received, determining a first time point to which the progress bar is dragged; determining a key frame closest to a first time point from video frames of a video; starting to play the video from a second time point corresponding to the key frame; and loading the display progress of the progress bar from the first time point based on the first time point and the second time point and at a loading speed less than the video playing speed while playing the video from the second time point until the display progress of the progress bar is the same as the video playing progress. According to the method and the device, the response time of the progress bar dragging instruction can be shortened, the simultaneous response of video playing and progress bar loading is guaranteed, the situation that a user can watch the played video after waiting for a long time after dragging the progress bar is avoided, and the user experience is improved.

Description

Video playing method, device and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a video playing method, apparatus, and storage medium.
Background
In the video playing process, the video playing interface usually displays a progress bar, so that a user can quickly adjust the playing progress of the video by dragging the progress bar. For example, the user may fast forward the video by dragging the progress bar forward, or fast backward the video by dragging the progress bar backward.
In the related art, when a progress bar dragging instruction of a video is received, a terminal may determine a first time point to which the progress bar is dragged, and load a display progress of the progress bar from the first time point according to a playing progress of the video while playing the video from the first time point.
In the process of implementing the invention, the inventor finds that the following problems exist in the prior art: after the progress bar dragging instruction is received, the display position of the progress bar is inconsistent with the video content playing position, so that the position of the progress bar is unified with the playing position, and the problem that the impression of a user needs to be solved is not influenced.
Disclosure of Invention
The embodiment of the application provides a video playing method, a video playing device and a storage medium, which can be used for solving the problem that the display position of a progress bar is inconsistent with the playing position of video content in the related art. The technical scheme is as follows:
in one aspect, a video playing method is provided, where the method includes:
when a progress bar dragging instruction of a video is received, determining a first time point to which the progress bar is dragged;
determining a key frame nearest to the first time point from video frames of the video;
starting to play the video from a second time point corresponding to the key frame;
and loading the display progress of the progress bar from the first time point based on the first time point and the second time point and at a loading speed smaller than the playing speed of the video while playing the video from the second time point corresponding to the key frame until the display progress of the progress bar is the same as the playing progress of the video, wherein the preset loading speed is smaller than the playing speed of the video.
Optionally, the playing the video from a second time point corresponding to the key frame includes:
and decoding the video frame of the video from the key frame, and playing the decoded video frame so as to enable the video to be played from the second time point.
Optionally, the loading the display progress of the progress bar from the first time point at a loading speed that is less than the playing speed of the video based on the first time point and the second time point includes:
loading the display progress of the progress bar from the first time point according to the following formula based on the first time point and the second time point:
Z=X+(Y-A)/S
wherein Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, A is the second time point, S is a preset parameter and S is a positive integer.
Optionally, the determining a key frame closest to the first time point from among the video frames of the video includes:
determining a key frame nearest to the first point in time from video frames of the video prior to the first point in time.
Optionally, the method further comprises:
and when the playing progress of the video is the same as the display progress of the progress bar, continuously loading the display progress of the progress bar according to the playing progress of the video.
In one aspect, a video playing apparatus is provided, the apparatus including:
the device comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for determining a first time point to which a progress bar is dragged when a progress bar dragging instruction of a video is received;
a second determining module, configured to determine, from video frames of the video, a key frame closest to the first time point;
the playing module is used for playing the video from a second time point corresponding to the key frame;
the first loading module is configured to, while the video is played from a second time point corresponding to the key frame, load the display progress of the progress bar from the first time point at a loading speed smaller than the playing speed of the video based on the first time point and the second time point until the display progress of the progress bar is the same as the playing progress of the video, and the preset loading speed is smaller than the playing speed of the video.
Optionally, the playing module is configured to:
and decoding the video frame of the video from the key frame, and playing the decoded video frame so as to enable the video to be played from the second time point.
Optionally, the first loading module is configured to:
loading the display progress of the progress bar from the first time point according to the following formula based on the first time point and the second time point:
Z=X+(Y-A)/S
wherein Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, A is the second time point, S is a preset parameter and S is a positive integer.
Optionally, the second determining module is configured to:
determining a key frame nearest to the first point in time from video frames of the video prior to the first point in time.
Optionally, the apparatus further comprises:
and the second loading module is used for continuously loading the display progress of the progress bar according to the playing progress of the video when the playing progress of the video is the same as the display progress of the progress bar.
In one aspect, a terminal is provided, and the terminal includes:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform any of the video playback methods described above.
In one aspect, a non-transitory computer-readable storage medium is provided, wherein instructions of the storage medium, when executed by a processor of a computer, enable the computer to perform any one of the above-described video playback methods.
In one aspect, a computer program product is provided, which is capable of executing any one of the above-mentioned video playing methods when the computer program product runs on a computer.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, when a progress bar dragging instruction of a video is received, a first time point to which the progress bar is dragged can be determined firstly, then a key frame closest to the first time point is determined, and the video is played directly from a second time point corresponding to the key frame, so that the situation that decoding and frame loss need to be carried out from the key frame closest to the first time point is avoided, playing can be started after some video frames are discarded, the problem of overlong waiting time of a user is caused, and after the user drags the progress bar, the dragging operation of the user can be responded in time. Moreover, when the video is played from the second time point, the display progress of the progress bar is slowly loaded from the first time point based on the first time point and the second time point according to the loading speed smaller than the video playing speed until the display progress of the progress bar is the same as the video playing progress, so that the response of the video playing and the progress bar loading can be ensured, and for a user, the user can still perceive that the video is played from the first time point dragged by the user, when the dragging effect is reached, the waiting time of the user is saved, and the video watching experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a relationship between a playing progress of a video and a display progress of a progress bar according to an embodiment of the present application;
fig. 3 is a block diagram of a video playing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application in detail, an application scenario of the embodiments of the present application will be described.
The method and the device for playing the video are applied to scenes that a user drags the progress bar to fast forward or fast backward in the video playing process. In the related art, after a user drags a progress bar, a terminal decodes and loses frames all the time, and the terminal can start playing from a dragged time point after decoding for a period of time, so that the user can see a played video after waiting for a long time after dragging the progress bar, and the user experience is poor. According to the embodiment of the application, in order to respond to the dragging operation of the user in time after the user drags the progress bar, the user is prevented from waiting for a long time, and the following video playing method is provided.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present application, where the method is used in a terminal, and the terminal may be a mobile phone, a tablet computer, a computer, or the like. Illustratively, the method is applied to a video playing application installed on a terminal. Referring to fig. 1, the method includes:
step 101: when a progress bar dragging instruction of a video is received, a first time point to which the progress bar is dragged is determined.
In some examples, the progress bar dragging instruction of the video may be received when the video starts to be played, or the progress bar dragging instruction of the video may be received in the video playing process, or the progress bar dragging instruction of the video may be received when the video pauses to be played, which is not limited in the embodiment of the present application.
The progress bar dragging instruction is used for adjusting the display progress of the progress bar, and then the playing progress of the video is adjusted. The progress bar dragging instruction may include a forward progress bar dragging instruction for fast forwarding the video, or a backward progress bar dragging instruction for fast rewinding the video. The progress bar dragging instruction can be triggered by a user through progress bar dragging operation, the progress bar dragging operation can be clicking operation on a certain position in the progress bar, dragging operation on a progress bar upper degree slider and the like. In some examples, the received progress bar drag instruction may be referred to as a Seek event.
The first time point is a playing time point to which the progress bar is dragged, and is used for indicating the display progress of the dragged progress bar. The first time point may be before the current playing time point or after the current playing time, which is not limited in this embodiment of the application.
Step 102: the key frame closest to the first time point is determined from the video frames of the video.
That is, the key frame closest to the first time point may be determined from a plurality of key frames of the video.
Video is typically composed of a plurality of video frames, each representing an image. The video frames of the video comprise key frames and non-key frames, the key frames are important auxiliary information of the video, the fast browsing and fast positioning of the video content can be carried out through the key frames, and the key frames can be independently decoded. Therefore, when the progress bar dragging instruction is received, the key frame closest to the first time point needs to be determined first, so that the video playing is performed based on the closest key frame.
As an example, the key frame closest to the first point in time may be determined from video frames of the video prior to the first point in time. That is, the keyframe closest to the first point in time is the keyframe that precedes and is closest to the first point in time.
As another example, a key frame closest to a first point in time may be determined from video frames of the video subsequent to the first point in time. That is, the keyframe closest to the first point in time is the keyframe that is after and closest to the first point in time.
Step 103: and starting to play the video from a second time point corresponding to the key frame.
It should be noted that, in the related art, when the progress bar is dragged to the first time point, the video is played from the first time point in one pass, but if the video is played from the first time point, decoding and frame dropping need to be started from the key frame closest to the first time point until the video frame corresponding to the first time point is decoded, and the user waiting time is long.
In order to save the waiting time of the user, the embodiment of the application provides a method for starting playing from the second time point corresponding to the key frame closest to the first time point, that is, after the key frame closest to the first time point is determined, decoding and playing can be directly started from the key frame, so that the problem that the playing is started after some video frames are decoded and discarded in the related technology is avoided, the waiting time of the user is too long, the user can see the played video without waiting after dragging the progress bar, and the user experience is improved.
As an example, after determining a key frame closest to the first time point, a video frame of the video may be decoded from the key frame, and the decoded video frame may be played such that the video is played from the second time point.
Step 104: and loading the display progress of the progress bar from the first time point based on the first time point and the second time point and according to a loading speed smaller than the playing speed of the video while playing the video from the second time point corresponding to the key frame until the display progress of the progress bar is the same as the playing progress of the video.
The display progress of the progress bar may be slowly loaded from the first time point while the video is played from the second time point, and a loading speed of the display progress of the progress bar is less than a playing speed of the video. Because the video is played from the second time point according to the normal playing speed, and the progress bar is slowly loaded from the first time point, the playing progress of the video can gradually catch up with the display progress of the progress bar, and finally the display progress of the video is consistent with the display progress of the progress bar.
It should be noted that, in the embodiment of the present application, after the playing progress of the video is adjusted according to the progress bar dragging instruction, the video is played from the second time point, and the progress bar is loaded from the first time point, that is, the playing progress of the video is inconsistent with the display progress of the progress bar, and the video and the progress bar have a certain time difference, but the time difference is usually very small, and is basically not perceived by the user. Moreover, after the progress bar is slowly loaded for a period of time, the terminal can slowly restore the difference between the playing progress of the video and the display progress of the progress bar until the two progress bars are consistent, so that for the user, the most direct feeling is that after the user drags the progress bar, the terminal can respond to the dragging operation of the user at the first time, and the user does not need to wait to play from the dragged time point.
For example, suppose the video has 4 key frames, and the time points of the key frames are distributed as follows: key frame 1, 0 seconds; key frame 2, a seconds; key frame 3, B seconds; key frame 4 for C seconds. When the user drags the progress bar, assuming that the progress bar is dragged to the position of X seconds, the processing procedure of the terminal includes: 1, find the nearest key frame to X seconds, say A seconds, and A seconds is earlier than X seconds. And 2, decoding and playing from A seconds. 3, the actual playing progress of the video is A seconds at this moment, in order to achieve the dragging effect of the user, the display progress of the progress bar can be increased from X seconds, then the progress bar is slowly increased according to a slow loading mode, and thus, the playing progress of the video gradually catches up with the display progress of the progress bar, and finally the display progress of the video is consistent with the display progress of the progress bar.
As an example, the terminal may load the display progress of the progress bar from the first time point according to the following formula (1) based on the first time point and the second time point:
Z=X+(Y-A)/S (1)
wherein, Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, A is the second time point, S is the preset parameter and S is a positive integer.
As an example, S may be 2, 3, or 4, and the like, which is not limited in this application. When S is 2, as can be seen from the above formula, when the playing progress Y of the video is 2X-a, the display progress of the progress bar may be consistent with the playing progress of the video.
For example, please refer to fig. 2, fig. 2 is a schematic diagram illustrating a relationship between a playing progress of a video and a display progress of a progress bar according to an embodiment of the present disclosure, as shown in fig. 2, after a user drags the progress bar, the playing progress of the video can catch up with the display progress of the progress bar slowly, and after a certain time, the playing progress of the video and the display progress of the progress bar can be consistent.
Furthermore, after the display progress of the progress bar is slowly loaded from the first time point according to the loading speed which is less than the playing speed of the video, when the playing progress of the video is the same as the display progress of the progress bar, the display progress of the progress bar can be continuously loaded according to the playing progress of the video. And when the display progress of the progress bar is continuously loaded according to the playing progress of the video, the loading speed is equal to the playing speed of the video.
For convenience of description, in the embodiment of the present application, a mode in which loading is performed at a loading speed that is less than a playback speed of a video may be referred to as a slow loading mode, and a mode in which loading is performed at a playback progress of a video may be referred to as a normal loading mode. That is, after the progress bar is loaded for a period of time according to the slow loading mode, the playing progress of the video can catch up with the display progress of the progress bar, so that the progress bar and the video are consistent, and when the progress bar and the video are consistent, the slow loading mode of the progress bar can be switched to the normal loading mode, so that the progress bar is loaded according to the normal loading mode.
In the embodiment of the application, when a progress bar dragging instruction of a video is received, a first time point to which the progress bar is dragged can be determined firstly, then a key frame closest to the first time point is determined, and the video is played directly from a second time point corresponding to the key frame, so that the situation that decoding and frame loss need to be carried out from the key frame closest to the first time point is avoided, playing can be started after some video frames are discarded, the problem of overlong waiting time of a user is caused, and after the user drags the progress bar, the dragging operation of the user can be responded in time. Moreover, when the video is played from the second time point, the display progress of the progress bar can be slowly loaded from the first time point based on the first time point and the second time point according to the loading speed less than the video playing speed until the display progress of the progress bar is the same as the video playing progress, so that for a user, the user can still perceive that the video is played from the first time point dragged by the user, and the waiting time of the user is saved while the dragging effect is achieved. In addition, when the video is played from a second time point which is earlier than the dragging time point, the display progress of the progress bar is slowly loaded from the dragging time point, so that the simultaneous response of video playing and progress bar loading can be ensured, the video watching experience of a user is improved, and the defect that the user may feel that the player has a problem if the video starts playing but the progress bar is still motionless under the condition is avoided.
Fig. 3 is a block diagram illustrating a video playing apparatus according to an embodiment of the present disclosure, where the apparatus may be integrated in a terminal. Referring to fig. 3, the apparatus includes a first determining module 301, a second determining module 302, a playing module 303, and a first loading module 304.
A first determining module 301, configured to determine a first time point to which a progress bar is dragged when a progress bar dragging instruction of a video is received;
a second determining module 302, configured to determine a key frame closest to the first time point from video frames of the video;
a playing module 303, configured to start playing the video from a second time point corresponding to the key frame;
a first loading module 304, configured to, while starting to play the video from a second time point corresponding to the key frame, based on the first time point and the second time point, load the display progress of the progress bar from the first time point at a loading speed that is less than the playing speed of the video until the display progress of the progress bar is the same as the playing progress of the video, where the preset loading speed is less than the playing speed of the video.
In the embodiment of the application, when a progress bar dragging instruction of a video is received, a first time point to which the progress bar is dragged can be determined firstly, then a key frame closest to the first time point is determined, and the video is played directly from a second time point corresponding to the key frame, so that the situation that decoding and frame loss need to be carried out from the key frame closest to the first time point is avoided, playing can be started after some video frames are discarded, the problem of overlong waiting time of a user is caused, and after the user drags the progress bar, the dragging operation of the user can be responded in time. And, when starting playing the video from the second time point, can also be based on first time point and second time point, according to the loading speed that is less than video playback speed, begin to load the display progress of progress bar slowly from the first time point, until the display progress of progress bar is the same with the broadcast progress of video, thus, can guarantee video broadcast and the response of progress bar loading simultaneously, and, to the user, the user still can perceive that the video is played from the first time point that the user drags, thereby when having reached and dragging the effect, the waiting time of user has been saved, user's video watching experience has been improved.
Optionally, the playing module 303 is configured to:
and decoding the video frame of the video from the key frame, and playing the decoded video frame so as to enable the video to be played from the second time point.
Optionally, the first loading module 304 is configured to:
loading the display progress of the progress bar from the first time point according to the following formula based on the first time point and the second time point:
Z=X+(Y-A)/S
wherein, Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, a is the second time point, S is a preset parameter and S is a positive integer.
Optionally, the second determining module 302 is configured to:
from video frames of the video prior to the first point in time, a key frame nearest to the first point in time is determined.
Optionally, the apparatus further comprises:
and the second loading module is used for continuously loading the display progress of the progress bar according to the playing progress of the video when the playing progress of the video is the same as the display progress of the progress bar.
It should be noted that: in the video playing device provided in the above embodiment, when playing a video, only the division of the above functional modules is used for illustration, in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the video playing apparatus and the video playing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present application. The terminal 400 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 400 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
Generally, the terminal 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the video playback method provided by the method embodiments herein.
In some embodiments, the terminal 400 may further optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or over the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the terminal 400; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the terminal 400 or in a folded design; in still other embodiments, the display 405 may be a flexible display disposed on a curved surface or a folded surface of the terminal 400. Even further, the display screen 405 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display screen 405 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 407 may also include a headphone jack.
The positioning component 408 is used to locate the current geographic position of the terminal 400 for navigation or LBS (Location Based Service). The Positioning component 408 may be a Positioning component based on the GPS (Global Positioning System) of the united states, the beidou System of china, the graves System of russia, or the galileo System of the european union.
The power supply 409 is used to supply power to the various components in the terminal 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When power source 409 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 400 also includes one or more sensors 410. The one or more sensors 410 include, but are not limited to: acceleration sensor 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414, optical sensor 415, and proximity sensor 416.
The acceleration sensor 411 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 400. For example, the acceleration sensor 411 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 401 may control the touch display screen 405 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 411. The acceleration sensor 411 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 412 may detect a body direction and a rotation angle of the terminal 400, and the gyro sensor 412 may cooperate with the acceleration sensor 411 to acquire a 3D motion of the terminal 400 by the user. From the data collected by the gyro sensor 412, the processor 401 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 413 may be disposed on a side bezel of the terminal 400 and/or a lower layer of the touch display screen 405. When the pressure sensor 413 is disposed on the side frame of the terminal 400, a user's holding signal to the terminal 400 can be detected, and the processor 401 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 413. When the pressure sensor 413 is disposed at the lower layer of the touch display screen 405, the processor 401 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 405. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 414 is used for collecting a fingerprint of the user, and the processor 401 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 414, or the fingerprint sensor 414 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, processor 401 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 414 may be disposed on the front, back, or side of the terminal 400. When a physical key or vendor Logo is provided on the terminal 400, the fingerprint sensor 414 may be integrated with the physical key or vendor Logo.
The optical sensor 415 is used to collect the ambient light intensity. In one embodiment, the processor 401 may control the display brightness of the touch display screen 405 based on the ambient light intensity collected by the optical sensor 415. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 405 is turned down. In another embodiment, the processor 401 may also dynamically adjust the shooting parameters of the camera assembly 406 according to the ambient light intensity collected by the optical sensor 415.
A proximity sensor 416, also known as a distance sensor, is typically disposed on the front panel of the terminal 400. The proximity sensor 416 is used to collect the distance between the user and the front surface of the terminal 400. In one embodiment, when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 gradually decreases, the processor 401 controls the touch display screen 405 to switch from the bright screen state to the dark screen state; when the proximity sensor 416 detects that the distance between the user and the front surface of the terminal 400 gradually becomes larger, the processor 401 controls the touch display screen 405 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not intended to be limiting of terminal 400 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
That is, an embodiment of the present application provides a terminal, where the terminal includes:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to execute the video playing method of the above embodiment.
In another embodiment, a non-transitory computer-readable storage medium is also provided, and when executed by a processor of a computer, the instructions in the storage medium enable the computer to perform the video playing method according to the above embodiment.
In another embodiment, a computer program product is provided, which is capable of executing the video playing method of the above embodiment when the computer program product runs on a computer.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A video playback method, the method comprising:
when a progress bar dragging instruction of a video is received, determining a first time point to which the progress bar is dragged;
determining a key frame nearest to the first time point from video frames of the video;
starting to play the video from a second time point corresponding to the key frame;
loading the display progress of the progress bar from the first time point based on the first time point and the second time point and at a loading speed smaller than the playing speed of the video while playing the video from a second time point corresponding to the key frame until the display progress of the progress bar is the same as the playing progress of the video;
and when the playing progress of the video is the same as the display progress of the progress bar, continuously loading the display progress of the progress bar according to the playing progress of the video, wherein the loading speed is equal to the playing speed of the video.
2. The method of claim 1, wherein the playing the video starting from the second time point corresponding to the key frame comprises:
and decoding the video frame of the video from the key frame, and playing the decoded video frame so as to enable the video to be played from the second time point.
3. The method of claim 1, wherein the loading the display progress of the progress bar from the first time point at a loading speed less than a play speed of the video based on the first time point and the second time point comprises:
loading the display progress of the progress bar from the first time point according to the following formula based on the first time point and the second time point:
Z=X+(Y-A)/S
wherein Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, A is the second time point, S is a preset parameter and S is a positive integer.
4. The method of claim 1, wherein said determining a key frame from among video frames of said video that is closest to said first point in time comprises:
determining a key frame nearest to the first point in time from video frames of the video prior to the first point in time.
5. A video playback apparatus, comprising:
the device comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for determining a first time point to which a progress bar is dragged when a progress bar dragging instruction of a video is received;
a second determining module, configured to determine, from video frames of the video, a key frame closest to the first time point;
the playing module is used for playing the video from a second time point corresponding to the key frame;
a first loading module, configured to, while starting to play the video from a second time point corresponding to the key frame, based on the first time point and the second time point, load the display progress of the progress bar from the first time point at a loading speed that is less than a playing speed of the video until the display progress of the progress bar is the same as the playing progress of the video;
and the second loading module is used for continuously loading the display progress of the progress bar according to the display progress of the video when the playing progress of the video is the same as the display progress of the progress bar, and the loading speed is equal to the playing speed of the video.
6. The apparatus of claim 5, wherein the play module is to:
and decoding the video frame of the video from the key frame, and playing the decoded video frame so as to enable the video to be played from the second time point.
7. The apparatus of claim 5, wherein the first load module is to:
loading the display progress of the progress bar from the first time point according to the following formula based on the first time point and the second time point:
Z=X+(Y-A)/S
wherein Z is the display progress of the progress bar, X is the first time point, Y is the playing progress of the video, A is the second time point, S is a preset parameter and S is a positive integer.
8. The apparatus of claim 5, wherein the second determination module is to:
determining a key frame nearest to the first point in time from video frames of the video prior to the first point in time.
9. A terminal, characterized in that the terminal comprises:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the video playback method of any of claims 1-4.
10. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a computer, enable the computer to perform the video playback method of any one of claims 1-4.
CN201911051151.9A 2019-10-31 2019-10-31 Video playing method, device and storage medium Active CN110868642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911051151.9A CN110868642B (en) 2019-10-31 2019-10-31 Video playing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911051151.9A CN110868642B (en) 2019-10-31 2019-10-31 Video playing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110868642A CN110868642A (en) 2020-03-06
CN110868642B true CN110868642B (en) 2022-03-08

Family

ID=69653040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911051151.9A Active CN110868642B (en) 2019-10-31 2019-10-31 Video playing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110868642B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113192376B (en) * 2021-04-28 2022-12-06 深圳市思麦云科技有限公司 System based on virtual reality glasses VR technique is applied to electric power industry
CN113891170A (en) * 2021-11-23 2022-01-04 维沃移动通信有限公司 Downloading method, downloading device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898588A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Video positioning method and device
CN110022489A (en) * 2019-05-30 2019-07-16 腾讯音乐娱乐科技(深圳)有限公司 Video broadcasting method, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015081805A1 (en) * 2013-12-02 2015-06-11 乐视致新电子科技(天津)有限公司 Television, and method and device for processing a play record thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898588A (en) * 2015-12-07 2016-08-24 乐视云计算有限公司 Video positioning method and device
CN110022489A (en) * 2019-05-30 2019-07-16 腾讯音乐娱乐科技(深圳)有限公司 Video broadcasting method, device and storage medium

Also Published As

Publication number Publication date
CN110868642A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
CN108391171B (en) Video playing control method and device, and terminal
CN110602321B (en) Application program switching method and device, electronic device and storage medium
CN111372126B (en) Video playing method, device and storage medium
CN109874312B (en) Method and device for playing audio data
CN109348247B (en) Method and device for determining audio and video playing time stamp and storage medium
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN108965922B (en) Video cover generation method and device and storage medium
CN108881286B (en) Multimedia playing control method, terminal, sound box equipment and system
CN110324689B (en) Audio and video synchronous playing method, device, terminal and storage medium
CN109144346B (en) Song sharing method and device and storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN110868636B (en) Video material intercepting method and device, storage medium and terminal
CN109982129B (en) Short video playing control method and device and storage medium
CN108845777B (en) Method and device for playing frame animation
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN108172176B (en) Page refreshing method and device for ink screen
CN109783176B (en) Page switching method and device
CN110868642B (en) Video playing method, device and storage medium
CN110769120A (en) Method, device, equipment and storage medium for message reminding
CN107888975B (en) Video playing method, device and storage medium
CN109005359B (en) Video recording method, apparatus and storage medium
CN108966026B (en) Method and device for making video file
CN109032492B (en) Song cutting method and device
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN111711841B (en) Image frame playing method, device, terminal 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