CN114020940A - Video playing method and device and electronic equipment - Google Patents

Video playing method and device and electronic equipment Download PDF

Info

Publication number
CN114020940A
CN114020940A CN202111272306.9A CN202111272306A CN114020940A CN 114020940 A CN114020940 A CN 114020940A CN 202111272306 A CN202111272306 A CN 202111272306A CN 114020940 A CN114020940 A CN 114020940A
Authority
CN
China
Prior art keywords
video
target
display
target character
data stream
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
CN202111272306.9A
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111272306.9A priority Critical patent/CN114020940A/en
Publication of CN114020940A publication Critical patent/CN114020940A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/48Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/483Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/438Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a video playing method and device and electronic equipment, wherein the method comprises the following steps: receiving a video data stream, and sequentially playing video frames in the video data stream on a display interface; identifying first target characters and the number of the first target characters contained in a current video frame in a playing process; determining browsing completion data of the first target characters based on the display duration of the first target characters and the number of the first target characters; and based on the browsing completion data, pausing the sequential playing of the video frames in the video data stream on the display interface. According to the method and the device, whether the user can read the text content on the display interface within a certain display duration is detected, when the fact that the user cannot read the text content is judged, video playing is automatically paused for the user to resume the video playing after the user finishes reading the text content, the user can completely receive the text information provided by the video, the video watching experience of the user is improved, and the watching efficiency is also improved.

Description

