CN114697722A - Video playing method and device, electronic equipment and storage medium - Google Patents

Video playing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114697722A
CN114697722A CN202210338308.1A CN202210338308A CN114697722A CN 114697722 A CN114697722 A CN 114697722A CN 202210338308 A CN202210338308 A CN 202210338308A CN 114697722 A CN114697722 A CN 114697722A
Authority
CN
China
Prior art keywords
video
played
data
clip
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210338308.1A
Other languages
Chinese (zh)
Inventor
田细亚
李云龙
陈亮
陈小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media 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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202210338308.1A priority Critical patent/CN114697722A/en
Publication of CN114697722A publication Critical patent/CN114697722A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43072Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of multiple content streams on the same device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Abstract

The application discloses a video playing method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring complete audio and video data, short broadcast audio data, dotting data and audio and video synchronous data of a target video; the dotting data includes data indicating the respective video segments divided in the complete video data; the audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip and the video clip in the short broadcast audio data; playing complete audio and video data by default, and pausing playing when a short-play mode switching instruction is received; wherein playback is resumed when the short play mode is exited. Determining a short-broadcast audio clip to be played currently and a video clip to be played currently based on dotting data and audio and video synchronization data; synchronously playing the current short broadcast audio clip to be played and the current video clip to be played; and when the current video clip to be played is played, determining the current short playing audio clip to be played and the current video clip to be played until the video clip to be played does not exist.

Description

