CN113923495B - Video playing method, system, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113923495B
CN113923495B CN202111050395.2A CN202111050395A CN113923495B CN 113923495 B CN113923495 B CN 113923495B CN 202111050395 A CN202111050395 A CN 202111050395A CN 113923495 B CN113923495 B CN 113923495B
Authority
CN
China
Prior art keywords
video
played
playing
time point
frame
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
CN202111050395.2A
Other languages
Chinese (zh)
Other versions
CN113923495A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202111050395.2A priority Critical patent/CN113923495B/en
Publication of CN113923495A publication Critical patent/CN113923495A/en
Application granted granted Critical
Publication of CN113923495B publication Critical patent/CN113923495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/43074Synchronising 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 additional data with content streams on the same device, e.g. of EPG data or interactive icon with a TV program

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention relates to a video playing method, a video playing system, electronic equipment and a storage medium. The playing method comprises the following steps: acquiring a first corresponding relation between a video frame in a video to be played and a playing time point under a first video playing rule and a second corresponding relation under a second video playing rule; and playing the video to be played at the time point to be played according to the first corresponding relation and the second corresponding relation. According to the method and the device, the corresponding relation between the video to be played and the playing time point under different video playing rules is obtained, when the starting time point of the video to be played is selected, the time point to be played corresponding to the starting time point is determined according to the corresponding relation under the different video playing rules, so that video frames corresponding to the same time point when the video to be played is played under the different video playing rules are consistent, and the consistency of the map advertisement or other operations of a user on the video can be ensured under all video playing environments.

Description