Video playing method and device and electronic equipment
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video playing method and apparatus, and an electronic device.
Background
At present, network video platforms become an important entertainment and recreation mode for people, and in videos pushed by some network video platforms, due to a lot of characters embedded in short video contents, situations that a user does not read the character contents displayed on a video picture and the video picture is jumped to the next frame often occur, so that the user information is not completely received. At present, the user is more dependent on manually pausing the video under the condition, and the operation is complicated and the watching efficiency is low for the user.
Disclosure of Invention
The application aims to provide a video playing method and device and electronic equipment. The method is used for solving the problem that in the existing video playing, because a plurality of characters are embedded in the content, the characters displayed on the video picture are often not read, and the picture jumps.
In a first aspect, an embodiment of the present application provides a video playing method, where the method includes:
receiving a video data stream, and sequentially playing video frames in the video data stream on a display interface;
identifying first target characters and the number of the first target characters contained in a current video frame in the playing process;
when a first target character contained in a video frame is changed into a second target character, determining the display duration of the first target character;
determining browsing completion data of the first target characters based on the display duration of the first target characters and the number of the first target characters;
and based on the browsing completion data, pausing the sequential playing of the video frames in the video data stream on the display interface.
In some possible embodiments, when a first target text included in a video frame changes to a second target text, determining a display duration of the first target text includes:
determining an initial display time t0 of a first target character contained in a current video frame;
when a first target character contained in a video frame is changed into a second target character, determining the ending display time t1 of the first target character;
and determining the display time length of the first target character according to the difference value between the display termination time t1 and the initial display time t 0.
In some of the possible embodiments of the present invention,
determining browsing completion data of the first target characters based on the display duration of the first target characters and the number of the first target characters, wherein the browsing completion data comprises:
obtaining a simulated character output speed according to the ratio of the number of the first target characters to the display duration;
when the simulated character output speed is higher than a preset browsing speed, determining that the browsing completion data of the first target character is as follows: the browsing of the first target character is not completed within the display duration at the preset browsing speed;
or
Determining the number of the preset characters which can be browsed in the display duration according to the product of the preset browsing speed and the display duration;
when the preset number of characters is smaller than the number of the first target characters, determining that the browsing completion data of the first target characters is: and the browsing of the first target character is not finished within the display duration at the preset browsing speed.
In some possible embodiments, pausing the sequential playback of the video frames in the video data stream on the display interface based on the browsing completion data includes:
when the browsing completion data of the first target character is: and when the browsing of the first target characters is not finished within the display duration at the preset browsing speed, sequentially playing the video frames in the video data stream on the display interface in a pause mode.
In some possible embodiments, after the pausing of the sequential playing of the video frames in the video data stream on the display interface, the method further includes:
and responding to a video playing recovery instruction, and recovering to sequentially play the video frames in the video data stream on the display interface.
In some possible embodiments, the resuming the sequential playing of the video frames in the video data stream on the display interface in response to the video playing resuming instruction includes:
when the pause duration is detected to reach the set duration, sequentially playing the video frames in the video data stream on the display interface; or
And when the touch operation on the display interface is detected, restoring to play the video frames in the video data stream on the display interface in sequence.
In some possible embodiments, resuming the sequential playing of the video frames in the video data stream on the display interface when the touch operation on the display interface is detected includes:
and when the sliding operation at any position on the display interface is detected, restoring to sequentially play the video frames in the video data stream on the display interface.
In some possible embodiments, when the sequential playing of the video frames in the video data stream is paused on the display interface, the method further includes:
displaying a bullet frame on the display interface, and displaying the first target character in the bullet frame.
In some possible embodiments, the method further comprises:
and when the video frames in the video data stream are restored to be played on the display interface in sequence in response to the video playing restoration instruction, closing the bullet box and stopping displaying the first target characters.
In a second aspect, an embodiment of the present application provides a video playing apparatus, where the apparatus includes:
the display unit is configured to receive a video data stream and sequentially play video frames in the video data stream on a display interface;
the identification unit is configured to identify a first target character and the number of the first target characters contained in a current video frame in the playing process, and when the first target character contained in the video frame is changed into a second target character, the display time length of the first target character is determined;
a determining unit configured to perform determination of browsing completion data of the first target character based on a display duration of the first target character and the number of the first target character;
a pause unit configured to perform a pause of sequentially playing the video frames in the video data stream on the display interface based on the browsing completion data.
In some possible embodiments, the identification unit is configured to perform:
determining an initial display time t0 of a first target character contained in a current video frame;
when a first target character contained in a video frame is changed into a second target character, determining the ending display time t1 of the first target character;
and determining the display time length of the first target character according to the difference value between the display termination time t1 and the initial display time t 0.
In some possible embodiments, the determining unit is specifically configured to perform:
obtaining a simulated character output speed according to the ratio of the number of the first target characters to the display duration;
when the simulated character output speed is higher than a preset browsing speed, determining that the browsing completion data of the first target character is as follows: the browsing of the first target character is not completed within the display duration at the preset browsing speed;
or
Determining the number of the preset characters which can be browsed in the display duration according to the product of the preset browsing speed and the display duration;
when the preset number of characters is smaller than the number of the first target characters, determining that the browsing completion data of the first target characters is: and the browsing of the first target character is not finished within the display duration at the preset browsing speed.
In some possible embodiments, the suspension unit is specifically configured to perform:
when the browsing completion data of the first target character is: and when the browsing of the first target characters is not finished within the display duration at the preset browsing speed, sequentially playing the video frames in the video data stream on the display interface in a pause mode.
In some possible embodiments, the apparatus further includes a resuming unit, after the pausing unit is configured to perform pausing of the sequential playing of the video frames in the video data stream on the display interface, the resuming unit is specifically configured to perform:
and responding to a video playing recovery instruction, and recovering to sequentially play the video frames in the video data stream on the display interface.
In some possible embodiments, the recovery unit is specifically configured to perform:
when the pause duration is detected to reach the set duration, sequentially playing the video frames in the video data stream on the display interface; or
And when the touch operation on the display interface is detected, restoring to play the video frames in the video data stream on the display interface in sequence.
In some possible embodiments, the recovery unit is specifically configured to perform:
and when the sliding operation at any position on the display interface is detected, restoring to sequentially play the video frames in the video data stream on the display interface.
In some possible embodiments, characterized in that the suspension unit is further configured in particular to execute,
displaying a bullet frame on the display interface, and displaying the first target character in the bullet frame.
In some possible embodiments, the apparatus further comprises a shutdown module, which is specifically configured to perform:
and when the video frames in the video data stream are restored to be played on the display interface in sequence in response to the video playing restoration instruction, closing the bullet box and stopping displaying the first target characters.
In a third aspect, an embodiment of the present application provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the video playback method of any one of the first aspects.
In a fourth aspect, a computer-readable storage medium, wherein instructions, when executed by a processor of a video playback device, enable the video playback device to perform the video playback method of any one of the first aspects.
In a fifth aspect, a computer program product comprising a computer program/instructions for execution by a processor of the video playback method of any of the first aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: when the embedded characters are not completely read in the video playing process, the video is automatically paused, the watching efficiency is improved, and the comprehensive receiving of the user information is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an application environment according to one embodiment of the present application;
fig. 2 is a schematic flowchart of a video playing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a UI interface in video playback according to an embodiment of the application;
FIG. 4 is a detailed flowchart of a video playing method according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a video playback device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of the present application, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In view of the fact that a lot of characters are embedded in the content itself in the related art, the problem that the characters displayed on the video picture are not completely read and the picture jumps often occurs. The application provides a video playing method and device and electronic equipment, which can automatically pause a video, improve watching efficiency and ensure comprehensive user information reception.
In view of the above, the inventive concept of the present application is: whether the user can read the text content on the display interface within a certain display duration is detected, and when the fact that the user cannot read the text content is judged, video playing is automatically paused for the user to resume the video playing after the user finishes reading the text content, so that the user can completely receive the text information provided by the video, the video watching experience of the user is improved, and the watching efficiency is also improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The following describes in detail a video playing method in an embodiment of the present application with reference to the drawings.
Referring to fig. 1, a schematic diagram of an application environment according to an embodiment of the present application is shown.
As shown in fig. 1, the application environment may include, for example, a first video device 101 and a second video device 102, where the first video device 101 receives a video stream and plays the video stream, and the second video device 102 transmits the video stream, where one possible scenario is that a client obtains a video segment from a server and uploads the video segment, that is, views the video stream on a network video platform.
Fig. 2 is a flowchart illustrating a video playing method according to an exemplary embodiment, where, as shown in fig. 2, the video playing method is applied to a client, and includes the following steps:
step 201: receiving a video data stream, and sequentially playing video frames in the video data stream on a display interface.
Specifically, a corresponding video is requested from the server in response to a play request of a user, the server acquires corresponding video stream data after receiving the play request and sends the corresponding video stream data to the client, the client receives the video stream data, the video stream data comprises a plurality of video frames played according to a time sequence, and the video frames are played on the display interface sequentially according to a certain frame rate after receiving the video stream data.
Step 202, identifying a first target character and the number of the first target characters contained in a current video frame in the playing process.
As mentioned above, the video frames are displayed in time sequence, and when each video frame is displayed, the text and the number of texts are identified for the picture corresponding to the current video frame.
The number of characters and characters on the picture corresponding to the video frame can be identified by using an OCR (Optical Character Recognition) technology, and the specific process can refer to the related technology, which is not described herein again.
Step 203, when a first target character contained in the video frame is changed into a second target character, determining the display duration of the first target character.
Specifically, since the same target text may be played in a plurality of consecutive video frames, the display duration in the present application is the duration that the content of the first target text in the video frames changes into the content of the second target text.
Step 204, determining browsing completion data of the first target characters based on the display duration of the first target characters and the number of the first target characters.
Specifically, the browsing completion data of the first target character may be determined in two ways based on the display duration of the first target character and the number of the first target characters:
in the first mode, the simulated character output speed is obtained according to the ratio of the number of the first target characters to the display duration;
when the simulated character output speed is higher than a preset browsing speed, determining that the browsing completion data of the first target character is as follows: the browsing of the first target character is not completed within the display duration at the preset browsing speed;
specifically, the simulated character output speed, that is, the average character number corresponding to the unit time length, which may be seconds, milliseconds, or the like, is obtained according to the ratio of the first target character number to the display time length.
And determining that the average number of the characters is greater than a preset browsing speed, and determining that the first target character cannot be completely browsed in the display time, wherein the preset browsing speed is determined according to the browsing speed of the user for the characters, and can be a reading character number threshold value corresponding to 1s or a reading character number threshold value corresponding to 1 ms.
Specifically, assuming that the number of characters is m, the display time length is t1-t0, i.e., the average number of characters per unit time length is m/(t1-t 0).
The preset browsing speed is a preset threshold n for the number of words read by the user per second, and it is assumed that the number of words read by normal people per second is 5, that is, when m/(t1-t0) >5 is satisfied, it is determined that the first target word cannot be completely browsed in the display time length.
Determining the number of the preset characters which can be browsed in the display duration according to the product of the preset browsing speed and the display duration;
when the preset number of characters is smaller than the number of the first target characters contained in the target video frame, determining that the browsing completion data of the first target characters is: and the browsing of the first target character is not finished within the display duration at the preset browsing speed.
Specifically, the product of the preset browsing speed and the display duration obtains the preset number of browsed characters in the display duration, and whether the user can finish browsing the first target character in the display duration is determined by comparing the preset number of browsed characters with the preset number of characters actually browsable in the display duration.
And step 205, based on the browsing completion data, pausing the sequential playing of the video frames in the video data stream on the display interface.
The video data stream plays video frames at a certain frame rate, the time from the beginning of rendering the first target characters to the display interface to the beginning of playing the second target characters is the time interval, that is, each played target character has a certain duration. In the embodiment of the present disclosure, the display duration is a display duration of the first target character.
As an optional implementation manner, when the browsing completion data of the first target text is: and when the browsing of the first target characters is not finished within the display duration at the preset browsing speed, sequentially playing the video frames in the video data stream on the display interface in a pause mode.
Specifically, in step 203, when the browsing completion data indicates that the browsing operation cannot be completed, in order not to affect the browsing progress of the user, the sequential playing of the video frames in the video data stream is paused on the display interface, so that the user has sufficient time to finish reading.
According to the method and the device, whether the user can read the text content on the display interface within a certain display duration is detected, when the fact that the user cannot read the text content is obtained through judgment, video playing is automatically paused for the user to resume the video playing after the user finishes reading the text content, the user can completely receive the text information provided by the video, the video watching experience of the user is improved, and the watching efficiency is also improved.
As an optional implementation manner, after the sequentially playing the video frames in the video data stream is paused on the display interface, the method further includes: and responding to a video playing recovery instruction, and recovering to sequentially play the video frames in the video data stream on the display interface.
As an optional implementation manner, the resuming the sequential playing of the video frames in the video data stream on the display interface in response to the video playing resuming instruction may adopt any one of the following manners:
mode 1
And when the pause duration is detected to reach the set duration, sequentially playing the video frames in the video data stream on the display interface.
Presetting a set time length, and when the set time length is reached, automatically restoring the system to play the video frames in the video data stream on a display interface in sequence.
The method and the device ensure that a user can read complete text contents within a set time length, and can automatically play the video without influencing the watching of the next video frame.
Mode 2
And when the touch operation on the display interface is detected, restoring to play the video frames in the video data stream on the display interface in sequence.
Presetting the set time length of pause, and actively triggering the display interface to realize the operation of resuming the sequential playing of the video frames in the video data stream on the display interface when the user finishes reading the characters in the video pause state.
When the touch control operation is actively triggered by the user, enough text reading time is provided for the user, and the situation that the user cannot continuously read the text and cannot completely read the text under special conditions in the automatic recovery situation is avoided.
As an optional implementation manner, when the touch operation on the display interface is detected, resuming to play the video frames in the video data stream sequentially on the display interface includes:
and when the sliding operation at any position on the display interface is detected, restoring to sequentially play the video frames in the video data stream on the display interface.
Certainly, if a set time duration is preset, but when the user finishes reading before the set time duration, the user can also actively perform a sliding operation at any position on the display interface to recover the operation of sequentially playing the video frames in the video data stream on the display interface.
As an optional implementation manner, when the sequential playing of the video frames in the video data stream is paused on the display interface, the method further includes:
displaying a bullet frame on the display interface, and displaying the first target character in the bullet frame.
Specifically, when the video frames are paused to be played in sequence, in order to prevent the video frames with the text content from being played completely, the disclosure proposes to display a popup frame on the display interface, wherein the popup frame can be arranged at any position of the display interface, such as the upper, lower, left and right boundaries of the display interface or the middle position of the display interface, and the display popup frame can appear in a manner including but not limited to a floating window. Referring to fig. 3, the floating window 30 is disposed on the display interface 31, so as to prevent that when it is determined that the user cannot read the complete text due to reasons such as processing delay of the processor, the user starts to view the picture of the second target text for the switched second target text, and the floating window is disposed on the display interface, so that not only the text content corresponding to the first target text can be provided for the user, but also the picture presented by the second target text is not blocked.
As an optional implementation manner, when a first target text included in a video frame changes into a second target text, determining a display duration of the first target text includes:
determining an initial display time t0 of a first target character contained in a current video frame;
when a first target character contained in a video frame is changed into a second target character, determining the ending display time t1 of the first target character;
and determining the display time length of the first target character according to the difference value between the display termination time t1 and the initial display time t 0.
Specifically, the present application defines a switching sign of a picture during video playing when a first target text content included in a video frame is changed into a second target text, and because the first target text content may be played through a plurality of video frames when displayed on a display interface, a display duration of the first target text and the second target text is defined and defined by a difference between the termination display time t1 and the initial display time t 0.
The display termination time of the first target character refers to a time when the first target character is completely rendered on the video on the display interface, the video is switched to play the second target character, when the second target character starts to be rendered on the display interface, the rendering of the first target character is completed, and the corresponding complete display of the target character is recorded.
When the number of the first target characters in the picture is too large, the complete browsing of the first target characters cannot be completed according to the conventional browsing speed of the user for the characters.
In the embodiment of the present disclosure, the display duration is determined by using the difference between the time t1 and the time t0, and when it is determined that the display duration of the first target character cannot be completely browsed after the first target character is completely displayed, the video frames are paused to be sequentially played, so that the first target character can be retained on the display interface.
In the embodiment of the present disclosure, the t1 and t0 for determining the display duration of the target text are dynamically updated along with the playing of the target text content, and the specific updating manner is as follows:
in case 1, performing pause processing on a target character sitting on an interface;
when the fact that the first target character cannot be completely browsed in the display duration is determined according to the number of the recognized characters and the display duration of the first target character, under the condition that sequential playing of video frames is paused, when sequential playing of the video frames on a display interface is resumed in response to a video playing resuming instruction, whether the displayed first target character is a picture where the last target character is located needs to be judged, namely whether the video plays the video data stream completely at the time t 1; when the first target character displayed is determined not to be the last video frame and the next video frame is resumed to be played on the display interface, updating t1 to t 0; if the last target character is, the updating of t0 is not required, and the updating of t1 to t0 in the embodiment of the present disclosure means that the value of t0 at the time when the last target character is completely displayed is updated to the value of t 1.
In case 2, the first target character is not subjected to pause processing;
when the first target character is determined to be completely browsed in the display duration according to the number of the recognized characters and the display duration of the first target character, under the condition of sequentially playing video frames and under the condition of needing to sequentially play the video frames, whether the displayed first target character is the last video frame is judged, namely whether the first target character is played at the moment t1 is judged, when the displayed first target character is determined not to be the last target character, the next target character is played on a display interface, namely the second target character, and t1 is updated to t 0. Is the last target word, no update at t0 is required.
As an optional implementation manner, determining browsing completion data of the first target text based on the display duration of the first target text and the number of the first target text includes:
specifically, when the browsing completion data of the target video frame is determined to be, the browsing of the first target character is not completed within the display duration at the preset browsing speed, and the video frames in the video data stream are paused to be played in sequence on the display interface. The displayed first target text cannot be completely browsed in the display time, which indicates that the text content displayed on the display interface from t0 to t1 is not ready for reading completely. At this time, the operation of pausing the sequential playing of the video frames in the video data stream on the display interface is started, so that sufficient time can be provided for the user to finish reading the text content.
As an alternative embodiment, the bullet box is ended in response to an instruction to end the bullet box.
The instruction for ending the bullet frame can be, but is not limited to, presetting bullet frame display time, and automatically ending the bullet frame when the bullet frame display time is exceeded; alternatively, when the sliding operation at any position on the display interface is detected as described above, the pop-up frame is ended.
Referring to fig. 4, a specific flowchart of the video playing method in the embodiment of the present disclosure is described, assuming that the number of the displayed first target characters is m, and the user preset browsing speed is n.
Step 401, sequentially playing video frames in the video data stream on a display interface;
step 402, identifying a first target character contained in a current video frame and the number m of the first target characters in the playing process, and determining an initial display time t0 of the first target character contained in the video frame;
step 403, determine whether the first target text included in the video frame is changed into the second target text, if so, execute step 404, otherwise execute step 412.
Step 404, judging m/(t1-t0) > n;
step 405, when the browsing of the first target character is not completed within the display duration at the preset browsing speed, pausing the sequential playing of the video frames in the video data stream on the display interface;
step 406, displaying a popup frame on the display interface, and displaying the first target character in the popup frame;
step 407, when a touch operation on the display interface is detected, resuming to play the video frames in the video data stream sequentially on the display interface;
step 408, judging whether the played first target character is the picture of the last target character;
step 409, when the played first target character is determined not to be the picture of the last target character and the next target character is resumed to be played on the display interface, updating t1 to t0 and returning to step 402;
if the played target text is the last video frame, step 415 is performed;
step 410, determining that the characters in the first target characters can be completely browsed in the display duration, and judging whether the displayed first target characters are the last video frame;
step 411, when the displayed first target character is not the screen where the last target character is located, playing the next target character on the display interface, updating t1 to t0, and returning to step 402;
if the first target character is the last target character, then go to step 415;
step 412, judging the operation of pausing or sequentially playing the video executed by the last target character if the character content is not changed;
step 413, when the previous target character is played and the pause sequence is executed to play the target character, then step 405 is executed;
step 414, when the video frame is not executed to pause in sequence when the previous target character is displayed, execute step 410;
step 415, end.
Example 2
Based on the same inventive concept, the present application further provides a video playing apparatus 500, as shown in fig. 5, the apparatus comprising:
a display unit 501 configured to receive a video data stream and sequentially play video frames in the video data stream on a display interface;
the identifying unit 502 is configured to identify a first target character and the number of the first target characters included in a current video frame in the playing process, and determine a display duration of the first target character when the first target character included in the video frame changes into a second target character;
a determining unit 503 configured to perform determining browsing completion data of the first target text based on a display duration of the first target text and the number of the first target text;
a pausing unit 504 configured to perform pausing of sequential playing of video frames in the video data stream on the display interface based on the browsing completion data.
Optionally, the identifying unit 502 is configured to perform:
determining an initial display time t0 of a first target character contained in a current video frame;
when a first target character contained in a video frame is changed into a second target character, determining the ending display time t1 of the first target character;
and determining the display time length of the first target character according to the difference value between the display termination time t1 and the initial display time t 0.
Optionally, the determining unit 503 is specifically configured to perform:
obtaining a simulated character output speed according to the ratio of the number of the first target characters to the display duration;
when the simulated character output speed is higher than a preset browsing speed, determining that the browsing completion data of the first target character is as follows: the browsing of the first target character is not completed within the display duration at the preset browsing speed;
or
Determining the number of the preset characters which can be browsed in the display duration according to the product of the preset browsing speed and the display duration;
when the preset number of characters is smaller than the number of the first target characters, determining that the browsing completion data of the first target characters is: and the browsing of the first target character is not finished within the display duration at the preset browsing speed.
Optionally, the suspending unit 504 is specifically configured to perform:
when the browsing completion data of the first target character is: and when the browsing of the first target characters is not finished within the display duration at the preset browsing speed, sequentially playing the video frames in the video data stream on the display interface in a pause mode.
Optionally, the apparatus further includes a resuming unit 505, where after the pausing unit 504 is configured to perform pausing of the sequential playing of the video frames in the video data stream on the display interface, the resuming unit 505 is specifically configured to perform:
and responding to a video playing recovery instruction, and recovering to sequentially play the video frames in the video data stream on the display interface.
Optionally, the recovery unit 505 is specifically configured to perform:
when the pause duration is detected to reach the set duration, sequentially playing the video frames in the video data stream on the display interface; or
And when the touch operation on the display interface is detected, restoring to play the video frames in the video data stream on the display interface in sequence.
Optionally, the recovery unit 505 is specifically configured to perform:
and when the sliding operation at any position on the display interface is detected, restoring to sequentially play the video frames in the video data stream on the display interface.
Optionally, the suspending unit 504 is further specifically configured to execute,
displaying a bullet frame on the display interface, and displaying the first target character in the bullet frame.
Optionally, the apparatus further comprises a shutdown module 506, which is specifically configured to perform:
and when the video frames in the video data stream are restored to be played on the display interface in sequence in response to the video playing restoration instruction, closing the bullet box and stopping displaying the first target characters.
Having described the video playback method and apparatus of the exemplary embodiments of the present application, an electronic device according to another exemplary embodiment of the present application is described next.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the video playback method according to various exemplary embodiments of the present application described above in the present specification.
The electronic apparatus 130 according to this embodiment of the present application, i.e., the above-described video playback apparatus, is described below with reference to fig. 6. The electronic device 130 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a video playing method provided by the present application may also be implemented in the form of a program product, which includes program code for causing a computer device to perform the steps of a video playing method according to various exemplary embodiments of the present application described above in this specification, when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for monitoring of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and block diagrams, and combinations of flows and blocks in the flow diagrams and block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A video playback method, the method comprising:
receiving a video data stream, and sequentially playing video frames in the video data stream on a display interface;
identifying first target characters and the number of the first target characters contained in a current video frame in the playing process;
when a first target character contained in a video frame is changed into a second target character, determining the display duration of the first target character;
determining browsing completion data of the first target characters based on the display duration of the first target characters and the number of the first target characters;
and based on the browsing completion data, pausing the sequential playing of the video frames in the video data stream on the display interface.
2. The method of claim 1, wherein determining the display duration of a first target text included in a video frame when the first target text changes to a second target text comprises:
determining an initial display time t0 of a first target character contained in a current video frame;
when a first target character contained in a video frame is changed into a second target character, determining the ending display time t1 of the first target character;
and determining the display time length of the first target character according to the difference value between the display termination time t1 and the initial display time t 0.
3. The method of claim 1, wherein determining browsing completion data for the first target text based on the display duration of the first target text and the number of the first target text comprises:
obtaining a simulated character output speed according to the ratio of the number of the first target characters to the display duration;
when the simulated character output speed is higher than a preset browsing speed, determining that the browsing completion data of the first target character is as follows: the browsing of the first target character is not completed within the display duration at the preset browsing speed;
or
Determining the number of the preset characters which can be browsed in the display duration according to the product of the preset browsing speed and the display duration;
when the preset number of characters is smaller than the number of the first target characters, determining that the browsing completion data of the first target characters is: and the browsing of the first target character is not finished within the display duration at the preset browsing speed.
4. The method of claim 3, wherein pausing the sequential playback of video frames in the video data stream on the display interface based on the browsing completion data comprises:
when the browsing completion data of the first target character is: and when the browsing of the first target characters is not finished within the display duration at the preset browsing speed, sequentially playing the video frames in the video data stream on the display interface in a pause mode.
5. The method of claim 1, wherein after the pausing of the sequential playing of the video frames in the video data stream on the display interface, further comprising:
and responding to a video playing recovery instruction, and recovering to sequentially play the video frames in the video data stream on the display interface.
6. The method of claim 5, wherein resuming the sequential playing of the video frames in the video data stream on the display interface in response to the video playback resume instruction comprises:
when the pause duration is detected to reach the set duration, sequentially playing the video frames in the video data stream on the display interface; or
And when the touch operation on the display interface is detected, restoring to play the video frames in the video data stream on the display interface in sequence.
7. A video playback apparatus, comprising:
the display unit is configured to receive a video data stream and sequentially play video frames in the video data stream on a display interface;
the identification unit is configured to identify a first target character and the number of the first target characters contained in a current video frame in the playing process, and when the first target character contained in the video frame is changed into a second target character, the display time length of the first target character is determined;
a determining unit configured to perform determination of browsing completion data of the first target character based on a display duration of the first target character and the number of the first target character;
a pause unit configured to perform a pause of sequentially playing the video frames in the video data stream on the display interface based on the browsing completion data.
8. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a video playback apparatus, enable the video playback apparatus to perform the video playback method of any one of claims 1 to 7.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs, when executed by a processor, implement the video playback method of any of claims 1-7.
CN202111272306.9A 2021-10-29 2021-10-29 Video playing method and device and electronic equipment Pending CN114020940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111272306.9A CN114020940A (en) 2021-10-29 2021-10-29 Video playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111272306.9A CN114020940A (en) 2021-10-29 2021-10-29 Video playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114020940A true CN114020940A (en) 2022-02-08