Video playing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of video playing technologies, and in particular, to a video playing method and apparatus, an electronic device, and a storage medium.
Background
As users tend to be fragmented over time, the most exciting content is viewed for a limited period of time without losing the continuity of the scenario, which is a strong demand for current users. Therefore, how to reasonably shorten the long video to meet the strong demand of the user also becomes a strategic problem to be considered by the long video product.
The existing video shortening is mainly divided into three types. The first is to play the video faster, i.e. at a certain playing speed. The second is to skip directly over other unimportant content, playing only highlights or character segments. The third is to clip the long video into independent short video for direct playing.
However, with the first approach, although the continuity of the matrix is ensured, it takes a long time to play the entire video even at the maximum double speed. For the second, although the duration of a long video can be effectively shortened, the continuity of a scenario is lost. For the video to be edited into the independent short video, although the duration of the video is effectively shortened, the continuity of the scenario can be ensured to a certain extent. However, when the user is interested in the video and needs to watch the original video scenario, the user needs to quit the playing interface to search for the original complete video for playing.
Disclosure of Invention
Based on the defects of the prior art, the application provides a video playing method and device, electronic equipment and a storage medium, so as to solve the problems that in the prior art, videos cannot be effectively played in a short time on the premise that the continuity of a plot is guaranteed, and the original videos can be conveniently found.
In order to achieve the above object, the present application provides the following technical solutions:
a first aspect of the present application provides a video playing method, including:
when a target video is requested to be played, acquiring complete audio and video data of the target video and short-cast data of the target video; the complete audio and video data comprises synchronous complete video data and complete audio data; the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronization data; the dotting data comprises data indicating respective video segments divided in the complete video data; the audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data;
playing the complete audio and video data of the target video;
when a short play mode switching instruction is received, pausing to play the complete audio and video data of the target video; when the short play mode exits, the complete audio and video data of the target video are restored to be played;
determining a current to-be-played short broadcast audio clip and a corresponding current to-be-played video clip from each short broadcast audio clip and each video clip to be played in sequence based on the dotting data and the audio and video synchronization data;
synchronously playing the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip;
and when the current video clip to be played is played, returning to execute the dotting data and the audio and video synchronous data, and determining the current video clip to be played and the corresponding current video clip to be played from each short-play audio clip to be played and each video clip in sequence until the video clip to be played does not exist.
Optionally, in the above video playing method, the determining, based on the dotting data and the audio/video synchronization data, a currently to-be-played short broadcast audio clip and a currently to-be-played video clip corresponding to the currently to-be-played short broadcast audio clip from each to-be-played short broadcast audio clip and each video clip in sequence includes:
determining the currently played short broadcast audio clip as a currently to-be-played short broadcast audio clip; wherein, each of the short broadcast audio clips in the short broadcast audio data is played in sequence;
based on the audio and video synchronization data, determining a timestamp range corresponding to a timestamp of the current to-be-played short broadcast audio clip from the dotting data;
and determining the video clip in the complete video data corresponding to the timestamp range to be the current video clip to be played corresponding to the current video clip to be played.
Optionally, in the above video playing method, before determining that the currently played short broadcast audio clip is the currently to-be-played short broadcast audio clip, the method further includes:
judging whether the short-cast audio is played for the first time after a short-cast mode switching instruction is received at present;
if the short broadcast audio is not played for the first time after the short broadcast mode switching instruction is judged to be received currently, the short broadcast audio clip played currently is determined as the short broadcast audio clip to be played currently;
if the short-play audio is judged to be played for the first time after a short-play mode switching instruction is received at present, finding out a timestamp range closest to a timestamp corresponding to the current playing progress of the complete video data in the dotting data;
determining the video clip in the complete video data corresponding to the timestamp range to be the current video clip to be played;
and determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played based on the audio and video synchronization data.
Optionally, in the above video playing method, the synchronously playing the currently to-be-played short broadcast audio clip and the currently to-be-played video clip corresponding to the currently to-be-played short broadcast audio clip includes:
calculating the time stamp offset of the current to-be-played short broadcast audio clip and the current to-be-played video clip;
and playing the short broadcast audio clip to be played currently and the video clip to be played currently based on the timestamp offset.
A second aspect of the present application provides a video playback apparatus, including:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring complete audio and video data of a target video and short broadcast data of the target video when the target video is requested to be played; the complete audio and video data comprises synchronous complete video data and complete audio data; the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronization data; the dotting data comprises data indicating respective video segments divided in the complete video data; the audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data;
the conventional playing unit is used for playing the complete audio and video data of the target video;
the pause unit is used for pausing the playing of the complete audio and video data of the target video when a short play mode switching instruction is received; when the short play mode exits, the complete audio and video data of the target video are restored to be played;
a segment determining unit, configured to determine, based on the dotting data and the audio/video synchronization data, a current to-be-played short broadcast audio segment and a current to-be-played video segment corresponding to the current to-be-played short broadcast audio segment in sequence from each to-be-played short broadcast audio segment and each video segment;
the short broadcast playing unit is used for synchronously playing the current short broadcast audio clip to be played and the corresponding current video clip to be played; when the short-play playing unit finishes playing the current video clip to be played, the short-play playing unit returns to the clip determining unit until the video clip to be played does not exist.
Optionally, in the above video playing apparatus, the clip determining unit includes:
the first audio determining unit is used for determining the currently played short broadcast audio clip as a currently to-be-played short broadcast audio clip; wherein, each of the short broadcast audio clips in the short broadcast audio data is played in sequence;
the first searching unit is used for determining a timestamp range corresponding to a timestamp of the current to-be-played short broadcast audio clip from the dotting data based on the audio and video synchronization data;
and the first video determining unit is used for determining the video clip in the complete video data corresponding to the found timestamp range as the current video clip to be played corresponding to the current short-cast audio clip to be played.
Optionally, in the above video playback device, the method further includes:
the judging unit is used for judging whether the short-cast audio is played for the first time after the short-cast mode switching instruction is received at present; if the fact that the short broadcast audio is played for the first time after the short broadcast mode switching instruction is judged not to be received currently is judged, the first audio determining unit executes the short broadcast audio clip played currently and determines the short broadcast audio clip to be played currently;
the second searching unit is used for searching a timestamp range closest to a timestamp corresponding to the current playing progress of the complete video data in the dotting data when the short-cast audio is firstly played after a short-cast mode switching instruction is judged to be received at present;
the second video determining unit is used for determining the video clip in the complete video data corresponding to the found timestamp range as the current video clip to be played;
and the second audio determining unit is used for determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played based on the audio and video synchronization data.
Optionally, in the above video playback device, the short-cast playing unit includes:
the calculating unit is used for calculating the time stamp offset of the current to-be-played short broadcast audio clip and the current to-be-played video clip;
and the synchronous playing unit is used for playing the current to-be-played short-broadcast audio clip and the current to-be-played video clip based on the timestamp offset.
A third aspect of the present application provides an electronic device comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the video playing method according to any one of the above items.
A fourth aspect of the present application provides a computer storage medium storing a computer program for implementing a video playback method as claimed in any one of the preceding claims when executed.
According to the video playing method, when the target video is requested to be played, the complete audio and video data of the target video and the short-time playing data of the target video are obtained. The complete audio and video data comprises synchronous complete video data and complete audio data, and the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronous data. The dotting data includes data indicating respective video segments divided in the entire video data, thereby enabling a logical division of a long video into a plurality of short videos. The audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data, so that the corresponding audio clip and the video clip can be played synchronously. And then, playing the complete audio and video data of the target video. And when a short play mode switching instruction is received, pausing to play the complete audio and video data of the target video. And based on the dotting data and the audio and video synchronous data, sequentially determining the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip from each short broadcast audio clip and each video clip to be played, and synchronously playing the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip. When the video clip to be played currently is played, the execution is returned to determine a new short playing audio clip to be played currently and the corresponding video clip to be played currently until the video clip to be played does not exist, so that the long-time shortening is effectively realized under the condition of ensuring the continuity of the plot. And when the short play mode exits, the complete audio and video data of the played target video is recovered, so that the user does not need to exit to search the original complete video for playing when needing the original video scenario.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a video playing method according to an embodiment of the present application;
fig. 2 is a flowchart of a method for determining a currently-played short-broadcast audio clip and a currently-played video clip corresponding to the currently-played short-broadcast audio clip according to an embodiment of the present application;
fig. 3 is a flowchart of another method for determining a currently to-be-played short-broadcast audio clip and a corresponding currently to-be-played video clip according to another embodiment of the present application;
fig. 4 is a flowchart of a method for synchronous playing according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating an offset between a video segment and broadcast audio data according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a video playing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this application, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
An embodiment of the present application provides a video playing method, as shown in fig. 1, including the following steps:
s101, when the target video is requested to be played, acquiring complete audio and video data of the target video and short-cast data of the target video.
The complete audio and video data comprises synchronous complete video data and complete audio data.
The short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronization data. Since the short broadcast data needs to be preset accurately, in the embodiment of the present application, the target video refers to any video in which the corresponding short broadcast data exists.
Alternatively, the on-air audio data may be post-recorded audio, such as a post-recorded explanation of a main scenario of the target video, or the like, or may of course consist of audio that is clipped from the complete audio data. And, the broadcast audio data can be a complete audio data, which is convenient for use and management. However, at this time, in order to make the played audio correspond to the played video clip, it is necessary to logically divide the broadcast audio data into a plurality of broadcast audio clips. For example, a short broadcast audio data of 10 minutes may be divided into short broadcast audio segments every one minute, specifically according to the corresponding relationship with the video segments. Of course, the broadcast audio data may include a plurality of independent broadcast audio data, each of which corresponds to one of the video segments, for example, each of the video segments corresponds to the corresponding explanation audio, so that the broadcast audio data does not need to be logically divided.
The dotting data includes data indicating respective video segments divided in the complete video data. That is, in the embodiment of the present application, by dotting on the complete video, each video segment in the complete video is marked, and the complete video data is not clipped into a plurality of independent video segments. In general, the dotting data is recorded as the corresponding timestamp range of each video clip in the complete video data.
It should be noted that, in order to effectively shorten the long video, the video segments in the complete video data indicated by the dotting data generally include only highlights, character segments and segments playing an important role in the continuity of the scenario, so that the sum of all the divided video segments is not equal to the complete video data, but is only a part of the complete video data.
The audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data.
Specifically, when a user needs to play a target video, a client requests a server for a playing address of the target video. At this time, the server side issues complete audio and video data of the target video and short broadcast data of the target video. Optionally, the complete audio and video data of the target video and the corresponding address of the short broadcast data of the target video are issued, and when the complete audio and video data are used, loading is performed according to the address.
And S102, playing the complete audio and video data of the target video.
In the embodiment of the application, the complete video data of the target video is played by default, so after the complete audio and video data of the target video and the short-cast data of the target video are obtained, the complete video data and the complete audio data are rendered by default and are played synchronously.
Optionally, if the user has not played the complete video-audio-video data of the target video previously, or has played the complete video-audio-video data of the target video completely, then the complete video-audio-video data of the target video is played from the beginning. If the user has previously played the complete video of the target video and has not played the complete video of the target video, the last playing progress of the user can be read, and then the last playing progress of the user continues to play.
And S103, when a short play mode switching instruction is received, pausing to play the complete audio and video data of the target video.
Specifically, when the user operates and switches the short broadcast mode on the client, a short broadcast mode switching instruction is triggered, and at this time, the short broadcast mode needs to be entered. So that the playing of the complete audio-video data of the target video needs to be paused at this time. It should be noted that, since the video segment in the complete video data is still played in the short play mode, the complete audio data is rather paused.
It should be noted that after switching to the short broadcast mode, the user can exit the short broadcast mode at any time, that is, switch back to the conventional mode, and at this time, resume playing the complete audio and video data of the target video.
Optionally, when the complete audio and video data of the target video is resumed, the playing can be continued according to the progress of the complete audio and video data during the pause. Of course, the progress of the played video clip can be continued to be played when switching back to the normal mode.
And S104, determining the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip from each short broadcast audio clip and each video clip to be played in sequence based on the dotting data and the audio and video synchronization data.
It should be noted that, in the embodiment of the present application, the short broadcast audio clip refers to a short broadcast audio clip in the short broadcast audio data of the target video. The video clips refer to the video clips divided by the dotting data indication in the complete video data of the target video.
The short playing audio clip to be played may be a short playing audio clip that has not been played after the target video is requested this time. Of course, considering that the user may have previously played the target video and may have played a portion of the short play audio clip through the short play mode at that time, the short play audio clip to be played may also refer to the short play audio clip that has not been played since the target video was started to be played. Similarly, the video segment to be played may be a short-play audio that has not been played after the target video is requested, specifically, the video segment may be played in both the normal mode and the short-play mode, or may be simply played in the short-play mode, so that the user is prevented from watching repeatedly, and the configuration is specifically performed according to the requirement.
Alternatively, the broadcast audio stream may be loaded first. Since the dotting data and the audio and video synchronous data can be classified into the short broadcast synchronous script data, the short broadcast synchronous script data can be loaded, and then the short broadcast synchronous script data is analyzed to obtain the dotting data and the audio and video synchronous data.
Since each video clip is not continuous in the complete video, it needs to be played in sequence, and in order to ensure the continuity of the scenario, it needs to play each video clip to be played and each short broadcast audio clip to be played in sequence.
It should be noted that, if the short broadcast audio data is a complete audio, each short broadcast audio clip can be played in sequence only by being played all the time. If the short broadcast audio data is composed of a plurality of independent short broadcast audio clips, the playing sequence may be preset for each short broadcast audio clip. For video clips, the order of the video clips can be determined according to the positions of the video clips in the complete video data or corresponding timestamps.
Optionally, in another embodiment of the present application, a specific implementation manner of step S104, as shown in fig. 2, includes:
s201, determining the currently played short broadcast audio clip as the currently to-be-played short broadcast audio clip.
Wherein, each short broadcast audio clip in the short broadcast audio data is played in sequence.
Since the podcast audio segments are played continuously in sequence, and the video segments are not continuous in the complete video data, when one podcast audio segment is played, the next one is played naturally, and it is required to determine the corresponding video segment based on the next to-be-played podcast audio segment. Therefore, in the embodiment of the present application, the current to-be-played short broadcast audio clip is determined first, and then the current to-be-played video clip corresponding to the current to-be-played short broadcast audio clip is determined.
It should be noted that, in the embodiment of the present application, when switching to the short broadcast mode for the first time after requesting to play the target video, the short broadcast audio data is continuously played from the starting position until the short broadcast is finished or the normal mode is switched back. For example, if the short broadcast audio data is a complete audio data, the short broadcast audio data is played from the 0 th minute, and then the short broadcast audio data is played to each short broadcast audio clip in sequence, and if the short broadcast audio clips are multiple independent short broadcast audio clips, the short broadcast audio clips are also played in sequence uninterruptedly, so that each time one short broadcast audio clip is played, one short broadcast audio clip is immediately followed, and at this time, the played short broadcast audio clip is determined as the short broadcast audio clip to be currently played, so as to match the corresponding video clip for playing.
Optionally, when the user switches back to the normal mode, the currently played short broadcast audio clip may be recorded, and the short broadcast audio clip is set to be played, so that when the user switches to the short broadcast mode again, the short broadcast audio clip is played next. And the progress of playing the short broadcast audio clip can be recorded, so that the short broadcast audio clip can be continuously played based on the playing progress, and at the moment, the progress of the corresponding video clip is required to be synchronously adjusted according to the progress, so that the user is prevented from watching repeated contents.
Of course, since the duration of the short broadcast audio data is relatively short, and the user can also manually adjust the progress, the short broadcast audio clip may be played from the beginning when switching to the short broadcast mode again, or the short broadcast audio data may be played from the beginning, that is, when switching back to the normal mode, the states of all the short broadcast audio clips are set to be played, so that the complexity of the processing logic may be reduced to some extent.
S202, based on the audio and video synchronization data, determining a timestamp range corresponding to a timestamp of the current to-be-played short broadcast audio clip from the dotting data.
S203, determining the video clip in the complete video data corresponding to the searched timestamp range as the current video clip to be played corresponding to the current video clip to be played.
Optionally, in another embodiment of the present application, a specific implementation manner of step S104, as shown in fig. 3, includes:
s301, judging whether the short-cast audio is played for the first time after the short-cast mode switching instruction is received at present.
It should be noted that, in order to avoid playing back the content viewed in the normal mode to the user, in the embodiment of the present application, when playing back in the short play mode, the viewing progress in the normal mode needs to be considered. Therefore, it is required to first determine whether to just switch from the normal mode to the short broadcast mode, that is, determine whether to play the short broadcast audio for the first time after receiving the short broadcast mode switching instruction, and if it is determined that to play the short broadcast audio for the first time after receiving the short broadcast mode switching instruction, it is required to first determine the video segment to be played based on the playing progress, so that step S302 is executed at this time. If it is determined that the short cast audio is not played for the first time after the short cast mode switching instruction is received at present, that is, after the previous video clip and audio clip are played, the next video clip and audio clip are determined, at this time, the determination of the playing sequence of the audio clip may be directly installed, so that step S305 is executed at this time.
S302, finding out the timestamp range closest to the timestamp corresponding to the current playing progress of the complete video data in the dotting data.
Alternatively, when a timestamp is within a range of timestamps, then the timestamp is closest to the range of timestamps, and the time interval between the two may be considered to be zero. And when the time stamp is not in the time stamp range, the time stamp range closest to the time stamp corresponding to the current playing progress may be determined based on the time interval between the time stamp and the lower limit value of the time stamp range.
And S303, determining the video clip in the complete video data corresponding to the searched timestamp range as the current video clip to be played.
S304, based on the audio and video synchronous data, determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played.
S305, determining the currently played short broadcast audio clip as the currently to-be-played short broadcast audio clip.
It should be noted that, for the specific implementation of step S305 to step S307, the implementation of step S201 to step S203 may be referred to accordingly, and details are not described here.
And S306, based on the audio and video synchronous data, determining a time stamp range corresponding to the time stamp of the current to-be-played short broadcast audio clip from the dotting data.
S307, determining the video clip in the complete video data corresponding to the searched timestamp range as the current video clip to be played corresponding to the current short broadcast audio clip to be played.
S105, synchronously playing the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip.
Since the short broadcast audio clip is independent of the video data of the target video, in order to ensure that the content of the audio is consistent with the playing picture, the current short broadcast audio clip to be played and the corresponding current video clip to be played need to be played synchronously.
Specifically, as shown in fig. 4, a specific implementation method of step S105 includes:
s401, calculating the time stamp offset of the current to-be-played short broadcast audio clip and the current to-be-played video clip.
The currently to-be-played short broadcast audio clip is independent of the complete video data of the target video, and the currently to-be-played video clip is a part of the complete video data and is not independent, so that the time stamps played by the currently to-be-played short broadcast audio clip and the currently to-be-played video clip are usually inconsistent, and if the currently to-be-played short broadcast audio clip is played directly according to the time stamps, the situation that the sound is inconsistent with the picture can occur. It is necessary to calculate the offset of the time stamps based on the time stamps of both. For example, as shown in fig. 5, the time stamp of the video clip a starts from 5.00, and the audio clip starts from 0.00, so that the offset present in the time stamp of the video clip a and the audio clip a is 5.00. And calculating the offset of the prime and the even to obtain the offset of the prime.
S402, playing the short broadcast audio clip to be played currently and the video clip to be played currently based on the timestamp offset.
S106, when the current video clip to be played is played, judging whether the video clip to be played exists.
It should be noted that, in the short play mode, when the current video segment to be played is played, it is determined whether a video segment to be played exists, so as to determine whether to acquire a next video segment to be played for playing. Therefore, if it is determined that there is a video clip to be played, the process returns to step S104. If it is determined that there is no video clip to be played, step S107 is performed. Of course, this is an optional manner, and it may also be determined whether the short broadcast audio data has been played completely, because the short broadcast audio segments are in one-to-one correspondence with the video segments, when determining whether the short broadcast audio data has been played completely, it may be determined whether there is a video segment to be played.
And S107, determining that all video clips are played.
According to the video playing method provided by the embodiment of the application, when the target video is requested to be played, the complete audio and video data of the target video and the short playing data of the target video are obtained. The complete audio and video data comprises synchronous complete video data and complete audio data, and the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronous data. The dotting data includes data indicating respective video segments divided in the entire video data, thereby enabling a logical division of a long video into a plurality of short videos. The audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data, so that the corresponding audio clip and the video clip can be played synchronously. And then, playing the complete audio and video data of the target video. And when a short play mode switching instruction is received, pausing to play the complete audio and video data of the target video. And based on the dotting data and the audio and video synchronous data, sequentially determining the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip from each short broadcast audio clip and each video clip to be played, and synchronously playing the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip. When the video clip to be played currently is played, the execution is returned to determine a new short-play audio clip to be played currently and the corresponding video clip to be played currently until the video clip to be played does not exist, so that the long-time shortening is effectively realized under the condition of ensuring the continuity of the plot. And when the short play mode exits, the complete audio and video data of the played target video is recovered, so that the user does not need to exit to search the original complete video for playing when needing the original video scenario.
Another embodiment of the present application provides a video playing apparatus, as shown in fig. 6, including:
the obtaining unit 601 is configured to obtain complete audio and video data of a target video and short broadcast data of the target video when the target video is requested to be played.
The complete audio and video data comprises synchronous complete video data and complete audio data. The short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronization data. The dotting data includes data indicating respective video segments divided in the complete video data. The audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data.
And the normal playing unit 602 is configured to play the complete audio/video data of the target video.
The pause unit 603 is configured to pause playing of the complete audio and video data of the target video when the short play mode switching instruction is received.
And when the short play mode exits, restoring the complete audio and video data of the played target video.
The segment determining unit 604 is configured to determine, based on the dotting data and the audio/video synchronization data, a currently to-be-played short broadcast audio segment and a currently to-be-played video segment corresponding to the currently to-be-played short broadcast audio segment from each short broadcast audio segment and each video segment to be played in sequence.
The short broadcast playing unit 605 is configured to synchronously play the current short broadcast audio clip to be played and the corresponding current video clip to be played.
When the short playing unit finishes playing the current video clip to be played, the short playing unit returns to the clip determining unit until no video clip to be played exists.
Optionally, in a video playing apparatus provided in another embodiment of the present application, a clip determining unit includes:
and the first audio determining unit is used for determining the currently played short broadcast audio clip as the currently to-be-played short broadcast audio clip.
Wherein, each short broadcast audio clip in the short broadcast audio data is played in sequence.
And the first searching unit is used for determining a timestamp range corresponding to the timestamp of the current to-be-played short broadcast audio clip from the dotting data based on the audio and video synchronous data.
And the first video determining unit is used for determining the video clip in the complete video data corresponding to the searched timestamp range as the current video clip to be played corresponding to the current short broadcast audio clip to be played.
Optionally, in a video playing device provided in another embodiment of the present application, the video playing device further includes:
and the judging unit is used for judging whether the short-cast audio is played for the first time after the short-cast mode switching instruction is received at present.
If the fact that the short broadcast audio is played for the first time after the short broadcast mode switching instruction is judged not to be received currently is judged, the first audio determining unit determines the short broadcast audio clip played currently as the short broadcast audio clip to be played currently.
And the second searching unit is used for searching the timestamp range closest to the timestamp corresponding to the current playing progress of the complete video data in the dotting data when the short-play audio is judged to be played for the first time after the short-play mode switching instruction is received at present.
And the second video determining unit is used for determining the video clip in the complete video data corresponding to the searched timestamp range as the current video clip to be played.
And the second audio determining unit is used for determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played based on the audio and video synchronization data.
Optionally, in a video playing device provided in another embodiment of the present application, the short-play playing unit includes:
and the calculating unit is used for calculating the time stamp offset of the current to-be-played short broadcast audio clip and the current to-be-played video clip.
And the synchronous playing unit is used for playing the short-broadcast audio clip to be played currently and the video clip to be played currently based on the timestamp offset.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be referred to accordingly, and are not described herein again.
Another embodiment of the present application provides an electronic device, as shown in fig. 7, including:
a memory 701 and a processor 702.
The memory 701 is used for storing programs.
The processor 702 is configured to execute the program stored in the memory 701, and when the program is executed, the program is specifically configured to implement the video playing method provided in any of the above-mentioned embodiments.
Another embodiment of the present application provides a computer storage medium for storing a computer program, and when the computer program is executed, the computer program is used to implement the video playing method provided in any one of the above embodiments.
Computer storage media, including permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, 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), 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 cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A video playback method, comprising:
when a target video is requested to be played, acquiring complete audio and video data of the target video and short-cast data of the target video; the complete audio and video data comprises synchronous complete video data and complete audio data; the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronous data; the dotting data comprises data indicating respective video segments divided in the complete video data; the audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data;
playing the complete audio and video data of the target video;
when a short play mode switching instruction is received, pausing to play the complete audio and video data of the target video; when the short play mode exits, the complete audio and video data of the target video are restored to be played;
determining a current to-be-played short broadcast audio clip and a corresponding current to-be-played video clip from each short broadcast audio clip and each video clip to be played in sequence based on the dotting data and the audio and video synchronization data;
synchronously playing the current to-be-played short broadcast audio clip and the corresponding current to-be-played video clip;
and when the current video clip to be played is played, returning to execute the dotting data and the audio and video synchronous data, and determining the current video clip to be played and the corresponding current video clip to be played from each short-play audio clip to be played and each video clip in sequence until the video clip to be played does not exist.
2. The method according to claim 1, wherein the determining a currently to-be-played short broadcast audio clip and a corresponding currently to-be-played video clip thereof from each of the to-be-played short broadcast audio clips and each of the video clips in sequence based on the dotting data and the audio/video synchronization data comprises:
determining the currently played short broadcast audio clip as a currently to-be-played short broadcast audio clip; wherein, each of the short broadcast audio clips in the short broadcast audio data is played in sequence;
based on the audio and video synchronization data, determining a timestamp range corresponding to a timestamp of the current to-be-played short broadcast audio clip from the dotting data;
and determining the video clip in the complete video data corresponding to the timestamp range to be the current video clip to be played corresponding to the current video clip to be played.
3. The method of claim 2, wherein the determining the currently played on-air audio clip as being before the currently to-be-played on-air audio clip further comprises:
judging whether the short-cast audio is played for the first time after a short-cast mode switching instruction is received at present;
if the short broadcast audio is not played for the first time after the short broadcast mode switching instruction is judged to be received currently, the short broadcast audio clip played currently is determined as the short broadcast audio clip to be played currently;
if the short-play audio is judged to be played for the first time after a short-play mode switching instruction is received at present, finding out a timestamp range closest to a timestamp corresponding to the current playing progress of the complete video data in the dotting data;
determining the video clip in the complete video data corresponding to the timestamp range to be the current video clip to be played;
and determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played based on the audio and video synchronization data.
4. The method according to claim 1, wherein said synchronously playing the currently to-be-played short broadcast audio clip and the corresponding currently to-be-played video clip comprises:
calculating the timestamp offset of the current to-be-played short-broadcast audio clip and the current to-be-played video clip;
and playing the short broadcast audio clip to be played currently and the video clip to be played currently based on the timestamp offset.
5. A video playback apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring complete audio and video data of a target video and short broadcast data of the target video when the target video is requested to be played; the complete audio and video data comprises synchronous complete video data and complete audio data; the short broadcast data comprises short broadcast audio data, dotting data and audio and video synchronization data; the dotting data comprises data indicating respective video segments divided in the complete video data; the audio and video synchronization data comprises the corresponding relation between the short broadcast audio clip in the short broadcast audio data and the video clip in the complete video data;
the conventional playing unit is used for playing the complete audio and video data of the target video;
the pause unit is used for pausing the playing of the complete audio and video data of the target video when a short play mode switching instruction is received; when the short play mode exits, the complete audio and video data of the target video are restored to be played;
a segment determining unit, configured to determine, based on the dotting data and the audio/video synchronization data, a current to-be-played short broadcast audio segment and a current to-be-played video segment corresponding to the current to-be-played short broadcast audio segment in sequence from each to-be-played short broadcast audio segment and each video segment;
the short broadcast playing unit is used for synchronously playing the current short broadcast audio clip to be played and the corresponding current video clip to be played; when the short-play playing unit finishes playing the current video clip to be played, the short-play playing unit returns to the clip determining unit until the video clip to be played does not exist.
6. The apparatus of claim 5, wherein the segment determining unit comprises:
the first audio determining unit is used for determining the currently played short broadcast audio clip as a currently to-be-played short broadcast audio clip; wherein, each of the short broadcast audio clips in the short broadcast audio data is played in sequence;
the first searching unit is used for determining a timestamp range corresponding to a timestamp of the current to-be-played short broadcast audio clip from the dotting data based on the audio and video synchronization data;
and the first video determining unit is used for determining the video clip in the complete video data corresponding to the found timestamp range as the current video clip to be played corresponding to the current short-cast audio clip to be played.
7. The apparatus of claim 6, further comprising:
the judging unit is used for judging whether the short-cast audio is played for the first time after the short-cast mode switching instruction is received at present; if the fact that the short broadcast audio is played for the first time after the short broadcast mode switching instruction is judged not to be received currently is judged, the first audio determining unit executes the short broadcast audio clip played currently and determines the short broadcast audio clip to be played currently;
the second searching unit is used for searching a timestamp range closest to a timestamp corresponding to the current playing progress of the complete video data in the dotting data when the short-cast audio is firstly played after a short-cast mode switching instruction is judged to be received at present;
the second video determining unit is used for determining the video clip in the complete video data corresponding to the found timestamp range as the current video clip to be played;
and the second audio determining unit is used for determining the short broadcast audio clip corresponding to the current video clip to be played in the short broadcast audio data as the current short broadcast audio clip to be played based on the audio and video synchronization data.
8. The apparatus of claim 5, wherein the short cast playback unit comprises:
the calculating unit is used for calculating the time stamp offset of the current to-be-played short broadcast audio clip and the current to-be-played video clip;
and the synchronous playing unit is used for playing the current to-be-played short-broadcast audio clip and the current to-be-played video clip based on the timestamp offset.
9. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the video playback method according to any one of claims 1 to 4.
10. A computer storage medium storing a computer program which, when executed, implements the video playback method of any one of claims 1 to 4.
CN202210338308.1A 2022-04-01 2022-04-01 Video playing method and device, electronic equipment and storage medium Pending CN114697722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210338308.1A CN114697722A (en) 2022-04-01 2022-04-01 Video playing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210338308.1A CN114697722A (en) 2022-04-01 2022-04-01 Video playing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114697722A true CN114697722A (en) 2022-07-01

