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

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

Info

Publication number
CN117793405A
CN117793405A CN202311754288.7A CN202311754288A CN117793405A CN 117793405 A CN117793405 A CN 117793405A CN 202311754288 A CN202311754288 A CN 202311754288A CN 117793405 A CN117793405 A CN 117793405A
Authority
CN
China
Prior art keywords
video
event
target
playing
initial
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
CN202311754288.7A
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202311754288.7A priority Critical patent/CN117793405A/en
Publication of CN117793405A publication Critical patent/CN117793405A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a video playing method, a device, equipment and a storage medium, wherein the video playing method comprises the following steps: performing event analysis on the acquired initial video, and determining event video and non-event video in the initial video, wherein the event video characterizes video corresponding to a target event detected in the initial video; cutting the non-event video based on a target play strategy determined by the current residual electric quantity of the terminal equipment to obtain a cut non-event video; determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video; and playing the video to be played. By the aid of the scheme, video playing efficiency can be improved, and energy consumption of video playing can be reduced.

Description

Video playing method, device, equipment and storage medium
Technical Field
The present application relates to the field of security technologies, and in particular, to a video playing method, device, equipment, and storage medium.
Background
With the rapid development of computer, network communication, image processing and other technologies, video security technology is widely applied to various scenes with good timeliness, intuitiveness and accuracy.
Currently, in application scenarios where wiring is inconvenient or the wiring cost is high, a low-power consumption camera is mainly used to meet service requirements, and low-power consumption equipment generally accesses a network based on WIFI or 4G/5G and is powered by an equipment battery. Low power devices, while convenient, are limited to battery powered devices, can lead to device cruising ability catching the forepart.
Common solutions include optimizing wake-up strategies for low power devices to promote cruising and the like that appear to be coaster salaries, and therefore, a more efficient method to reduce the power consumption of the device is highly desirable.
Disclosure of Invention
The application provides at least one video playing method, device and equipment and a computer readable storage medium.
The first aspect of the present application provides a video playing method, including: performing event analysis on the obtained initial video, and determining event video and non-event video in the initial video, wherein the event video characterizes video corresponding to a target event detected in the initial video; cutting the non-event video based on a target playing strategy determined by the current residual electric quantity of the terminal equipment to obtain a cut non-event video; determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video; and performing playing processing on the video to be played.
In an embodiment, the step of clipping the non-event video based on the target play policy determined by the current remaining power of the terminal device to obtain a clipped non-event video includes: determining a corresponding target electric quantity interval from preset electric quantity intervals according to the current residual electric quantity; taking a video playing strategy corresponding to the target electric quantity interval as the target playing strategy, wherein the video playing strategy is respectively set based on different preset electric quantity intervals; and cutting the duration of the non-event video based on the target playing strategy to obtain the cut non-event video.
In an embodiment, the preset power interval includes a high power interval, a medium power interval, and a low power interval, the video playing policy includes a short clipping mode, a medium clipping mode, and a long clipping mode, and the step of clipping the duration of the non-event video based on the target playing policy to obtain the clipped non-event video includes: if the target electric quantity interval is the Gao Dianliang interval, cutting the duration of the non-event video based on the short cutting mode to obtain the cut non-event video; if the target electric quantity interval is the middle electric quantity interval, cutting the duration of the non-event video based on the middle cutting mode to obtain the cut non-event video, wherein the cutting proportion of the middle cutting mode to the non-event video is larger than that of the short cutting mode to the non-event video; and if the target electric quantity interval is the low electric quantity interval, cutting the duration of the non-event video based on the long cutting mode to obtain the cut non-event video, wherein the cutting proportion of the long cutting mode to the non-event video is larger than that of the medium cutting mode to the non-event video.
In an embodiment, if the target power interval is the low power interval, cutting the duration of the non-event video based on the long cutting mode to obtain the cut non-event video, where the step includes: acquiring target detection time for detecting a target object in the event video; judging whether the event starting time of the event video is earlier than the target detection time; if yes, the cutting proportion of the long cutting mode is increased.
In an embodiment, the step of determining the video to be played in the initial video based on the common period of the clipped non-event video and the event period of the event video includes: determining a period to be played based on the common period of the cut non-event video and the event period of the event video; and cutting the initial video based on the to-be-played time period to obtain the to-be-played video.
In an embodiment, the step of playing the video to be played includes: detecting whether a picture jump phenomenon exists in the playing process of the video to be played; if yes, marking the target object detected after the picture jump phenomenon occurs in the video to be played by adopting a marking mode different from the marking mode of the target object detected before the picture jump phenomenon occurs.
In an embodiment, the step of performing event analysis on the obtained initial video and determining the event video and the non-event video in the initial video includes: carrying out event analysis on the initial video based on the acquired event template to obtain event start time and event end time; the event record is determined based on the event start time and event end time, and the non-event record is determined based on the initial start time and initial end time of the initial record.
A second aspect of the present application provides a video playback device, including: the analysis module is used for carrying out event analysis on the obtained initial video, determining event video and non-event video in the initial video, and representing video corresponding to the target event detected in the initial video by the event video; the clipping module is used for clipping the non-event video based on a target play strategy determined by the current residual electric quantity of the terminal equipment to obtain a clipped non-event video; the video determining module is used for determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video; and the playing module is used for playing the video to be played.
A third aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory, so as to implement the video playing method.
A fourth aspect of the present application provides a computer readable storage medium having program instructions stored thereon, which when executed by a processor, implement the video playback method described above.
According to the scheme, event analysis is carried out on the obtained initial video, so that event video of a target event and non-event video of an event which does not occur in the initial video are determined; determining a proper target playing strategy based on the current residual electric quantity of the terminal equipment, and cutting the obtained non-event video, so that the playing time of the non-event video without the event is shortened, and the cut non-event video is obtained; determining a time period to be played in the initial video based on a common time period corresponding to the cut non-event video and an event time period corresponding to the event video, and obtaining a video to be played corresponding to the time period to be played; compared with the conventional video playing process, the non-event video part is cut, so that the video playing process is more focused on event video of an event, video playing efficiency can be improved, energy consumption of terminal equipment can be reduced, and particularly, cruising ability can be remarkably improved for low-power-consumption equipment.
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 application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the technical aspects of the application.
FIG. 1 is a flow chart of an exemplary embodiment of a video playback method of the present application;
FIG. 2 is a schematic diagram of an exemplary initial video recording method according to the present application;
FIG. 3 is a block diagram of a video playback device according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of an electronic device of the present application;
fig. 5 is a schematic structural view of an embodiment of the computer-readable storage medium of the present application.
Detailed Description
The following describes the embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
For easy understanding, an exemplary description will be made of a scenario applicable to the present application, where the video playing method of the present application may be applied to a terminal device, and the terminal device may be, but is not limited to, a low-power image capturing device or a common long-power image capturing device (such as a device with a non-battery power supply mode such as a power adapter/POE), etc., but relatively speaking, the low-power device is more required to use the video playing method of the present application to reduce power consumption of the device and increase endurance time, so the following description will mainly be given by taking the low-power device as an example.
For example, with rapid development of technologies such as computers, network communication, and image processing, video security technology is widely used in various scenes. For the situations of inconvenient wiring or high wiring cost, the low-power consumption camera is mainly used to reduce wiring requirements, and low-power consumption equipment usually accesses to a network based on WIFI or 4G/5G wireless communication technologies and is powered by a battery of the equipment. Low power devices, while convenient, are limited to battery powered devices, can lead to device cruising ability catching the forepart. Common methods include optimizing a wake-up policy of the low-power device to promote endurance, or reducing a function of a power-consuming element of the low-power device to save power consumption (such as turning off a lift light, a light supplement light, or a prompt tone of the low-power device), and the like.
For the image acquisition device, such as a low-power consumption camera, the process of consuming large power is a playing process of outputting the image except for the image acquisition process. However, in the image capturing process, the image capturing device typically performs image capturing in response to the detected target event, but does not stop image capturing immediately due to the end of the target event, for example, stopping image capturing after the end of the target event and the detection that the current frame remains stationary for a period of time may result in capturing a portion of the still frame where the target event does not exist. Therefore, the video with a part of time periods in the initial video obtained finally is an event video which needs to be focused, and the video with a part of time periods is a non-event video which does not need to be focused; if the warning signal generated by the detection of the occurrence of the target event and the end of the target event is used as a boundary, the non-event video acquired before the event video is called as pre-alarm video, and the non-event video acquired after the event video is called as post-alarm video.
Referring to fig. 1, fig. 1 is a flowchart illustrating an exemplary embodiment of a video playing method according to the present application. Specifically, the method may include the steps of:
Step S110, carrying out event analysis on the obtained initial video, and determining event video and non-event video in the initial video, wherein the event video characterizes video corresponding to the target event detected in the initial video.
The event analysis may be based on characteristic information or change information of the picture content in the initial video, or may be combined with other elements (such as a sensor capable of sensing an object, such as a laser radar) provided on the low-power device for analysis, which is not limited herein.
For example, the target event to be detected is that an object in a motion state exists in a target scene detected by the low-power consumption device; and when the picture content in the initial video is changed or the laser radar senses a moving object, the target event is represented. Therefore, the partial video corresponding to the occurrence of the target event in the initial video is determined as the event video, and the partial video corresponding to the non-occurrence of the target event in the initial video is determined as the non-event video. The number of event videos and the number of non-event videos which can be included in one section of initial video are not limited, and one section of initial video can include multiple sections of event videos and non-event videos.
Another exemplary, for example, target event to be detected is the presence of a person or vehicle in a target scene detected by a low power device; when it is determined by analyzing the picture characteristics of the initial video that a person or vehicle is detected within a certain period, it is characterized that a target event has occurred within the period. Therefore, the partial video corresponding to the time period when the target event occurs in the initial video is determined as the event video, and the partial video corresponding to the time period when the target event does not occur in the initial video is determined as the non-event video.
Step S120, clipping the non-event video based on the target play strategy determined by the current residual capacity of the terminal device to obtain the clipped non-event video.
It can be understood that, although the cutting process is performed on the non-event video to reduce the time for playing the non-event video, the playing efficiency can be improved, and the power consumption in the video playing process can be reduced, if the cutting process is improper, phenomena such as frame jump, information omission and the like can be caused, and besides the user experience is reduced, the functional effect of the terminal device can be greatly reduced, but the terminal device cannot be damaged.
Therefore, in the application, a plurality of preset playing strategies corresponding to the terminal equipment in different residual electric quantities can be preset, and a target playing strategy is selected in the preset playing strategies based on the current residual electric quantity of the terminal equipment so as to realize video playing according to the playing strategy which is determined to be most suitable for the terminal equipment according to the current residual electric quantity of the terminal equipment, so that pictures in the video playing process are continuous as much as possible, and video playing energy consumption and video playing effects are considered.
Specifically, different play strategies include different video clipping modes, and the video clipping modes can be used for clipping the video duration of the initial video, especially clipping the non-event video so as to shorten the duration of the non-event video, and obtaining the clipped non-event video.
Step S130, determining the video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video.
In addition, the acquired image or video is corresponding to a time axis of the acquisition process in the acquisition process of the image acquisition device, which is equivalent to time information existing in the acquired initial video, and is also time-recorded at a plurality of key frames, for example, time-recorded at the beginning of the video, time-recorded when the occurrence of the target event is detected, time-recorded when the end of the video is detected, time corresponding to cutting processing in the recorded video, and the like.
Therefore, the time period (i.e. the ordinary time period) of the cut non-event video and the time period (i.e. the event time period) of the event video can be determined according to the one or more types of time information, and the time period of the video to be played, which needs to be played, is determined in the initial video according to the ordinary time period and the event time period, namely the video to be played can be obtained.
The method for obtaining the video to be played may be to directly read the video segment corresponding to the common time period and the event time period in the initial video to obtain the video to be played; or based on the common time period and the event time period, cutting the initial video to obtain target video segments corresponding to the common time period and the event time period respectively (namely, the cut non-event video and event video are extracted from the initial video), and splicing the target video segments to obtain the video to be played.
Step S140, performing playback processing on the video to be played.
It can be understood that the playing process is performed on the video to be played obtained after the processing steps, compared with the traditional video playing method, the playing time of the non-event video is shortened, so that the part of the event video can be focused, the playing efficiency is improved, and meanwhile, the electric quantity loss in the playing process is also saved.
According to the method, the obtained initial video is subjected to event analysis, so that the event video of the target event and the non-event video of the non-event are determined in the initial video; determining a proper target playing strategy based on the current residual electric quantity of the terminal equipment, and cutting the obtained non-event video, so that the playing time of the non-event video without the event is shortened, and the cut non-event video is obtained; determining a time period to be played in the initial video based on a common time period corresponding to the cut non-event video and an event time period corresponding to the event video, and obtaining a video to be played corresponding to the time period to be played; compared with the conventional video playing process, the method has the advantages that the non-event video part is cut, so that the event video with events is emphasized in the video playing process, the video playing efficiency can be improved, the energy consumption of terminal equipment can be reduced, and particularly, the cruising ability of low-power-consumption equipment can be remarkably improved.
On the basis of the above embodiment, the steps of clipping the non-event video based on the target playing policy determined by the current residual capacity of the terminal device to obtain the clipped non-event video are described in the embodiments of the present application. Specifically, the method of the embodiment comprises the following steps:
determining a corresponding target electric quantity interval from preset electric quantity intervals according to the current residual electric quantity; taking a video playing strategy corresponding to the target electric quantity interval as a target playing strategy, and setting the video playing strategy based on different preset electric quantity intervals respectively; and cutting the duration of the non-event video based on the target playing strategy to obtain the cut non-event video.
In connection with the foregoing embodiment, the target playing policy may be selected from preset video playing policies, where each video playing policy corresponds to a preset electric quantity interval, and the preset electric quantity interval is used to determine which playing policy is more suitable for video playing based on the current remaining electric quantity of the terminal device.
Illustratively, the current remaining power of the terminal device is obtained, where the current remaining power may be represented by SOC (State Of Charge) (i.e. the ratio of the available power in the battery to the nominal capacity); judging which preset electric quantity interval the current residual electric quantity is in, and obtaining a target electric quantity interval corresponding to the current residual electric quantity; selecting a target playing strategy corresponding to the target electric quantity interval from the video playing strategies, and cutting the duration of the non-event video based on the target playing strategy to obtain the cut non-event video. The different playing strategies comprise different cutting modes, and the different playing strategies can be specifically represented by different cutting proportions, so that the non-event video can be subjected to cutting processing of different proportions according to the difference of the current residual electric quantity of the terminal equipment.
On the basis of the embodiment, the embodiment of the application describes the step of clipping the duration of the non-event video based on the target playing policy to obtain the clipped non-event video, wherein the preset electric quantity interval comprises a high electric quantity interval, a middle electric quantity interval and a low electric quantity interval, and the video playing policy comprises a short clipping mode, a middle clipping mode and a long clipping mode. Specifically, the method of the embodiment comprises the following steps:
if the target electric quantity interval is a high electric quantity interval, cutting the duration of the non-event video based on a short cutting mode to obtain a cut non-event video; if the target electric quantity interval is a middle electric quantity interval, cutting the duration of the non-event video based on a middle cutting mode to obtain a cut non-event video, wherein the cutting proportion of the middle cutting mode to the non-event video is larger than that of the short cutting mode to the non-event video; if the target electricity interval is a low-electricity interval, the length of the non-event video is cut based on a long cutting mode, the cut non-event video is obtained, and the cutting proportion of the long cutting mode to the non-event video is larger than that of the middle cutting mode to the non-event video.
It can be understood that if the electric quantity of the terminal device is sufficient, the video playing effect can be more preferentially ensured in the video playing process; if the electric quantity of the terminal equipment is short, the video playing energy consumption can be guaranteed more preferentially in the video playing process.
The SOC represented by the high electric quantity interval is larger than the SOC represented by the medium electric quantity interval, and the SOC represented by the medium electric quantity interval is larger than the SOC represented by the low electric quantity interval. The cutting proportion of the short cutting mode is smaller than that of the medium cutting mode, and the cutting proportion of the medium cutting mode is smaller than that of the long cutting mode.
If the target power interval is a high power interval, the current residual power representing the terminal device is sufficient, so that more non-event videos can be reserved, the video playing process is coherent and smooth, and the video playing effect is ensured, so that the duration of the non-event videos is cut by using a short cutting mode with a small cutting proportion, and a small part of duration of the non-event videos is cut. For example, dividing the pre-police video in the non-event video into five sections, cutting 1/5 of the pre-police video, and reserving the remaining 4/5 of the pre-police video as the cut non-event video; and equally dividing the post-police video in the non-event video into eleven sections, cutting 2/11 of the post-police video, and reserving the remaining 9/11 of the post-police video as the cut non-event video.
In addition, when the current residual electric quantity of the terminal equipment is sufficient (if the target electric quantity interval is a high electric quantity interval), the original video can be directly played without cutting the pre-alarm video and the post-alarm video corresponding to the event video; and/or the terminal equipment can directly play the initial video when in a charging state. Therefore, the video playing method of the present application may further include the steps of determining a target power interval based on the current remaining power of the terminal device, and directly playing the initial video if the target power interval is a high power interval; if the target electric quantity interval is not the high electric quantity interval, determining a target playing strategy based on the current residual electric quantity of the terminal equipment; carrying out event analysis on the obtained initial video, and determining event video and non-event video in the initial video; cutting the non-event video based on the target playing strategy to obtain a cut non-event video; determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video; and playing the video to be played.
In another example, if the target power interval is a middle power interval, the terminal device is characterized to consume more power, so that more non-event video can be cut off compared with a short cutting mode, so that video playing energy consumption is reduced, and the endurance of the terminal device is ensured, so that the duration of the non-event video is cut off by using a middle cutting mode with a larger cutting proportion. For example, dividing the pre-police video in the non-event video into five sections, cutting 3/5 of the pre-police video, and reserving the remaining 2/5 of the pre-police video as the cut non-event video; and equally dividing the post-police video in the non-event video into eleven sections, cutting out 6/11 of the post-police video, and reserving the rest 5/11 of the post-police video as the cut non-event video.
Still another exemplary embodiment of the present invention is characterized in that if the target power interval is a low power interval, the current remaining power of the terminal device is short, so that more non-event video needs to be cut in comparison with a middle cutting mode, so that video playing energy consumption is reduced to a greater extent, and the endurance of the terminal device is improved, so that the duration of the non-event video is cut by using a long cutting mode with a greater cutting proportion. For example, dividing the pre-police video in the non-event video into five sections, cutting out 4/5 of the pre-police video, and reserving the remaining 1/5 of the pre-police video as the cut non-event video; and equally dividing the post-police video in the non-event video into eleven sections, cutting 9/11 of the post-police video, and reserving the rest 2/11 of the post-police video as the cut non-event video. In addition, the pre-alarm video and the post-alarm video corresponding to the event video can be all cut off, and only the event video is reserved for playing.
Based on the above embodiments, the embodiments of the present application describe the step of clipping the duration of the non-event video based on the long clipping mode to obtain the clipped non-event video if the target power interval is the low power interval. Specifically, the method of the embodiment comprises the following steps:
Acquiring target detection time for detecting a target object in event video; judging whether the event starting time of the event video is earlier than the target detection time; if yes, the cutting proportion of the long cutting mode is increased.
It should be noted that, the start of recording the event video may be caused by a change of the image frame, in this case, the target object is not necessarily detected in the image frame, for example, the target object to be detected is a person, but the terminal device is affected by the movement of the vehicle in the image frame or by the external light, so that the frame is changed, and further, it is determined that the event time period in which the event video is caused by the current occurrence of the target event is error, so that it may be considered that a portion of the event video that does not need to pay attention to for a certain period may still exist in the event video.
Therefore, in the long cutting mode corresponding to the low-power interval, the target detection time for detecting the target object in the event video is acquired; judging whether the event starting time of the event video is earlier than the target detection time; if the error is earlier, the error can be considered to exist, so that the cutting proportion of the long cutting mode can be increased to cut more videos or the whole police video of the event video is cut; if the video is not earlier than the alarm video, the error is not considered to exist, and the original cutting proportion of the long cutting mode is maintained to cut the police video of the event video.
It should be further noted that, in the same event record, a plurality of different target events may be detected, for example, the target event to be detected includes a movement of a vehicle or a movement of a person, and in the same event record, two target events may occur sequentially or simultaneously. For the situation that the power of the terminal device is very short (for example, the low power interval is (0, 20), and the current remaining power of the terminal device is in the interval of (0, 5)), a certain clipping process may be needed to be performed on the part of the event video, so as to prolong the endurance time as much as possible.
For example, a corresponding priority may be preset for each target event to be detected, and different types of target events may correspond to the same or different priorities, where the different priorities represent target events that need to be focused when the terminal device is under a special condition (such as a condition that the electric quantity is very short). For example, the target event to be detected includes vehicle movement or person movement, the priority of the person movement event is higher than that of the vehicle movement event, if the electric quantity of the terminal device is very short, and the vehicle movement event is detected in the event video first and then the person movement event is detected, cutting only part of the event video corresponding to the vehicle movement event exists in the event video; similarly, if the person moving event is detected in the event video, then the vehicle moving event is detected, and the person moving event is ended before the vehicle moving event, cutting the event video of which only part of the event video corresponding to the vehicle moving event exists in the event video; if two types of events occur simultaneously, the event video can be kept according to the method of the previous embodiment.
On the basis of the above embodiments, the embodiments of the present application describe the step of determining the video to be played in the initial video based on the common period of the cut non-event video and the event period of the event video. Specifically, the method of the embodiment comprises the following steps:
determining a period to be played based on the common period of the cut non-event video and the event period of the event video; and cutting the initial video based on the time interval to be played to obtain the video to be played.
As described in connection with the foregoing embodiments, it may be known that the cut non-event video and the event video are video to be played, which is required to be played by the terminal device, so that the time period to be played of the video to be played may be obtained by determining the normal time period of the cut non-event video and the event time period of the event video.
Further, the initial video may be cut based on the period to be played, a video portion outside the period to be played in the initial video may be cut, and a video portion corresponding to the period to be played may be reserved, so as to obtain the video to be played.
Optionally, in addition to the method of clipping the initial video based on the period to be played, the clipping of the initial video may not be performed, and only the video portion corresponding to the period to be played is played when the initial video is played, and other video portions may be skipped or played at double speed.
On the basis of the above embodiments, the steps of playing the video to be played will be described in the embodiments of the present application. Specifically, the method of the embodiment comprises the following steps:
detecting whether a picture jump phenomenon exists in the playing process of the video to be played; if yes, marking the target object detected after the picture jump phenomenon occurs in the video to be played by adopting a marking mode different from the marking mode of the target object detected before the picture jump phenomenon occurs.
In the application scenario of the present application, the initial video may include multiple sub-videos (i.e., multiple event videos and non-event videos), and the video to be played is composed of multiple sub-videos. Therefore, in the process of playing the video to be played, if the non-event video is cut before, the phenomenon of frame jump may occur when the multiple segments of sub-videos are continuously played, so that the frame content in the previous segment of sub-video and the frame content in the next segment of sub-video have larger phase difference, which is easy to confuse the viewer and reduce the viewing experience.
Therefore, if the picture jump phenomenon exists in the playing process of the video to be played, the target object detected after the picture jump phenomenon is marked by adopting a marking mode different from the marking mode of the target object detected before the picture jump phenomenon. For example, a first object detected before the occurrence of the picture transition phenomenon is marked with a green detection frame, and if the presence of the picture transition is detected, a second object detected after the picture transition phenomenon is marked with a red detection frame. The first target object and the second target object may be the same target object or different target objects, which are not limited herein, and different marking modes are convenient for prompting the user that the scene jump occurs here.
On the basis of the above embodiment, the embodiment of the present application will describe the steps of performing event analysis on the obtained initial video and determining the event video and the non-event video in the initial video. Specifically, the method of the embodiment comprises the following steps:
carrying out event analysis on the initial video based on the acquired event template to obtain event starting time and event ending time; an event record is determined based on the event start time and the event end time, and a non-event record is determined based on the initial start time and the initial end time of the initial record.
As described in connection with the previous embodiments, the event templates may be preset to indicate that the terminal device needs to analyze the detected target event in the initial video recording.
For example, when the terminal device detects that the characteristics of the current picture are matched with the characteristics of the event template, it is determined that the target event is detected, so that the current time can be recorded as the event starting time and video recording can be continuously performed; when the terminal equipment detects that the characteristics of the current picture and the characteristics of the event template are not matched, the terminal equipment judges that the detected target event is ended, so that the current time can be recorded as the event ending time. The time period of the event video can be determined in the obtained initial video by the event start time and the event end time.
Further, based on the time when the initial video recording starts to be recorded as the initial starting time and the time when the initial video recording ends to be recorded as the initial ending time, the time when the non-event video recording is located in the initial video recording can be determined based on the initial starting time, the initial ending time, the event starting time and the event ending time. For example, for a period of time when only one event recording exists in one initial recording, if the event starting time of the event recording is different from the initial starting time of the initial recording, a period of time when no event recording exists (i.e., a period of time when a police recording is performed) can be determined based on the initial starting time and the event starting time; if the event starting time of the event video is the same as the initial starting time of the initial video, the fact that the pre-alarm video does not exist in the initial video is characterized. Similarly, if the event end time of the event video is different from the initial end time of the initial video, determining a period of non-event video (i.e. a period of post-police video) based on the initial end time and the event end time; if the event end time of the event video is the same as the initial end time of the initial video, the fact that the post-alarm video does not exist in the initial video is characterized.
As another example, the foregoing example may be similarly generalized to a case where there are multiple event videos in one initial video, that is, there may be a non-event video between every two adjacent event videos. Therefore, in addition to determining the first non-event recording (pre-alarm recording) and the last non-event recording (post-alarm recording) in the initial recording, the event end time of the previous event recording in the two adjacent event recordings may be used as the start time of the non-event recording in the two adjacent event recordings, and the event start time of the next event recording in the two adjacent event recordings may be used as the end time of the non-event recording in the two adjacent event recordings, so that the corresponding period of the non-event recording in the middle of the initial recording may be determined.
On the basis of the above embodiment, it should be further noted that, because the current low-power consumption camera mostly adopts a discontinuous video mode, the camera is awakened to collect images when the picture changes or the target object is detected, and event messages obtained after detection based on the collected images are sent to the cloud platform, and then are pushed to the client device (such as the mobile phone APP) after being stored by the cloud platform. If the low-power consumption camera detects that the current picture is unchanged or the picture is in a static state for a preset time, the video recording can be ended, and the video recording enters a sleep mode, which is equivalent to the video recording after the police in the example is generated. Therefore, the image data collected in the low power consumption camera due to the discontinuous recording mode is often intermittent recording segments.
In order to reduce the problem of a large number of files or video segments which are obtained due to the acquisition in the discontinuous video mode, if the occurrence of the target event is detected again in the post-alarm video, the newly detected event video, the previously detected event video and the post-alarm video can be combined into a whole video, and the situation that one initial video comprises multiple event videos is also obtained; for example, even if the low-power consumption camera detects that the target event is over, image acquisition (after-alarm video recording) is performed for a preset time period (for example, 10 s), if the target event is not detected within the preset time period, the image acquisition is stopped to enter a sleep mode, if the target event is detected within the preset time period, the image acquisition is continuously performed on the target event to obtain a new event video, and the new event video, the after-alarm video recording and the previous event video recording are spliced into a whole video. Referring to fig. 2, fig. 2 is an exemplary initial video schematic diagram in the video playing method of the present application, where dark bands refer to event videos and light bands refer to non-event videos, so that it can be known that in the process of actually playing the initial video, more common periods of non-event videos may be more concentrated between two adjacent event videos.
It should be noted that the present application is not limited to a specific cutting method. The clipping mode may clip the middle section part video of the non-event video based on clipping proportion, clip the front section part video of the non-event video, or clip the rear section part video of the non-event video. If only one event video and two non-event videos (namely, pre-alarm video and post-alarm video) exist in one initial video, the event video is between the pre-alarm video and the post-alarm video, then the time period far away from the event video in the non-event video can be cut, namely, the front part video of the pre-alarm video is cut, and the rear part video of the post-alarm video is cut; if there are multiple event videos and multiple non-event videos in one initial video as shown in fig. 2, then the non-event videos between two adjacent event videos may be cut out for part of the videos in the middle.
It will be appreciated that for the pre-alarm video and post-alarm video shown in fig. 2, the results are mainly due to the detection of the target event, for example: even if the target event in the event video is finished, a certain preset time length is set to judge whether the target event still occurs within the preset time length, so that video playing is continuous, and a part of common video in which the target event does not occur is caused; therefore, in some embodiments, the portion of the pre-alarm video and/or the post-alarm video caused by the preset duration may be recorded as an event video instead of a non-event video, that is, the event video may have a video portion in which the target event is not detected; and the video which does not belong to the preset time period and does not detect the target event can still be recorded as non-event video.
Optionally, the clipping method of the present application may further reduce the playing duration of the non-event video by performing frame extraction processing on the non-event video to obtain the clipped non-event video. For example, in the non-event video, image extraction processing is performed every one frame, so that the non-event video after frame extraction is 1/2 of the non-event video before frame extraction, which is equivalent to clipping the non-event video before frame extraction by a clipping ratio of 1/2, where the extracted image may be reserved as the clipped non-event video or the remaining image may be reserved as the non-event video, which is not limited herein.
On the other hand, the video playing method can replace the video cutting processing process with a double-speed playing process, so that another executable mode is obtained. Specifically, the method comprises the following steps:
performing event analysis on the acquired initial video, and determining event video and non-event video in the initial video, wherein the event video characterizes video corresponding to a target event detected in the initial video; and performing double-speed playing processing on the non-event video based on a target playing strategy determined by the current residual electric quantity of the terminal equipment, and performing constant-speed playing processing on the event video.
The double-speed playing processing refers to common double-speed playing (x 2.0), triple-speed playing (x 3.0) and the like, and the constant-speed playing can refer to normal playing (x 1.0); in the same way, different double-speed playing strategies can be set for each electric quantity interval according to the electric quantity interval mode, and the description is omitted here.
In addition, another possible implementation manner may be obtained by combining the implementation manners in the foregoing embodiments: after the non-event video is cut to obtain the video to be played through the foregoing embodiment, when the video to be played is played, the non-event video in the video to be played is played at double speed, and the event video is played at constant speed, so that the playing duration of the non-event video is further shortened.
It should be further noted that, the main body of the video playing method may be a video playing apparatus, for example, the video playing method may be performed by a terminal device or a server or other processing devices, where the terminal device may be a User Equipment (UE), a computer, a mobile device, a User terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and so on. In some possible implementations, the video playing method may be implemented by a processor calling computer readable instructions stored in a memory.
Fig. 3 is a block diagram of a video playback device according to an exemplary embodiment of the present application. As shown in fig. 3, the exemplary video playback device 300 includes: an analysis module 310, a cropping module 320, and a video determination module 330. Specifically:
the analysis module 310 is configured to perform event analysis on the obtained initial video, determine an event video and a non-event video in the initial video, where the event video characterizes a video corresponding to the target event detected in the initial video.
And the clipping module 320 is configured to clip the non-event video based on a target play policy determined by the current remaining power of the terminal device, so as to obtain a clipped non-event video.
The video determining module 330 is configured to determine a video to be played in the initial video based on the common period of the cut non-event video and the event period of the event video; and the playing module is used for playing the video to be played.
In the exemplary video playing device, event analysis is carried out on the acquired initial video, so that event video of a target event and non-event video of no event in the initial video are determined; determining a proper target playing strategy based on the current residual electric quantity of the terminal equipment, and cutting the obtained non-event video, so that the playing time of the non-event video without the event is shortened, and the cut non-event video is obtained; determining a time period to be played in the initial video based on a common time period corresponding to the cut non-event video and an event time period corresponding to the event video, and obtaining a video to be played corresponding to the time period to be played; compared with the conventional video playing process, the method has the advantages that the non-event video part is cut, so that the event video with events is emphasized in the video playing process, the video playing efficiency can be improved, the energy consumption of terminal equipment can be reduced, and particularly, the cruising ability of low-power-consumption equipment can be remarkably improved.
The functions of each module may be referred to an embodiment of a video playing method, which is not described herein.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an embodiment of an electronic device of the present application. The electronic device 400 comprises a memory 401 and a processor 402, the processor 402 being configured to execute program instructions stored in the memory 401 to implement the steps of any of the embodiments of the video playback method described above. In one particular implementation scenario, electronic device 400 may include, but is not limited to: the microcomputer and the server, and the electronic device 400 may also include mobile devices such as a notebook computer and a tablet computer, which are not limited herein.
Specifically, the processor 402 is configured to control itself and the memory 401 to implement the steps in any of the embodiments of the video playing method described above. The processor 402 may also be referred to as a CPU (Central Processing Unit ). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 402 may be commonly implemented by an integrated circuit chip.
According to the scheme, event analysis is carried out on the obtained initial video, so that event video of a target event and non-event video of an event which does not occur in the initial video are determined; determining a proper target playing strategy based on the current residual electric quantity of the terminal equipment, and cutting the obtained non-event video, so that the playing time of the non-event video without the event is shortened, and the cut non-event video is obtained; determining a time period to be played in the initial video based on a common time period corresponding to the cut non-event video and an event time period corresponding to the event video, and obtaining a video to be played corresponding to the time period to be played; compared with the conventional video playing process, the method has the advantages that the non-event video part is cut, so that the event video with events is emphasized in the video playing process, the video playing efficiency can be improved, the energy consumption of terminal equipment can be reduced, and particularly, the cruising ability of low-power-consumption equipment can be remarkably improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a computer readable storage medium of the present application. The computer readable storage medium 510 stores program instructions 511 executable by the processor, the program instructions 511 being for implementing the steps in any of the embodiments of the video playback method described above.
According to the scheme, event analysis is carried out on the obtained initial video, so that event video of a target event and non-event video of an event which does not occur in the initial video are determined; determining a proper target playing strategy based on the current residual electric quantity of the terminal equipment, and cutting the obtained non-event video, so that the playing time of the non-event video without the event is shortened, and the cut non-event video is obtained; determining a time period to be played in the initial video based on a common time period corresponding to the cut non-event video and an event time period corresponding to the event video, and obtaining a video to be played corresponding to the time period to be played; compared with the conventional video playing process, the method has the advantages that the non-event video part is cut, so that the event video with events is emphasized in the video playing process, the video playing efficiency can be improved, the energy consumption of terminal equipment can be reduced, and particularly, the cruising ability of low-power-consumption equipment can be remarkably improved. In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. The video playing method is characterized in that the video playing method is applied to terminal equipment and comprises the following steps:
performing event analysis on the obtained initial video, and determining event video and non-event video in the initial video, wherein the event video characterizes video corresponding to a target event detected in the initial video;
cutting the non-event video based on a target playing strategy determined by the current residual electric quantity of the terminal equipment to obtain a cut non-event video;
determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video;
and performing playing processing on the video to be played.
2. The method of claim 1, wherein the step of clipping the non-event video based on the target play policy determined by the current remaining power of the terminal device to obtain a clipped non-event video includes:
determining a corresponding target electric quantity interval from preset electric quantity intervals according to the current residual electric quantity;
taking a video playing strategy corresponding to the target electric quantity interval as the target playing strategy, wherein the video playing strategy is respectively set based on different preset electric quantity intervals;
And cutting the duration of the non-event video based on the target playing strategy to obtain the cut non-event video.
3. The method according to claim 2, wherein the preset power interval includes a high power interval, a medium power interval, and a low power interval, the video playing policy includes a short clipping mode, a medium clipping mode, and a long clipping mode, and the step of clipping the duration of the non-event video based on the target playing policy to obtain the clipped non-event video includes:
if the target electric quantity interval is the Gao Dianliang interval, cutting the duration of the non-event video based on the short cutting mode to obtain the cut non-event video;
if the target electric quantity interval is the middle electric quantity interval, cutting the duration of the non-event video based on the middle cutting mode to obtain the cut non-event video, wherein the cutting proportion of the middle cutting mode to the non-event video is larger than that of the short cutting mode to the non-event video;
and if the target electric quantity interval is the low electric quantity interval, cutting the duration of the non-event video based on the long cutting mode to obtain the cut non-event video, wherein the cutting proportion of the long cutting mode to the non-event video is larger than that of the medium cutting mode to the non-event video.
4. The method of claim 3, wherein if the target power interval is the low power interval, clipping the duration of the non-event video based on the long clipping mode to obtain the clipped non-event video, comprising:
acquiring target detection time for detecting a target object in the event video;
judging whether the event starting time of the event video is earlier than the target detection time;
if yes, the cutting proportion of the long cutting mode is increased.
5. The method of claim 1, wherein the step of determining the video to be played in the initial video based on the common period of the cropped non-event video and the event period of the event video comprises:
determining a period to be played based on the common period of the cut non-event video and the event period of the event video;
and cutting the initial video based on the to-be-played time period to obtain the to-be-played video.
6. The method of claim 1, wherein the step of playing the video to be played comprises:
Detecting whether a picture jump phenomenon exists in the playing process of the video to be played;
if yes, marking the target object detected after the picture jump phenomenon occurs in the video to be played by adopting a marking mode different from the marking mode of the target object detected before the picture jump phenomenon occurs.
7. The method of claim 1, wherein the step of performing event analysis on the obtained initial video to determine event video and non-event video in the initial video comprises:
carrying out event analysis on the initial video based on the acquired event template to obtain event start time and event end time;
the event record is determined based on the event start time and event end time, and the non-event record is determined based on the initial start time and initial end time of the initial record.
8. A video playback device, the device comprising:
the analysis module is used for carrying out event analysis on the obtained initial video, determining event video and non-event video in the initial video, and representing video corresponding to the target event detected in the initial video by the event video;
The clipping module is used for clipping the non-event video based on a target play strategy determined by the current residual electric quantity of the terminal equipment to obtain a clipped non-event video;
the video determining module is used for determining a video to be played in the initial video based on the common time period of the cut non-event video and the event time period of the event video;
and the playing module is used for playing the video to be played.
9. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the method of any one of claims 1 to 7.
10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the method of any of claims 1 to 7.
CN202311754288.7A 2023-12-19 2023-12-19 Video playing method, device, equipment and storage medium Pending CN117793405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311754288.7A CN117793405A (en) 2023-12-19 2023-12-19 Video playing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311754288.7A CN117793405A (en) 2023-12-19 2023-12-19 Video playing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117793405A true CN117793405A (en) 2024-03-29