Family

ID=80058858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111272306.9A Pending CN114020940A (en) 2021-10-29 2021-10-29 Video playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114020940A (en)

Similar Documents

Publication Publication Date Title
CN107172454B (en) Video recommendation method, medium, device and computing equipment
US9715901B1 (en) Video preview generation
EP3193509B1 (en) Video advertisement filtering method, device and equipment
CN113424553B (en) Method and system for playback of media items
CN103517143A (en) Method, device and terminal device for playing network video
CN109104631B (en) Video display method and device
CN112866809A (en) Video processing method and device, electronic equipment and readable storage medium
CN113676761B (en) Multimedia resource playing method and device and main control equipment
CN113556568A (en) Cloud application program operation method, system, device and storage medium
CN106878773B (en) Electronic device, video processing method and apparatus, and storage medium
CN114020940A (en) Video playing method and device and electronic equipment
CN109739607B (en) Dynamic image loading method, device, equipment and storage medium
CN108632657B (en) Subtitle display method, storage medium and smart television
CN111467797B (en) Game data processing method and device, computer storage medium and electronic equipment
CN107592561B (en) Screen saver display method, device, intelligent remote controller and computer readable storage medium
US10558697B2 (en) Segmenting a set of media data using a set of social networking data
CN105808629A (en) Webpage processing method and apparatus
CN110225391B (en) Video playing control method and device, electronic equipment and storage medium
CN110503010B (en) Material display method, device, electronic device and storage medium
CN113457130B (en) Game content playback method and device, readable storage medium and electronic equipment
CN115119033B (en) Sound and picture synchronization method and device, storage medium and electronic equipment
WO2024131098A1 (en) Display device and audio recognition method
CN113296942B (en) Message adjusting method, message adjusting device, storage medium and electronic equipment
US10897593B2 (en) Multiple tape video data splitter
CN117812295A (en) Display equipment and method for continuously playing media assets

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