Family

ID=82141949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210338308.1A Pending CN114697722A (en) 2022-04-01 2022-04-01 Video playing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114697722A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102170453A (en) * 2011-05-26 2011-08-31 北京暴风网际科技有限公司 Audio and video coding method and playing method for shortening waiting time before on demand playing
CN106658133A (en) * 2016-10-26 2017-05-10 广州市百果园网络科技有限公司 Audio and video synchronous playing method and terminal
CN110677711A (en) * 2019-10-17 2020-01-10 北京字节跳动网络技术有限公司 Video dubbing method and device, electronic equipment and computer readable medium
US20200221159A1 (en) * 2019-01-08 2020-07-09 Qualcomm Incorporated Multiple decoder interface for streamed media data
CN111581938A (en) * 2020-06-22 2020-08-25 程浩 Courseware making and editing method with multi-source content and server
CN111770359A (en) * 2020-06-03 2020-10-13 苏宁云计算有限公司 Event video clipping method, system and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102170453A (en) * 2011-05-26 2011-08-31 北京暴风网际科技有限公司 Audio and video coding method and playing method for shortening waiting time before on demand playing
CN106658133A (en) * 2016-10-26 2017-05-10 广州市百果园网络科技有限公司 Audio and video synchronous playing method and terminal
US20200221159A1 (en) * 2019-01-08 2020-07-09 Qualcomm Incorporated Multiple decoder interface for streamed media data
CN110677711A (en) * 2019-10-17 2020-01-10 北京字节跳动网络技术有限公司 Video dubbing method and device, electronic equipment and computer readable medium
CN111770359A (en) * 2020-06-03 2020-10-13 苏宁云计算有限公司 Event video clipping method, system and computer readable storage medium
CN111581938A (en) * 2020-06-22 2020-08-25 程浩 Courseware making and editing method with multi-source content and server