Video playing method, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video playing method, a system, an electronic device, and a storage medium.
Background
The video website is a network medium which enables internet users to smoothly publish, browse and share video works on line under the support of a perfect technical platform, and the scale of the video website is larger and larger along with the increasing demand of the internet users for videos.
In the process of selecting and playing video by aiming at a player in a browser, the selected frame numbers cannot be determined, for example, the frames of the video are distributed in 0.04s,0.08s and 0.12s … …, but 0.06s or 0.07999999s can be selected in the browser, the 1 st frame or 2 nd frame of the video cannot be determined at this time, and different browsers, the displayed frames can also be different, strict frame alignment cannot be achieved, and once the situation occurs in a scene of inserting advertisements or intercepting the video by frames, the situation easily occurs that necessary video frames are lost or unnecessary video frames are exceeded in the video of advertisement lasting or intercepting.
Disclosure of Invention
In order to solve the problem that video frames corresponding to the same time point are different when videos are played by different browsers in the prior art, at least one embodiment of the invention provides a video playing method, a system, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a video playing method, where the playing method includes:
acquiring a first corresponding relation between a video frame in a video to be played and a playing time point under a first video playing rule;
acquiring a second corresponding relation between the video frames in the video to be played and the playing time point under a second video playing rule;
when the starting time point of the video to be played is selected, generating a time point to be played through the starting time point according to a first corresponding relation and the second corresponding relation, and playing the video to be played at the time point to be played when the video to be played is played; the video frames played by the video to be played at the time point to be played under the second video playing rule are consistent with the video frames played by the video to be played at the starting time point under the first video playing rule.
Based on the above technical solution, the following improvements can be made in the embodiments of the present invention.
With reference to the first aspect, in a first embodiment of the first aspect, the obtaining a first correspondence between video frames in a video to be played and a playing time point under a first video playing rule includes:
Acquiring a corresponding relation between a frame number of each video frame in the video to be played and a playing time point under the first video playing rule as a first corresponding relation;
the obtaining a second correspondence between the video frames in the video to be played and the playing time point under a second video playing rule includes:
and acquiring the corresponding relation between the frame number of each video frame in the video to be played and the playing time point under the second video playing rule as a second corresponding relation.
With reference to the first embodiment of the first aspect, in a second embodiment of the first aspect, the obtaining, based on the first video playing rule, a correspondence between a frame number of each video frame in the video to be played and a playing time point includes:
acquiring a first frame rate and a first playing duration of the video to be played under the first video playing rule;
obtaining a first total frame number of the video to be played according to the first frame rate and the first playing duration;
acquiring a first start frame number of a first frame video frame of the video to be played and a first end frame number of a last frame video frame of the video to be played based on the first video playing rule;
Obtaining a first time interval of a playing time point of any adjacent video frame in the video to be played according to the first playing time length and the first total frame number;
obtaining a corresponding relation between the frame number of each video frame and a playing time point based on the first video playing rule according to the first starting frame number, the first ending frame number, the first playing time length and the first time interval of the video to be played;
and/or the number of the groups of groups,
the obtaining, based on the second video playing rule, a corresponding relationship between a frame number of each video frame in the video to be played and a playing time point includes:
acquiring a second frame rate and a second playing duration of the video to be played under the second video playing rule;
obtaining a second total frame number of the video to be played according to the second frame rate and the second playing duration;
acquiring a second start frame number of a first frame video frame of the video to be played and a second end frame number of a last frame video frame of the video to be played based on the second video playing rule;
obtaining a second time interval of a playing time point of any adjacent video frame in the video to be played according to the second playing time length and the second total frame number;
And obtaining the corresponding relation between the frame number of each video frame and the playing time point based on the second video playing rule according to the second starting frame number, the second ending frame number, the second playing time length and the second time interval of the video to be played.
With reference to the first embodiment of the first aspect, in a third embodiment of the first aspect, the selecting a starting time point for the video to be played includes:
receiving a first operation corresponding to a preselected time point of the video to be played;
taking a preset number of video frames adjacent to the preselected time point at the playing time point as video frames to be selected according to the first operation, and displaying;
and receiving a second operation of selecting any video frame to be selected, and taking a playing time point corresponding to the video frame to be selected by the second operation under the second video playing rule as a starting time point.
With reference to the first embodiment of the first aspect, in a fourth embodiment of the first aspect, the selecting a starting time point for the video to be played includes:
receiving an input frame number, and taking a video frame corresponding to the input frame number as a video frame to be selected;
and taking the playing time point corresponding to the video frame to be selected under the second video playing rule as a starting time point.
With reference to the first embodiment of the first aspect, in a fifth embodiment of the first aspect, the selecting a starting time point for the video to be played includes:
receiving a third operation corresponding to the preselected time point of the video to be played;
acquiring a video frame with the shortest time interval between a playing time point and the preselected time point as a video frame to be selected;
if the number of the video frames to be selected is 1, taking a playing time point corresponding to the video frames to be selected under the second video playing rule as a starting time point;
if the number of the video frames to be selected is 2, selecting a playing time point corresponding to the target video frame under the second video playing rule as a starting time point according to a preset rule; the target video frame is one of the video frames to be selected.
With reference to the first aspect, the first, second, third, fourth, or fifth embodiments of the first aspect, in a sixth embodiment of the first aspect, the generating, by the start time point, a time point to be played according to the first correspondence and the second correspondence includes:
according to the deviation of the first corresponding relation and the second corresponding relation, the starting time point is adjusted, and the time point to be played is obtained; the video frames played by the video to be played at the time point to be played under the second video playing rule are consistent with the video frames played by the video to be played at the starting time point under the first video playing rule.
In a second aspect, an embodiment of the present invention provides a video playing system, where the playing system includes:
the first obtaining unit is used for obtaining a first corresponding relation between a video frame in the video to be played and a playing time point under a first video playing rule;
the second obtaining unit is used for obtaining a second corresponding relation between the video frames in the video to be played and the playing time point under a second video playing rule;
the processing unit is used for generating a time point to be played through the starting time point according to a first corresponding relation and the second corresponding relation when the starting time point is selected by the video to be played, wherein a video frame played by the video to be played at the time point to be played under the second video playing rule is consistent with a video frame played by the video to be played at the starting time point under the first video playing rule;
and the playing unit is used for playing the video to be played at the time point to be played when the video to be played is played.
In a third aspect, an electronic device provided by an embodiment of the present invention includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
and the processor is used for realizing the video playing method in any one of the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where one or more programs are stored, where the one or more programs are executable by one or more processors to implement the video playing method according to any one of the first aspects.
Compared with the prior art, the technical scheme of the invention has the following advantages: according to the method and the device, the corresponding relation between the video to be played and the playing time point under different video playing rules is obtained, when the starting time point of the video to be played is selected, the time point to be played corresponding to the starting time point is determined according to the corresponding relation under the different video playing rules, so that video frames corresponding to the same time point when the video to be played is played under the different video playing rules are consistent, and the consistency of the map advertisement or other operations of a user on the video can be ensured under all video playing environments.
Drawings
Fig. 1 is a schematic flow chart of a video playing method according to an embodiment of the present invention;
Fig. 2 is a schematic flow chart of a video playing method according to another embodiment of the present invention;
fig. 3 is a schematic flow chart of a video playing method according to another embodiment of the present invention;
fig. 4 is a schematic flow chart of a video playing method according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video playing system according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The embodiment of the invention provides a structural schematic diagram of a system for realizing the embodiments of the invention, which comprises a terminal, wherein the terminal comprises: processor 1110 and memory 1130, wherein the terminals may be mobile terminals such as cell phones, tablet computers, notebook computers, palm top computers, personal digital assistants (PersonalDigitalAssistant, PDA), portable media players (PortableMediaPlayer, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and stationary terminals such as digital TVs, desktop computers, and the like.
As shown in fig. 1, an embodiment of the present invention provides a video playing method. Referring to fig. 1, the method comprises the following steps:
s11, acquiring a first corresponding relation between a video frame and a playing time point in the video to be played under a first video playing rule.
S12, obtaining a second corresponding relation between the video frames in the video to be played and the playing time point under a second video playing rule.
In this embodiment, when playing video, each video frame in the video is displayed frame by frame, and when continuous image changes exceed more than 24 frames (frames) per second, according to the persistence of vision principle, a human eye cannot distinguish a single still picture; it appears as a smooth continuous visual effect.
In this embodiment, because the playing policies of the player cores in different browsers or player clients have differences, the video playing rules are the playing rules set by the different player cores, and for the same timestamp, the frames displayed by different browsers may be different, so that the situation that the video frames corresponding to the same time point are forward or backward one frame occurs, so that the corresponding relationship between the video frames in the video to be played and the playing time point is obtained in this step, that is, the corresponding relationship between the frame numbers of the client or the browser playing the video to be played and the playing time point is obtained.
In this embodiment, the correspondence between the video frames and the playing time points may be obtained by associating the frame numbers of the video frames with the playing time points, or may be obtained by respectively marking the corresponding playing time points on the video frames; the frame numbers of the video frames can be numbers obtained by sequencing according to the playing sequence of the video frames, or numbers configured by a user, each video frame has a corresponding playing time point, and the corresponding relation between the frame numbers of the video frames and each playing time point is obtained in the scheme and can be used for determining at which time point the video frames with each frame number are played.
Specifically, the display duration of each video frame is fixed in the video playing process, for example, 25 frames are displayed per second, each frame is the display time of 0.04 seconds, so in this scheme, the corresponding relationship between the frame number and the display time point of the video frame can be determined according to the number of the frame number and the display duration of the video frame, for example, the frame number of the video frame can be sequentially increased by 1 from 1, the display time point of the nth frame is the display time of the (n-1) x video frame, and for the frame number of the video frame which is not increased by a fixed value, the corresponding display time point needs to be determined corresponding to each frame number, and the corresponding relationship is generated and can be stored through a table, an array or a dictionary.
S13, when the starting time point of the video to be played is selected, generating a time point to be played through the starting time point according to the first corresponding relation and the second corresponding relation, and playing the video to be played at the time point to be played when the video to be played is played; the video frames of the video to be played at the time point to be played under the second video playing rule are consistent with the video frames of the video to be played at the starting time point under the first video playing rule.
In this embodiment, when the video to be played is played on different browsers or players, the same time point is selected on the progress bars of the different browsers or players, and the played video frames may appear differently due to different player cores of the browsers or players, which may cause deviation for the user, for example, for the added map advertisement on the video to be played, the situation of wearing the upper is easy to appear, for example, such a video, a teacher comes out from the third class, then goes through the corridor, and enters the second class.
There are 3 scenes in this video:
and (3) a step of: three years and one shift (assuming the corresponding time is video frame 0 to frame 50);
And II: corridor (51 st to 100 th frames);
thirdly,: three-grade class two (101 frames to 200 frames);
at this time, the video is connected to a new advertisement, we need to paste an advertisement poster on the wall of the corridor, that is, the advertisement appears from 51 st frame to 100 th frame, if the user does not want to wear the wall, two conditions must be satisfied, the 51 st frame to 100 th frame of the picture played by any browser must be the corridor, and the advertisement must appear between the 51 st frame and 100 th frame.
For the first browser or player, when selecting the corridor segment, 51-100 is marked as a corridor, i.e. the map advertisement is played at the time points corresponding to the 51 st frame and the 100 th frame, now, because the cores of the players between different browsers are inconsistent, when the first browser or player holds the mark to play, the situation that the advertisement leaks out in advance and ends in advance can occur, for example, under the condition that the playing time point corresponding to the 51 st frame is the picture of the video frame of the 50 th frame under the other browser or player, at the moment, a suspended advertisement board is visually seen in a class room of three grades, and no advertisement is seen in the 100 th frame, because the advertisement is ended when the video frame of the 99 th frame, the advertisement flash disappears, and only a white wall is left, so that the situation of wearing is caused.
The difference of the playing frame numbers is caused by different playing strategies of player kernels in different browsers or players, and for the same time stamp, the pictures displayed by different browsers or players may be different, and the situation of one frame forward or one frame backward occurs, which does not affect the experience of the user for watching the video, however, once the video needing to be subjected to the map advertisement occurs, the situation that the time points set during the playing of the map advertisement cannot be matched with each time point easily occurs.
In this embodiment, aiming at the above situation, the method is to ensure that when the map advertisement appears, the corresponding video frames are corresponding to the corresponding video frames, and the first corresponding relation and the second corresponding relation are used to generate the time point to be played based on the start time point, so that the video frames to be played at the time point to be played under the second video playing rule are consistent with the video frames to be played at the start time point under the first video playing rule, and of course, the video frames to be played at the time point to be played under the first video playing rule are consistent with the video frames to be played at the start time point under the second video playing rule.
Moreover, the video frames of the video to be played are not only deviated due to the rendering mode of the browser or the player, but also display deviation is caused by the combination of the time point selected by the user and the rendering mode, for example, the playing time point of the video frames is 0.04 second, 0.08 second and 0.12 second.
The browser or player in the above scheme is only used for illustration, and the video player and other video playing devices have their own rendering rules, so that the above problems can occur in different video playing devices, and the scheme can be applied.
In this embodiment, the video to be played is played according to the adjusted time point to be played, so that the video frames finally played by different browsers, players or video devices at the same time point to be played are all the same video frame, and the situation that the user watching experience is affected or the situation that the user watching experience is affected is avoided when the video after further processing is played.
In this embodiment, by acquiring the correspondence between the video to be played and the playing time point under different video playing rules, when the starting time point is selected for the video to be played, the time point to be played corresponding to the starting time point is determined according to the correspondence under different video playing rules, so that the video frames corresponding to the same time point when the video to be played is played under different video playing rules are consistent, and therefore, the mapping advertisement or other operations of the user on the video can be kept consistent under all video playing environments.
Specifically, taking the mapping advertisement as an example, a worker sets the mapping advertisement for the video in the background according to the corresponding relation between the frame number and the playing time point in the preset standard, for example, the mapping advertisement is set on the 51 st frame to the 99 th frame, at this time, the worker sets the mapping advertisement to play between the playing time point corresponding to the 51 st frame and the playing time point corresponding to the 99 th frame for 4.96 seconds, after the configuration is completed, in the video playing device, the playing time point of the first frame video frame is 0 seconds, which results in that the 52 th frame video frame is played for 2.04 seconds, that is, the frame number to be played selected when the mapping advertisement is played in the S12 is the 52 th frame, and the mapping advertisement is played between the 52 th frame and the 100 th frame, so at this time, the frame number to be played is adjusted according to the scheme, whether the playing time point of the mapping advertisement is 2.04 seconds to 4.96 seconds, and the video to be played is played or the 51 st frame to the 99 th frame video frame.
In this embodiment, before obtaining the correspondence between the frame number of each video frame in the video to be played and the playing time point, the playing method further includes: acquiring a video to be processed; transcoding the video definition of the video to be processed, so that the definition of the video to be processed is converted into the preset video definition, and the video to be played is obtained.
In this embodiment, the preset video definition may be the lowest definition or the video definition set by the user, and the image size of the video frame displayed by the video with lower definition is also smaller, so that the problem of too slow loading caused by too large video frame size can be effectively avoided, and the video loading efficiency is improved.
Specifically, the obtaining a first correspondence between video frames in the video to be played and the playing time point under the first video playing rule may be obtaining a correspondence between a frame number of each video frame in the video to be played and the playing time point under the first video playing rule as the first correspondence; the obtaining of the second correspondence between the video frames in the video to be played and the playing time point under the second video playing rule may be obtaining the correspondence between the frame number of each video frame in the video to be played and the playing time point under the second video playing rule as the second correspondence.
As shown in fig. 2, in this embodiment, the obtaining a first correspondence between a video frame and a playing time point in a video to be played under a first video playing rule includes the following steps:
s21, acquiring a first frame rate and a first playing duration of a video to be played under a first video playing rule.
S22, obtaining a first total frame number of the video to be played according to the first frame rate and the first playing duration.
In this embodiment, the total frame number of the video to be played is calculated according to the frame rate and the playing duration of the video to be played, and the total frame number of the video to be played can be obtained by directly multiplying the frame rate and the playing duration, or of course, the total frame number of the video to be played can be counted in a counting manner, so as to avoid the problem that errors occur in the frame number due to the fact that the video is inserted and extracted.
S23, acquiring a first start frame number of a first frame video frame of a video to be played and a first end frame number of a last frame video frame of the video to be played based on a first video playing rule.
S24, according to the first playing time length and the first total frame number, a first time interval of a playing time point of any adjacent video frame in the video to be played is obtained.
In this embodiment, not only the time interval of the playing time point of the adjacent video frame of the video frame to be played can be determined by the playing time length and the total frame number of the video to be played, but also the time interval of the adjacent video frame can be determined according to the frame rate of the video to be played.
S25, obtaining the corresponding relation between the frame number of each video frame and the playing time point based on the first video playing rule according to the first starting frame number, the first ending frame number, the first playing time length and the first time interval of the video to be played.
In this embodiment, after determining the initial frame number, the end frame number, the playing duration and the time interval, the correspondence between each frame number and the playing time point is determined. Similarly, the corresponding relationship between the frame number of each video frame in the video to be played and the playing time point under the second video playing rule can be determined in the same manner, and the scheme is not described herein again.
As shown in fig. 3, in a specific embodiment, the selecting a starting time point for the video to be played in S12 includes the following steps:
s31, receiving a first operation corresponding to a preselected time point of a video to be played.
S32, taking the video frames with the preset number, which are adjacent to the preselected time point at the playing time point, as the video frames to be selected according to the first operation, and displaying.
S33, receiving a second operation of selecting any video frame to be selected, and taking a playing time point corresponding to the video frame to be selected by the second operation under a second video playing rule as a starting time point.
In this embodiment, the first operation includes, but is not limited to, operations of sliding, clicking, and the like, and the second operation includes, but is not limited to, operations of clicking, dragging, and the like, and the first operation and the second operation may be operations of a user on the video playing device, or may be operations for pre-configuration, and an operation triggered automatically when a condition is satisfied.
In this embodiment, the operation of clicking the to-be-selected playing time point by the user is obtained, and the video frames adjacent to the to-be-selected playing time point at the playing time point are used as to-be-selected video frames, so that the user can intuitively observe each video frame and select a video frame required by the user, for example, for a screen recording user, because it is very difficult to select the video frame of the self-heart instrument by sliding the time bar, the time consumed by the user for selecting the video frame can be effectively reduced, and the user can intuitively see the video frame to be selected.
In a specific embodiment, the scheme of selecting video frames in combination with the present scheme may not only select video frames according to the above scheme, but also: and receiving the input frame number as a frame number to be played, and taking a video frame corresponding to the frame number to be played as a video frame to be selected.
As shown in fig. 4, in a specific embodiment, the selecting a starting time point for the video to be played in S12 includes the following steps:
s41, receiving a third operation corresponding to a preselected time point of the video to be played.
S42, acquiring the video frame with the shortest time interval between the playing time point and the preselected time point as the video frame to be selected.
In this embodiment, the third operation includes, but is not limited to, operations such as sliding, clicking, and the like, and may also be that the user directly inputs the time point as the time point for playing to be selected, which is not described herein again.
In this embodiment, according to the time point of playing to be selected, the video frame with the shortest time interval is selected as the video frame to be selected, for example, the time points of playing of the video frames are respectively 0.04 seconds, 0.08 seconds, and 0.12 seconds.
And S43, taking the playing time point corresponding to the video frames to be selected under the second video playing rule as the starting time point if the number of the video frames to be selected is 1.
S44, if the number of the video frames to be selected is 2, selecting a playing time point corresponding to the target video frame under a second video playing rule as a starting time point according to a preset rule; the target video frame is one of the video frames to be selected.
In this embodiment, if the number of the video frames to be selected is 1, the video frames to be selected may be directly used as the video frames to be played, and if the number of the video frames to be selected is 2, it is indicated that the video frames to be played cannot be determined according to the time point to be selected yet, at this time, one of the two video frames to be selected is selected according to a preset rule, where the preset rule may be to select the video frame played before the time point to be selected as the target video frame, or select the video frame played after the time point to be selected as the target video frame.
In this embodiment, the preset rule is used to determine the selectable time point of the video frame to be played, so as to ensure that the user can select the same time point of the video frame to be played.
Specifically, as shown in fig. 5, in S12, a time point to be played is generated through a starting time point according to the first correspondence relationship and the second correspondence relationship, including but not limited to: according to the deviation of the first corresponding relation and the second corresponding relation, adjusting the initial time point to obtain a time point to be played; the video frames of the video to be played at the time point to be played under the second video playing rule are consistent with the video frames of the video to be played at the starting time point under the first video playing rule.
In this embodiment, the starting time point is adjusted according to the deviation of the first corresponding relationship and the second corresponding relationship, and the corresponding video frame can be determined as the video frame to be played through the starting time point in the first corresponding relationship, and further, the time point to be played is determined through the video frame to be played in the second corresponding relationship, so that the starting time point is adjusted, and the time point to be played is obtained; the fast screening can be achieved by adding marks to the video frames to be played in advance through screening the video frames to be played in the second corresponding relation, or the video frames near the starting time point can be selected in the second corresponding relation and compared with the video frames to be played, so that the position of the video frames to be played in the second corresponding relation can be determined.
In this embodiment, the starting time point is adjusted according to the deviation between the first corresponding relationship and the second corresponding relationship, and the frame number of the corresponding video frame may be determined according to the starting time point in the first corresponding relationship, and the corresponding time point to be played may be determined according to the frame number in the second corresponding relationship.
As shown in fig. 5, a video playing system provided in an embodiment of the present invention includes: a first acquisition unit 11, a second acquisition unit 12, a processing unit 13, and a playback unit 14.
In this embodiment, the first obtaining unit 11 is configured to obtain a first correspondence between video frames in a video to be played and a playing time point under a first video playing rule.
In this embodiment, the second obtaining unit 12 is configured to obtain a second correspondence between video frames in the video to be played and the playing time point under a second video playing rule.
In this embodiment, the processing unit 13 is configured to generate, when the start time point of the video to be played is selected, the time point to be played according to the first correspondence and the second correspondence, where a video frame of the video to be played at the time point to be played under the second video playing rule is consistent with a video frame of the video to be played at the start time point under the first video playing rule.
In the present embodiment, the playing unit 14 is configured to play at a time point to be played when the video to be played is played.
In this embodiment, the first obtaining unit 11 is specifically configured to obtain, as the first correspondence, a correspondence between a frame number of each video frame in the video to be played and a playing time point based on the first video playing rule.
In this embodiment, the second obtaining unit 12 is specifically configured to obtain, as the second correspondence, a correspondence between a frame number of each video frame in the video to be played and a playing time point based on the second video playing rule.
In this embodiment, the first obtaining unit 11 is specifically configured to obtain a first frame rate and a first playing duration of a video to be played based on a first video playing rule; obtaining a first total frame number of the video to be played according to the first frame rate and the first playing time length; acquiring a first start frame number of a first frame video frame of a video to be played and a first end frame number of a last frame video frame of the video to be played based on a first video playing rule; obtaining a first time interval of a playing time point of any adjacent video frame in the video to be played according to the first playing time length and the first total frame number; and obtaining the corresponding relation between the frame number of each video frame and the playing time point based on the first video playing rule according to the first starting frame number, the first ending frame number, the first playing time length and the first time interval of the video to be played.
In this embodiment, the second obtaining unit 12 is specifically configured to obtain a second frame rate and a second playing duration of the video to be played based on a second video playing rule; obtaining a second total frame number of the video to be played according to the second frame rate and the second playing time length; acquiring a second starting frame number of a first frame video frame of a video to be played and a second ending frame number of a last frame video frame of the video to be played based on a second video playing rule; obtaining a second time interval of a playing time point of any adjacent video frame in the video to be played according to the second playing time length and the second total frame number; and obtaining the corresponding relation between the frame number of each video frame and the playing time point based on the second video playing rule according to the second starting frame number, the second ending frame number, the second playing time length and the second time interval of the video to be played.
In this embodiment, the playing system further includes: a starting time point determining unit, configured to receive a first operation corresponding to a preselected time point of a video to be played; taking a preset number of video frames adjacent to the preselected time point at the playing time point as video frames to be selected according to the first operation, and displaying; and receiving a second operation of selecting any video frame to be selected, and taking a playing time point corresponding to the video frame to be selected by the second operation under a second video playing rule as a starting time point.
In this embodiment, the starting time point determining unit is further configured to receive an input frame number, and use a video frame corresponding to the input frame number as a video frame to be selected; and taking the playing time point corresponding to the video frame to be selected under the second video playing rule as the starting time point.
In this embodiment, the starting time point determining unit is further configured to receive a third operation corresponding to a preselected time point of the video to be played; acquiring a video frame with the shortest time interval between a playing time point and a preselected time point as a video frame to be selected; if the number of the video frames to be selected is 1, taking the playing time point corresponding to the video frames to be selected under the second video playing rule as a starting time point; if the number of the video frames to be selected is 2, selecting a playing time point corresponding to the target video frame under a second video playing rule as a starting time point according to a preset rule; the target video frame is one of the video frames to be selected.
In this embodiment, the playing system further includes: the transcoding unit is used for acquiring the video to be processed; transcoding the video definition of the video to be processed, so that the definition of the video to be processed is converted into the preset video definition, and the video to be played is obtained.
In this embodiment, the processing unit 13 is specifically configured to adjust the starting time point according to the deviation between the first corresponding relationship and the second corresponding relationship, so as to obtain a time point to be played; the video frames of the video to be played at the time point to be played under the second video playing rule are consistent with the video frames of the video to be played at the starting time point under the first video playing rule.
The functions of the apparatus according to the embodiments of the present invention have been described in the foregoing method embodiments, so that the descriptions of the embodiments are not exhaustive, and reference may be made to the related descriptions in the foregoing embodiments, which are not repeated herein.
As shown in fig. 6, an electronic device provided in an embodiment of the present invention includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, where the processor 1110, the communication interface 1120, and the memory 1130 perform communication with each other through the communication bus 1140;
a memory 1130 for storing a computer program;
the processor 1110 is configured to implement any one of the video playing methods described above when executing the program stored in the memory 1130:
according to the electronic device provided by the embodiment of the invention, the processor 1110 determines the time point to be played corresponding to the start time point according to the corresponding relation under different video playing rules when the start time point is selected by the video to be played by acquiring the corresponding relation between the video to be played and the playing time point under different video playing rules by executing the program stored in the memory 1130, so that the video frames corresponding to the same time point when the video to be played is played under different video playing rules are consistent, and the consistency of the map advertisement or other operations of the user on the video can be ensured under all video playing environments.
The communication bus 1140 mentioned above for the electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus, etc. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface 1120 is used for communication between the electronic device and other devices described above.
The memory 1130 may include a Random Access Memory (RAM) or a nonvolatile memory 1130 (non-volatile memory), such as at least one magnetic disk 1130. Optionally, the memory 1130 may also be at least one storage device located remotely from the processor 1110.
The processor 1110 may be a general-purpose processor 1110, including a Central Processing Unit (CPU), a network processor 1110 (NP), and the like; but may also be a digital signal processor 1110 (DSP), application Specific Integrated Circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Embodiments of the present invention provide a computer-readable storage medium storing one or more programs executable by one or more processors 1110 to implement the event anomaly fluctuation analysis method of any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present invention are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk SolidStateDisk (SSD)), among others.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A video playing method, characterized in that the playing method comprises:
acquiring a corresponding relation between a frame number of each video frame in a video to be played and a playing time point under a first video playing rule as a first corresponding relation;
acquiring a corresponding relation between a frame number of each video frame in the video to be played and a playing time point based on a second video playing rule, and taking the corresponding relation as a second corresponding relation;
when the starting time point of the video to be played is selected, the starting time point is adjusted according to the deviation of the first corresponding relation and the second corresponding relation to obtain the time point to be played, and the video to be played is played at the time point to be played when the video to be played is played; the video frames of the video to be played at the time point to be played under the second video playing rule are consistent with the video frames of the video to be played at the starting time point under the first video playing rule;
The starting time point of the video to be played comprises the following steps:
acquiring a video frame with the shortest time interval between a playing time point and the preselected time point of the video to be played as a video frame to be selected;
and determining the starting time point according to the video frame to be selected.
2. The video playback method as claimed in claim 1, wherein,
the obtaining, based on the first video playing rule, a corresponding relationship between a frame number of each video frame in the video to be played and a playing time point includes:
acquiring a first frame rate and a first playing duration of the video to be played under the first video playing rule;
obtaining a first total frame number of the video to be played according to the first frame rate and the first playing duration;
acquiring a first start frame number of a first frame video frame of the video to be played and a first end frame number of a last frame video frame of the video to be played based on the first video playing rule;
obtaining a first time interval of a playing time point of any adjacent video frame in the video to be played according to the first playing time length and the first total frame number;
obtaining a corresponding relation between the frame number of each video frame and a playing time point based on the first video playing rule according to the first starting frame number, the first ending frame number, the first playing time length and the first time interval of the video to be played;
And/or the number of the groups of groups,
the obtaining, based on the second video playing rule, a corresponding relationship between a frame number of each video frame in the video to be played and a playing time point includes:
acquiring a second frame rate and a second playing duration of the video to be played under the second video playing rule;
obtaining a second total frame number of the video to be played according to the second frame rate and the second playing duration;
acquiring a second start frame number of a first frame video frame of the video to be played and a second end frame number of a last frame video frame of the video to be played based on the second video playing rule;
obtaining a second time interval of a playing time point of any adjacent video frame in the video to be played according to the second playing time length and the second total frame number;
and obtaining the corresponding relation between the frame number of each video frame and the playing time point based on the second video playing rule according to the second starting frame number, the second ending frame number, the second playing time length and the second time interval of the video to be played.
3. The video playing method according to claim 1, wherein the video to be played selects a starting time point, and the method comprises:
Receiving a first operation corresponding to a preselected time point of the video to be played;
taking a preset number of video frames adjacent to the preselected time point at the playing time point as video frames to be selected according to the first operation, and displaying;
and receiving a second operation of selecting any video frame to be selected, and taking a playing time point corresponding to the video frame to be selected by the second operation under the second video playing rule as a starting time point.
4. The video playing method according to claim 1, wherein the video to be played selects a starting time point, and the method comprises:
receiving an input frame number, and taking a video frame corresponding to the input frame number as a video frame to be selected;
and taking the playing time point corresponding to the video frame to be selected under the second video playing rule as a starting time point.
5. The video playing method according to claim 1, wherein the video to be played selects a starting time point, and the method comprises:
receiving a third operation corresponding to the preselected time point of the video to be played;
acquiring a video frame with the shortest time interval between a playing time point and the preselected time point as a video frame to be selected;
If the number of the video frames to be selected is 1, taking a playing time point corresponding to the video frames to be selected under the second video playing rule as a starting time point;
if the number of the video frames to be selected is 2, selecting a playing time point corresponding to the target video frame under the second video playing rule as a starting time point according to a preset rule; the target video frame is one of the video frames to be selected.
6. A video playback system, the playback system comprising:
the first obtaining unit is used for obtaining the corresponding relation between the frame number of each video frame in the video to be played and the playing time point under the first video playing rule, and the corresponding relation is used as a first corresponding relation;
the second obtaining unit obtains the corresponding relation between the frame number of each video frame in the video to be played and the playing time point based on a second video playing rule as a second corresponding relation;
the processing unit is used for adjusting the starting time point according to the deviation of the first corresponding relation and the second corresponding relation when the starting time point is selected for the video to be played, so as to obtain the time point to be played, wherein the video frame played by the video to be played at the time point to be played under the second video playing rule is consistent with the video frame played by the video to be played at the starting time point under the first video playing rule;
The playing unit is used for playing the video to be played at the time point to be played when the video to be played is played;
the playing system further comprises: a starting time point determining unit, configured to obtain, as a video frame to be selected, a video frame with a shortest time interval between a playing time point and the preselected time point of the video to be played;
and determining the starting time point according to the video frame to be selected.
7. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the video playing method according to any one of claims 1 to 5 when executing the program stored in the memory.
8. A computer-readable storage medium storing one or more programs executable by one or more processors to implement the video playback method of any one of claims 1-5.
CN202111050395.2A 2021-09-08 2021-09-08 Video playing method, system, electronic equipment and storage medium Active CN113923495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111050395.2A CN113923495B (en) 2021-09-08 2021-09-08 Video playing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111050395.2A CN113923495B (en) 2021-09-08 2021-09-08 Video playing method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113923495A CN113923495A (en) 2022-01-11
CN113923495B true CN113923495B (en) 2024-01-12

Family

ID=79234435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111050395.2A Active CN113923495B (en) 2021-09-08 2021-09-08 Video playing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113923495B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3070947A1 (en) * 2015-03-17 2016-09-21 Huawei Technologies Co., Ltd. Video frame decoding method and apparatus
WO2017096961A1 (en) * 2015-12-11 2017-06-15 乐视控股(北京)有限公司 Video playing processing method, player, and terminal device
CN108184158A (en) * 2017-12-29 2018-06-19 深圳华侨城卡乐技术有限公司 A kind of method and system that video is played simultaneously
WO2018161843A1 (en) * 2017-03-10 2018-09-13 杭州海康威视数字技术股份有限公司 Method and device for adjusting video playback speed
WO2019109650A1 (en) * 2017-12-06 2019-06-13 香港乐蜜有限公司 Video playing method and apparatus, and electronic device
CN109996115A (en) * 2017-12-29 2019-07-09 深圳华侨城卡乐技术有限公司 Video broadcasting method, storage medium and player based on multiwindow rendering
CN110177293A (en) * 2019-05-28 2019-08-27 南京南方电讯有限公司 A kind of synchronization multicast and video retransmission method, system
CN110430445A (en) * 2019-06-26 2019-11-08 北京拙河科技有限公司 A kind of audio video synchronization playback method, device, equipment and medium
CN111031385A (en) * 2019-12-20 2020-04-17 北京爱奇艺科技有限公司 Video playing method and device
CN111586461A (en) * 2020-04-08 2020-08-25 微梦创科网络科技(中国)有限公司 Live broadcasting method and system for synchronous playing of multiple paths of streams
CN111669645A (en) * 2020-06-12 2020-09-15 腾讯科技(深圳)有限公司 Video playing method and device, electronic equipment and storage medium
CN112911343A (en) * 2021-01-18 2021-06-04 北京奇艺世纪科技有限公司 Multi-channel video playing method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10789781B2 (en) * 2018-09-03 2020-09-29 Playdeo Limited Interactive frame-synchronized augmented video
US11228800B2 (en) * 2019-12-31 2022-01-18 Sling TV L.L.C. Video player synchronization for a streaming video system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3070947A1 (en) * 2015-03-17 2016-09-21 Huawei Technologies Co., Ltd. Video frame decoding method and apparatus
WO2017096961A1 (en) * 2015-12-11 2017-06-15 乐视控股(北京)有限公司 Video playing processing method, player, and terminal device
WO2018161843A1 (en) * 2017-03-10 2018-09-13 杭州海康威视数字技术股份有限公司 Method and device for adjusting video playback speed
WO2019109650A1 (en) * 2017-12-06 2019-06-13 香港乐蜜有限公司 Video playing method and apparatus, and electronic device
CN108184158A (en) * 2017-12-29 2018-06-19 深圳华侨城卡乐技术有限公司 A kind of method and system that video is played simultaneously
CN109996115A (en) * 2017-12-29 2019-07-09 深圳华侨城卡乐技术有限公司 Video broadcasting method, storage medium and player based on multiwindow rendering
CN110177293A (en) * 2019-05-28 2019-08-27 南京南方电讯有限公司 A kind of synchronization multicast and video retransmission method, system
CN110430445A (en) * 2019-06-26 2019-11-08 北京拙河科技有限公司 A kind of audio video synchronization playback method, device, equipment and medium
CN111031385A (en) * 2019-12-20 2020-04-17 北京爱奇艺科技有限公司 Video playing method and device
CN111586461A (en) * 2020-04-08 2020-08-25 微梦创科网络科技(中国)有限公司 Live broadcasting method and system for synchronous playing of multiple paths of streams
CN111669645A (en) * 2020-06-12 2020-09-15 腾讯科技(深圳)有限公司 Video playing method and device, electronic equipment and storage medium
CN112911343A (en) * 2021-01-18 2021-06-04 北京奇艺世纪科技有限公司 Multi-channel video playing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113923495A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
CN111291220B (en) Label display method and device, electronic equipment and computer readable medium
CN110062284B (en) Video playing method and device and electronic equipment
US20200356572A1 (en) Search ranking method and apparatus, electronic device and storage medium
TWI526921B (en) Method and device for displaying character string
WO2019024257A1 (en) Method and device for publishing video files
US11561675B2 (en) Method and apparatus for visualization of public welfare activities
CN106055612B (en) Data paging display method and terminal equipment
US20180048860A1 (en) Method and system for measuring quality of video call
CN113868446A (en) Page display method, device, equipment and storage medium
JP2018029986A (en) Information processing unit
CN111163348A (en) Searching method and device based on video playing
US11921983B2 (en) Method and apparatus for visualization of public welfare activities
CN108228278B (en) Method and device for loading video desktop
CN112559884A (en) Method and device for hooking panorama and interest point, electronic equipment and storage medium
CN113923495B (en) Video playing method, system, electronic equipment and storage medium
JP2023504092A (en) Video playback page display method, apparatus, electronic equipment and medium
CN112464301A (en) Image display method and device
EP3896981A1 (en) Method and system for determining video definition, computer device, and storage medium
CN110806909A (en) Method and device for determining page frame dropping information of application program and electronic equipment
CN113365088B (en) Data processing method, data processing apparatus, electronic device, storage medium, and program product
CN112004116B (en) Method, device, electronic equipment and medium for determining object adding mode
JP2020042442A (en) Information providing program, information providing method and information providing device
JP2022017540A5 (en)
CN113420809A (en) Video quality evaluation method and device and electronic equipment
CN113641853A (en) Dynamic cover generation method, device, electronic equipment, medium and program product

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