Family

ID=90393745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311754288.7A Pending CN117793405A (en) 2023-12-19 2023-12-19 Video playing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117793405A (en)

Similar Documents

Publication Publication Date Title
KR101553756B1 (en) System and method to manage processes of a mobile device based on available power resources
CN108345524B (en) Application program monitoring method and application program monitoring device
CN106998494B (en) Video recording method and related device
US20100118180A1 (en) Imaging device
US10074003B2 (en) Dynamic control for data capture
CN101969502A (en) Mobile terminal service recovering method and mobile terminal
CN101263419B (en) Trigger tone of a camera
RU2646532C2 (en) Method for presentation of digital multimedia content and device
CN107526424B (en) Terminal energy saving method and device
CN111479016B (en) Terminal use duration reminding method and device, terminal and storage medium
US20140240607A1 (en) Power state management for set-top boxes
CN105704387A (en) Shooting method and device of intelligent terminal and intelligent terminal
US9648195B2 (en) Image capturing apparatus and image capturing method
WO2015178234A1 (en) Image search system
CN117793405A (en) Video playing method, device, equipment and storage medium
CN112566228A (en) Method and system for reducing equipment power consumption in network video conference
US20160147630A1 (en) Method and system of detecting abnormal power consumption
CN105025228A (en) Method for recording video and images continuously based on picture states
JP4921200B2 (en) Electronics
CN114913622A (en) Video display method and system of automobile data recorder and computer storage medium
US10313625B2 (en) Method, apparatus, and storage medium for video file processing
KR20110007838A (en) Image processing method and apparatus
CN110602464A (en) Method and device for saving image storage space during monitoring
JP5011261B2 (en) Information recording / reproducing apparatus, information recording / reproducing method, and information recording / reproducing system
CN103581594B (en) Moving image playback apparatus and control method therefor

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