Similar Documents

Publication Publication Date Title
US11665378B2 (en) Establishment and use of time mapping based on interpolation using low-rate fingerprinting, to help facilitate frame-accurate content revision
JP7313445B2 (en) Dynamic shortening in replacement content playback to help align the end of replacement content with the end of replaced content
JP4540226B2 (en) Personalized, time-shifted program
US7646960B2 (en) Determining chapters based on presentation of a program
CN107277594B (en) Method and device for synchronizing video and audio with bullet screen
JP7181989B2 (en) Advance preparation for content modifications based on expected wait times when retrieving new content
RU2763518C1 (en) Method, device and apparatus for adding special effects in video and data media
JP2021534698A (en) Dynamic playback of transition frames during transitions between media stream playbacks
CN110418183B (en) Audio and video synchronization method and device, electronic equipment and readable medium
CN112601127B (en) Video display method and device, electronic equipment and computer readable storage medium
CN111432285A (en) System, method and equipment for video splicing and playing
CN105100912A (en) Streaming media processing method and streaming media processing apparatus
WO2015021862A1 (en) Methods and systems for playing powerpoint files
JP2011525727A (en) Method and apparatus for presenting a summary of content items
CN114697722A (en) Video playing method and device, electronic equipment and storage medium
CN114866787B (en) Live broadcast implementation method and system
CN111432283B (en) Video playback time determination method and device
CN114500476A (en) Multimedia playing method and device and computer readable storage medium
CN111901620A (en) Live broadcast playback generation method and device, electronic equipment and storage medium
WO2012029252A1 (en) Information processing apparatus, information processing method, and program
US20200387540A1 (en) Systems and methods for automatic generation of bookmarks utilizing focused content analysis
CN111432150A (en) Method and device for synchronously playing back videos
CN116915924A (en) Video stitching method and device, electronic equipment, storage medium and vehicle
CN117312084A (en) Method and equipment for calculating application foreground and background use duration
CN114637910A (en) Application program comparison method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination