CN114302180A - Video single-frame playing method, device, server, system and storage medium - Google Patents

Video single-frame playing method, device, server, system and storage medium Download PDF

Info

Publication number
CN114302180A
CN114302180A CN202111680743.4A CN202111680743A CN114302180A CN 114302180 A CN114302180 A CN 114302180A CN 202111680743 A CN202111680743 A CN 202111680743A CN 114302180 A CN114302180 A CN 114302180A
Authority
CN
China
Prior art keywords
frame
playing
target
video
request
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.)
Granted
Application number
CN202111680743.4A
Other languages
Chinese (zh)
Other versions
CN114302180B (en
Inventor
沈远浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Software 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 Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Software Co Ltd
Priority to CN202111680743.4A priority Critical patent/CN114302180B/en
Publication of CN114302180A publication Critical patent/CN114302180A/en
Application granted granted Critical
Publication of CN114302180B publication Critical patent/CN114302180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a video single-frame playing method, video single-frame playing equipment, a video single-frame playing server, a video single-frame playing system and a video single-frame playing storage medium, and belongs to the field of playing. The method comprises the following steps: generating a target frame pulling request in response to a user operation; and sending the target frame pulling request to a server so that the server obtains at least one target video frame based on the target frame pulling request, and sending the target video frame to the electronic equipment for display and output. The invention reduces the memory occupancy rate of the single frame playing function, improves the bandwidth utilization rate and can give better playing experience to users.

Description

Video single-frame playing method, device, server, system and storage medium
Technical Field
The present invention relates to the field of video single frame playing, and in particular, to a method, device, server, system, and storage medium for video single frame playing.
Background
In the field of traditional professional security cameras, single-frame forward and single-frame backward playing in a double-speed playing mode is a very practical requirement. This function is easier to implement when playing locally, since all key frames are local. Whether playing in forward direction or backspacing, it is sufficient to find the corresponding key frame reading in the file. In the current network playing model, the multiple speed playing is usually performed by sending a multiple speed playing request from the player side to the server side, and the server side pushes the retrieved key video frame to the player side. In the prior art, a commonly used method for realizing single frame playing is to create an extra buffer during double-speed playing for buffering the frames that have been played before.
The method is relatively dependent on the size of the buffer, and whether the user uses the single-frame function or not, the extra buffer must exist all the time, and the function of the embedded device or the mobile phone with a short memory is difficult to realize, so that the single-frame playing function is rare in consumer products and generally appears in some professional security fields. In addition, no matter how the implementation is realized, the buffering is limited, so that if the direction of a single frame is changed, the buffering needs to be re-buffered, bandwidth waste and unsmooth are caused, or only the maximum frame number of the existing buffering can be returned, and the influence on the user experience is generated.
Disclosure of Invention
The invention mainly aims to provide a video single-frame playing method, video single-frame playing equipment, a video single-frame playing server, a video single-frame playing system and a video single-frame playing storage medium, and aims to achieve smooth single-frame playing experience which is not limited by the number of frames under the condition of low memory occupation.
In order to achieve the above object, the present invention provides a video single frame playing method, which is used for an electronic device, wherein the electronic device is connected with a server, and the method comprises the following steps:
generating a target frame pulling request in response to a user operation;
sending the target frame pulling request to a server so that the server obtains at least one target video frame based on the target frame pulling request and sends the target video frame to the electronic equipment;
outputting at least one of the target video frames.
Optionally, the step of generating a target frame pull request in response to a user operation specifically includes:
responding to user operation, and acquiring a playing speed, a playing direction, playing starting time and a request frame number;
generating the target frame pulling request based on the playing speed, the playing direction, the playing starting time and the request frame number;
the step of sending the target frame pull request to a server, so that the server determines at least one target video frame based on the target frame pull request, and sends the at least one target video frame to the electronic device specifically includes:
and sending the target frame pulling request to a server so that the server determines a playing start frame based on the playing start time, determines at least one first target video frame from the playing start frame according to a playing multiple and a requested frame number along a playing direction, and sends the first target video frame to the electronic equipment.
Optionally, the step of generating a target frame pull request in response to a user operation specifically includes:
responding to the reverse play operation of a user, and acquiring a play double speed, a current play direction, a timestamp corresponding to a current video frame and a request frame number;
generating the target frame pulling request based on the playing speed, the current playing direction, the timestamp corresponding to the current video frame and the request frame number;
the step of sending the target frame pull request to a server, so that the server determines at least one target timestamp and at least one target video frame corresponding to the target timestamp based on the target frame pull request, and sends the target video frame and the timestamp corresponding to the target video frame to the electronic device specifically includes:
and sending the target frame pulling request to a server so that the server determines a current playing frame based on a timestamp corresponding to the current display video frame, determines at least one second target video frame from the current playing frame according to the playing multiple along the reverse direction of the current playing direction according to the number of the request frames, and sends the at least one second target video frame to the electronic equipment.
In addition, in order to achieve the above object, the present invention further provides a method for playing a single video frame, which is used for a server, where the server is connected to an electronic device, and the method includes:
receiving a target frame pulling request sent by the electronic equipment;
determining at least one target video frame corresponding to the target frame pulling request;
and sending the target video frame to the electronic equipment so as to enable the electronic equipment to output at least one target video frame.
Optionally, the target frame pulling request specifically includes: playing speed, playing direction, playing starting time and request frame number;
the step of determining at least one target video frame based on the target frame pull request specifically includes:
and determining a playing start frame based on the playing start time in the target frame pulling request, and determining at least one first target video frame from the playing start frame according to the playing multiple and the requested frame number along the playing direction.
Optionally, the target frame pulling request specifically includes: playing double speed, current playing direction, timestamp corresponding to current video frame and request frame number;
the step of obtaining at least one target video frame based on the target frame pull request specifically includes:
and determining a current playing frame based on a timestamp corresponding to the currently displayed video frame in the target frame pulling request, and determining at least one second target video frame from the current playing frame according to the playing multiple and the number of the requested frames along the reverse direction of the current playing direction.
In addition, to achieve the above object, the present invention further provides a video single frame playing device, including: the video single-frame playing program is stored on the memory and can be operated on the processor, and when being executed by the processor, the video single-frame playing program realizes the steps of the video single-frame playing method on the electronic equipment side.
In addition, to achieve the above object, the present invention also provides a server, including: the system comprises a memory, a processor and a video single-frame playing program which is stored on the memory and can run on the processor, wherein when the video single-frame playing program is executed by the processor, the steps of the video single-frame playing method at the server end are realized.
In addition, to achieve the above object, the present invention further provides a video single frame playing system, including:
a plurality of the aforementioned electronic devices, and a server as aforementioned connected to the plurality of electronic devices.
Furthermore, to achieve the above object, the present invention further provides a computer storage medium, which stores a video single frame playing program, wherein the video single frame playing program, when executed by a processor, implements the steps of the video single frame playing method as claimed in the claims.
The embodiment of the invention provides a video single-frame playing method, a video single-frame playing device, a video single-frame playing server, a video single-frame playing system and a storage medium, which are used for electronic equipment, wherein the electronic equipment is connected with the server, and the method comprises the following steps: if the target frame is in the double-speed playing mode, responding to the single-frame operation of the user, and generating a target frame pulling request; sending the target frame pulling request to a server so that the server obtains at least one target video frame based on the target frame pulling request and sends the target video frame to the electronic equipment; outputting at least one of the target video frames. Therefore, the invention actively pulls a small amount of video frames to the server in real time in the playing process through the electronic equipment and plays the video frames, thereby reducing the memory occupancy rate, reducing the bandwidth waste and improving the playing fluency and the user experience.
Drawings
FIG. 1 is a schematic structural diagram of a video single-frame playing system according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of an electronic device or server according to the present invention;
FIG. 3 is a flowchart illustrating a video single frame playing method according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating a video single frame playing method according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: if the video single-frame playing equipment is in a double-speed playing mode, responding to the single-frame operation of a user, and generating a target frame pulling request; sending the target frame pulling request to a server so that the server obtains at least one target video frame based on the target frame pulling request and sends the target video frame to the electronic equipment; outputting at least one of the target video frames.
In the prior art, in the field of traditional professional security cameras, single-frame forward and single-frame backward playing in a double-speed playing mode is a very practical requirement. This function is easier to implement when playing locally, since all key frames are local. Whether playing in forward direction or backspacing, it is sufficient to find the corresponding key frame reading in the file. In the current network playing model, the double-speed playing is usually performed by sending a double-speed playing command from the player to the server, and the server pushes the retrieved key frame to the player. The double speed playing is directional, if the direction is not changed to realize single frame, only frame-by-frame playing is needed. But if the direction suddenly changes, such as starting to play a single frame in the forward direction, it suddenly moves backwards for a few frames. There are usually only two implementations, one is to immediately discard the frame (buffered frame) that has been pushed, and resume the double-speed playback in the reverse direction at the current playback time. Another way is to create an extra buffer for buffering the frames that have been played before in the double-speed playing, so that the required key frame can be found from the buffer to play back in the back-off process.
An extra buffer is required to be established during double-speed playing and used for buffering frames which are played before, the method is relatively dependent on the size of the buffer, and the extra buffer must exist all the time no matter a user uses the single-frame function, the function of an embedded device or a mobile phone with a short memory is difficult to realize, so that the single-frame playing function is rare in consumer products and generally appears in some professional security fields. In addition, no matter how the implementation is realized, the buffering is limited, so that if the direction of a single frame is changed, the buffering needs to be re-buffered, bandwidth waste and unsmooth are caused, or only the maximum frame number of the existing buffering can be returned, and the influence on the user experience is generated.
The invention provides a solution, which utilizes an electronic device to respond to a single-frame operation of a user in a double-speed playing mode, and sends a target frame pulling request to a server so as to enable the server to feed back at least one frame of video frame and play the corresponding video frame, namely, the electronic device actively pulls a small number of video frames to the server in real time in the playing process and plays the video frames, thereby reducing the memory occupancy rate of a single-frame playing function, improving the bandwidth utilization rate and giving better playing experience to the user.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a video single frame playing system according to a first embodiment of the present invention, and as shown in fig. 1, the system may include a server 11, a network 12, and an electronic device 13.
The server 11 may be a physical PC server, a virtual server hosted by a host cluster, or even an embedded server. During operation, the server 11 may operate a server-side program of the video playing method to implement relevant service functions of the method.
The network 12 may include various types of wired or wireless networks. In one embodiment, the Network 12 may include the Public Switched Telephone Network (PSTN) and the Internet. In another embodiment, the network 12 may also include a WIreless-FIdelity (WIFI) network. The electronic device 13 may interact with the server 11 via the network 12.
The electronic device 13 may include: smart phones, tablet devices, notebook computers, palm tops (PDAs), etc., to which one or more embodiments of the present disclosure are not limited. In the operation process, the electronic device 13 may operate a program on the electronic device side of the video single-frame playing method, so as to implement the related service function of the method.
Based on the above system, referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device or a server according to the present invention,
the electronic device or the server may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in fig. 2 does not constitute a limitation of an electronic device or server, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 2, the memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and an electronic program.
In the electronic device or server shown in fig. 2, the network interface 1004 is mainly used for data communication with the server or electronic device; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device or the server according to the present invention may be disposed in the electronic device or the server, and the electronic device or the server calls the video single frame playing program stored in the memory 1005 through the processor 1001 and executes the video single frame playing method provided by the embodiment of the present invention.
Based on the electronic device, the present invention provides a video single frame playing method, and referring to fig. 3, fig. 3 is a schematic flow chart of a first embodiment of the video single frame playing method according to the present invention.
The method comprises the following steps:
step S11, in response to a user operation, generating a target frame pull request;
it is understood that the user operation may include a forward play operation or a reverse play operation.
Further, since the electronic device can be in the double-speed playing mode, the forward playing operation may include a forward double-speed playing operation, a forward quadruple-speed playing operation, or a forward octal-speed playing operation. The reverse play operation may include a reverse double-speed play operation, a reverse quadruple-speed play operation, or a reverse octal-speed play operation.
It should be noted that the playing multiple of the normal playing is forward one-time speed.
Further, the target frame pull request may include the playing direction and the number of frames that the server is required to return for this request, which is determined by the network status between the electronic device and the server. For example, the number of frames that the server is required to return in the case where the network status is poor, the number of frames that the server is required to return in the case where the network status is normal, the number of frames that the server is required to return in the case where the network status is good, and the number of frames that the server is required to return in the case where the network status is good may be 4, 3, 2, and 1. The larger the number of frames, the larger the correspondingly required buffering, but the better network jitter immunity can be provided.
In this embodiment, after receiving a forward single frame play operation or a reverse single frame play operation sent by a user, the electronic device generates a target frame pull request according to the user operation and a network state.
Step S12, sending the target frame pull request to a server, so that the server obtains at least one target video frame based on the target frame pull request, and sends the target video frame to the electronic device;
the electronic device can send a target frame pulling request to the server through a wireless network or a wired network.
It can be understood that, after receiving the target frame pulling request, the server determines, based on the user operation in the target frame pulling request, a playing direction corresponding to the user operation, and determines a timestamp relationship between the target frame and the current frame.
It should be noted that, in the process of encoding video, a timestamp is correspondingly bound to each video frame according to FPS (frames per second), for example, when the FPS is 25, the timestamp of the first frame of the video is 0, the timestamp of the second frame is 40ms, and the timestamp of the third frame is 80 ms.
In this embodiment, the target frame pull request is sent to a server by an electronic device, so that the server determines a timestamp relationship between a target frame and a current frame based on the target frame pull request, obtains at least one target video frame, and sends the target video frame to the electronic device.
And step S13, outputting at least one target video frame.
In this embodiment, the electronic device may output the target video frame according to the playing direction according to the timestamp corresponding to the target video frame. For example, when the playing direction is reverse playing, the corresponding video frames are output in the order of 80ms, 40ms and 0; and when the playing direction is forward playing, outputting the corresponding video frames according to the sequence of 0ms, 40ms and 80 ms.
In the embodiment, the electronic device responds to user operation and generates a target frame pulling request; sending the target frame pulling request to a server so that the server obtains at least one target video frame based on the target frame pulling request and sends the target video frame to the electronic equipment; outputting at least one of the target video frames. Therefore, in the embodiment, the electronic device sends the target frame pulling request to the server in response to the single-frame operation of the user in the double-speed playing mode, so that the server feeds back at least one frame of video frame and plays the corresponding video frame, that is, the electronic device actively pulls a small number of video frames to the server in real time in the playing process and plays the video frames, thereby reducing the memory occupancy rate of the single-frame playing function, improving the bandwidth utilization rate, and being capable of giving better playing experience to the user.
Based on the foregoing embodiment, as an optional implementation manner, the video single-frame playing method of the present invention may be used for reviewing a monitoring video, and step S11 specifically includes:
step S1101, in response to a user operation, acquiring a play double speed, a play direction, a play start time, and a request frame number;
for monitoring the video review service, a user can select a viewing starting time point on a video single-frame playing page, which is the starting time.
The playing speed and the playing direction are the speed and the direction selected by the current user on the electronic equipment.
The number of the request frames is determined by the network state between the electronic device and the server, and the network state can be acquired by various schemes, such as detecting whether the network is in an intranet or not, or judging through historical download bandwidth.
In this embodiment, the playback speed, the playback direction, and the playback start time are determined by a user operation, and the number of requested frames is determined according to the network state.
Step S1102, generating the target frame pulling request based on the playing speed, the playing direction, the playing starting time and the request frame number;
in this embodiment, the electronic device is based on a target frame pull request of a playback speed, a playback time, and a request frame number.
Step 12, specifically comprising:
step S1201, sending the target frame pulling request to a server, so that the server determines a playing start frame based on the playing start time, determines at least one first target video frame from the playing start frame according to a playing multiple and a requested frame number along a playing direction, and sends the first target video frame to the electronic equipment.
In this embodiment, the electronic device sends the target frame pull request to the server, and after receiving the target frame pull request, the server finds the first key video frame according to the play-up time in the pull request. Typically, the watch lookback server maintains a corresponding table of times and key video frame locations, and by consulting this index table, the location of the first key video frame required by the request can be located. If the number of the request frames contained in the request is not 1, the server finds the next key video frame forward or backward according to the playing speed and the playing direction, and finds all the video frames needing to be returned in the same way. For example, the server sets the frame rate of double-speed playing to be 2, that is, a frame should be displayed 500ms when playing at normal double-speed, and when we find the first key video frame, its timestamp (PTS) is 10000ms, then forward 2-speed means that the timestamp of the next key video frame is the video key frame closest to the timestamp value of 10000 (previous frame timestamp) +2 × 500. If the speed is n times, the corresponding searched time stamp is as follows: 10000 (previous frame timestamp) + n × 500. if reversed, then the timestamp corresponding to the lookup key frame is: 10000 (previous frame timestamp) -n × 500. By the method, the server side can find the key video frames needed by all the equipment sides.
If the user suddenly selects reverse play in the forward play process, the play start time may be replaced by acquiring the timestamp of the currently displayed video frame, as another alternative, and step S11 specifically includes:
step S1111, if the video player is in the double speed playing mode, responding to the reverse playing operation of the user, and acquiring the playing double speed, the current playing direction, the timestamp corresponding to the current video frame and the request frame number;
wherein, the time stamp (PTS) corresponding to the current video frame is to be obtained from the player.
Also, the playback direction and playback speed are user-selected.
The number of request frames is determined by the network status.
Step S12, specifically including:
step S1211, sending the target frame pull request to a server, so that the server determines a currently played frame based on a timestamp corresponding to a currently displayed video frame, determines at least one second target video frame from the currently played frame according to a play multiple in a reverse direction of a current play direction according to a requested frame number, and sends the at least one second target video frame to the electronic device.
In this embodiment, the electronic device sends the target frame pull request to the server, and after receiving the target frame pull request, the server directly locates the position of the first key video frame according to the timestamp corresponding to the current video frame in the pull request. If the number of the request frames contained in the request is not 1, the server finds the next key video frame forward or backward according to the playing speed and the playing direction, and finds all the video frames needing to be returned in the same way. The formula for finding the next key video frame is:
if the direction is the forward direction:
next frame timestamp + multiple of current frame timestamp
If the direction is reverse:
next frame timestamp-multiple of current frame timestamp-frame interval
The frame interval is determined by the frame rate of the server-side playing, for example, if the frame rate is 2, the frame interval is 500ms, and if the frame rate is 4, the frame interval is 250 ms.
Based on the above server, the present invention further provides a video playing method, referring to fig. 4, where fig. 4 is a schematic flow chart of a second embodiment of the video playing method of the present invention, and the method includes:
step S21, receiving a target frame pull request sent by the electronic device;
the electronic equipment is in a double-speed playing mode, generates a target frame pulling request according to user operation and a network state after receiving forward playing operation or reverse playing operation sent by a user, and sends the target frame pulling request to a server through a wireless network or a wired network.
Step S22, determining at least one target video frame corresponding to the target frame pulling request;
after receiving the target frame pulling request, the server determines a playing direction corresponding to the user operation based on the user operation in the target frame pulling request, and determines a timestamp relationship between the target frame and the current frame. It should be noted that, in the process of encoding video, a timestamp is correspondingly bound to each video frame according to FPS (frames per second), for example, when the FPS is 25, the timestamp of the first frame of the video is 0, the timestamp of the second frame is 40ms, and the timestamp of the third frame is 80 ms. In this embodiment, the target video frame is determined by obtaining a timestamp corresponding to the target video frame.
Step S23, sending a target video frame to the electronic device, so that the electronic device outputs at least one target video frame.
The server can send the target video frame to the electronic equipment through a wireless network or a wired network, and the electronic equipment can output the target video frame according to the time stamp corresponding to the target video frame and the playing direction. For example, when the playing direction is reverse playing, the corresponding video frames are output in the order of 80ms, 40ms and 0; and when the playing direction is forward playing, outputting the corresponding video frames according to the sequence of 0ms, 40ms and 80 ms.
In this embodiment, the server receives a target frame pull request sent by the electronic device, determines at least one target video frame corresponding to the target frame pull request, and sends the target video frame to the electronic device; outputting at least one of the target video frames. Therefore, the electronic equipment responds to the user operation in the double-speed playing mode, and sends the target frame pulling request to the server so as to enable the server to feed back at least one frame of video frame and play the corresponding video frame, namely the electronic equipment actively pulls a small number of video frames to the server in real time in the playing process and plays the video frames, the memory occupancy rate is reduced, and the playing smoothness is improved.
Based on the foregoing embodiment, as an optional implementation manner, the video played by the video playing method of the present invention may be a surveillance video, and the target frame pulling request specifically includes: playing multiple speed, playing starting time and request frame number; wherein the broadcasting starting time corresponds to a time stamp;
step S22, specifically including:
step S2201, determining a play start frame based on the play start time in the target frame pull request, and searching from the play start frame according to the play multiple in the play direction according to the number of the request frames to determine at least one first target video frame.
And after the target frame pulling request is received, finding out a first key video frame through the play-up time in the pulling request. Typically, the watch lookback server maintains a corresponding table of times and key video frame locations, and by consulting this index table, the location of the first key video frame required by the request can be located. If the number of the request frames contained in the request is not 1, the server finds the next key video frame forward or backward according to the playing speed and the playing direction, and finds all the video frames needing to be returned in the same way. For example, the server sets the frame rate of double-speed playing to be 2, that is, a frame should be displayed 500ms when playing at normal double-speed, and when we find the first key video frame, its timestamp (PTS) is 10000ms, then forward 2-speed means that the timestamp of the next key video frame is the video key frame closest to the timestamp value of 10000 (previous frame timestamp) +2 × 500. If the speed is n times, the corresponding searched time stamp is as follows: 10000 (previous frame timestamp) + n × 500. if reversed, then the timestamp corresponding to the lookup key frame is: 10000 (previous frame timestamp) -n × 500. By the method, the server side can find the key video frames needed by all the equipment sides.
It can be understood that, after the user performs the reverse play operation, the play direction of the video frame may change, and the timestamp corresponding to the played video frame does not correspond to a specific time at this time, as another optional implementation, the target frame pull request specifically includes: playing double speed, current playing direction, timestamp corresponding to current video frame and request frame number;
step S22, specifically including:
step S2211, determining at least one second target video frame in a direction opposite to the current playing direction based on the timestamp, the playing speed, the current playing direction and the requested frame number corresponding to the current playing frame.
In this embodiment, after receiving the target frame pull request, the server directly locates the position of the first key video frame according to the timestamp corresponding to the current video frame in the pull request. If the number of the request frames contained in the request is not 1, the server finds the next key video frame forward or backward according to the playing speed and the playing direction, and finds all the video frames needing to be returned in the same way. The formula for finding the next key video frame is:
if the direction is the forward direction:
next frame timestamp + multiple of current frame timestamp
If the direction is reverse:
next frame timestamp-multiple of current frame timestamp-frame interval
The frame interval is determined by the frame rate of the server-side playing, for example, if the frame rate is 2, the frame interval is 500ms, and if the frame rate is 4, the frame interval is 250 ms.
It should be noted that the timestamp interval is a difference between timestamps corresponding to two frames of video frames.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, on which a video single frame playing program is stored, and the video single frame playing program, when executed by a processor, implements the steps of the video single frame playing method according to the foregoing method embodiment. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present invention, reference is made to the description of the method embodiments of the present invention. It is determined that, by way of example, the program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A video single-frame playing method is used for an electronic device, wherein the electronic device is connected with a server, and the method comprises the following steps:
generating a target frame pulling request in response to a user operation;
sending the target frame pulling request to a server so that the server determines at least one target video frame based on the target frame pulling request and sends the target video frame to the electronic equipment;
outputting at least one of the target video frames.
2. The method for playing a single frame of video as claimed in claim 1, wherein said step of generating a target frame pull request in response to a user operation specifically comprises:
responding to user operation, and acquiring a playing speed, a playing direction, playing starting time and a request frame number;
generating the target frame pulling request based on the playing speed, the playing direction, the playing starting time and the request frame number;
the step of sending the target frame pull request to a server, so that the server determines at least one target video frame based on the target frame pull request, and sends the at least one target video frame to the electronic device specifically includes:
and sending the target frame pulling request to a server so that the server determines a playing start frame based on the playing start time, determines at least one first target video frame from the playing start frame according to a playing multiple along a playing direction and the number of the request frames, and sends the first target video frame to the electronic equipment.
3. The method for playing a single frame of video as claimed in claim 1, wherein said step of generating a target frame pull request in response to a user operation specifically comprises:
responding to the reverse play operation of a user, and acquiring a play double speed, a current play direction, a timestamp corresponding to a currently displayed video frame and a request frame number;
generating a target frame pulling request based on the playing speed, the current playing direction, a timestamp corresponding to the current display video frame and the request frame number;
the step of sending the target frame pull request to a server, so that the server determines at least one target video frame based on the target frame pull request, and sends the target video frame to the electronic device specifically includes:
and sending the target frame pulling request to a server so that the server determines a current playing frame based on a timestamp corresponding to the current display video frame, searches the current playing frame according to the playing multiple along the reverse direction of the current playing direction according to the number of the request frames, determines at least one second target video frame, and sends the second target video frame to the electronic equipment.
4. A video single-frame playing method is used for a server, wherein the server is connected with an electronic device, and the method comprises the following steps:
receiving a target frame pulling request sent by the electronic equipment;
determining at least one target video frame corresponding to the target frame pulling request;
and sending the target video frame to the electronic equipment so as to enable the electronic equipment to output at least one target video frame.
5. The method for playing a single frame of video as claimed in claim 4, wherein said target frame pull request specifically comprises: the playing direction, the playing speed, the playing starting time and the request frame number;
the step of determining at least one target video frame based on the target frame pull request specifically includes:
and determining a playing start frame based on the playing start time in the target frame pulling request, searching from the playing start frame according to the playing multiple in the playing direction according to the number of the requested frames, and determining at least one first target video frame.
6. The method for playing a single frame of video as claimed in claim 4, wherein said target frame pull request specifically comprises: playing double speed, current playing direction, timestamp corresponding to current video frame and request frame number;
the step of obtaining at least one target video frame based on the target frame pull request specifically includes:
and determining a current playing frame based on a timestamp corresponding to the currently displayed video frame in the target frame pulling request, searching from the current playing frame according to the playing multiple in the reverse direction of the current playing direction according to the number of the requested frames, and determining at least one second target video frame.
7. An electronic device, characterized in that the electronic device comprises: memory, processor and a video single frame playback program stored on the memory and executable on the processor, the video single frame playback program, when executed by the processor, implementing the steps of the video single frame playback method according to any one of claims 1 to 3.
8. A server, characterized in that the server comprises: memory, processor and a video single frame playback program stored on the memory and executable on the processor, the video single frame playback program, when executed by the processor, implementing the steps of the video single frame playback method according to any one of claims 4 to 6.
9. A video single frame playback system, the system comprising:
a plurality of electronic devices according to claim 7, and a server according to claim 8 connected to a plurality of said electronic devices.
10. A computer storage medium, characterized in that the computer readable storage medium has stored thereon a video single frame playback program, which when executed by a processor implements the steps of the video single frame playback method according to any one of claims 1-3 or 4-6.
CN202111680743.4A 2021-12-31 2021-12-31 Video single-frame playing method, device, server, system and storage medium Active CN114302180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111680743.4A CN114302180B (en) 2021-12-31 2021-12-31 Video single-frame playing method, device, server, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111680743.4A CN114302180B (en) 2021-12-31 2021-12-31 Video single-frame playing method, device, server, system and storage medium

Publications (2)

Publication Number Publication Date
CN114302180A true CN114302180A (en) 2022-04-08
CN114302180B CN114302180B (en) 2024-02-06

Family

ID=80974852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111680743.4A Active CN114302180B (en) 2021-12-31 2021-12-31 Video single-frame playing method, device, server, system and storage medium

Country Status (1)

Country Link
CN (1) CN114302180B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666603A (en) * 2022-05-06 2022-06-24 厦门美图之家科技有限公司 Video decoding method and device, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231138B1 (en) * 2001-11-26 2007-06-12 Nvidia Corporation Method and system for DVD single frame stepping backwards
US20110097059A1 (en) * 2009-10-27 2011-04-28 Canon Kabushiki Kaisha Video playback apparatus and method for controlling the video playback apparatus
CN103369351A (en) * 2012-03-29 2013-10-23 深圳市龙视传媒有限公司 Streaming media fast-forward and fast-backward processing method, video server and system
CN104394426A (en) * 2014-12-10 2015-03-04 福建星网锐捷网络有限公司 Rate playing method and device of stream media
CN104639954A (en) * 2013-11-06 2015-05-20 北京航天长峰科技工业集团有限公司 Video reverse back checking method based on digital video recorder
CN106200998A (en) * 2016-07-06 2016-12-07 北京小米移动软件有限公司 Control method for playing back and device
CN106385620A (en) * 2016-10-25 2017-02-08 浙江红苹果电子有限公司 Data smoothing and outputting method based on streaming media
US20200145701A1 (en) * 2016-12-30 2020-05-07 Tivo Solutions Inc. Advanced trick-play modes for streaming video
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium
CN112040274A (en) * 2020-09-10 2020-12-04 杭州叙简科技股份有限公司 Web page video single-frame playing method based on webrtc
CN112492345A (en) * 2020-11-25 2021-03-12 深圳创维数字技术有限公司 Audio and video storage method, system, terminal and computer readable storage medium
CN113596518A (en) * 2021-08-13 2021-11-02 北京中电兴发科技有限公司 Video access method for improving double-speed playing performance

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231138B1 (en) * 2001-11-26 2007-06-12 Nvidia Corporation Method and system for DVD single frame stepping backwards
US20110097059A1 (en) * 2009-10-27 2011-04-28 Canon Kabushiki Kaisha Video playback apparatus and method for controlling the video playback apparatus
CN103369351A (en) * 2012-03-29 2013-10-23 深圳市龙视传媒有限公司 Streaming media fast-forward and fast-backward processing method, video server and system
CN104639954A (en) * 2013-11-06 2015-05-20 北京航天长峰科技工业集团有限公司 Video reverse back checking method based on digital video recorder
CN104394426A (en) * 2014-12-10 2015-03-04 福建星网锐捷网络有限公司 Rate playing method and device of stream media
CN106200998A (en) * 2016-07-06 2016-12-07 北京小米移动软件有限公司 Control method for playing back and device
CN106385620A (en) * 2016-10-25 2017-02-08 浙江红苹果电子有限公司 Data smoothing and outputting method based on streaming media
US20200145701A1 (en) * 2016-12-30 2020-05-07 Tivo Solutions Inc. Advanced trick-play modes for streaming video
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium
CN112040274A (en) * 2020-09-10 2020-12-04 杭州叙简科技股份有限公司 Web page video single-frame playing method based on webrtc
CN112492345A (en) * 2020-11-25 2021-03-12 深圳创维数字技术有限公司 Audio and video storage method, system, terminal and computer readable storage medium
CN113596518A (en) * 2021-08-13 2021-11-02 北京中电兴发科技有限公司 Video access method for improving double-speed playing performance

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666603A (en) * 2022-05-06 2022-06-24 厦门美图之家科技有限公司 Video decoding method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114302180B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US11743541B2 (en) Video providing textual content system and method
JP3198980B2 (en) Image display device and moving image search system
CN111135569A (en) Cloud game processing method and device, storage medium and electronic equipment
CN112104915B (en) Video data processing method and device and storage medium
CN111221491A (en) Interaction control method and device, electronic equipment and storage medium
CN108737884B (en) Content recording method and equipment, storage medium and electronic equipment
CN111669645B (en) Video playing method and device, electronic equipment and storage medium
CN114189700A (en) Live broadcast card pause prompting method and device, computer equipment and storage medium
CN113225585A (en) Video definition switching method and device, electronic equipment and storage medium
CN114302180A (en) Video single-frame playing method, device, server, system and storage medium
US7697815B2 (en) Video playback unit, video delivery unit and recording medium
CN110825994B (en) Page buffer processing method and device, computer equipment and storage medium
US20090125836A1 (en) Image output device
JP6483850B2 (en) Data processing method and apparatus
US20040086262A1 (en) Video data reproducing system and method
KR20200056859A (en) A method and system for generating and providing a preview video of a video content
US11546675B2 (en) Methods, systems, and media for streaming video content using adaptive buffers
US11470362B1 (en) Providing audio data for a video frame
CN115103054B (en) Information processing method, device, electronic equipment and medium
CN112118473B (en) Video bullet screen display method and device, computer equipment and readable storage medium
CN111837401B (en) Information processing apparatus, information processing method, and computer readable medium
CN115988257A (en) Data recording method, device and equipment
US20200296477A1 (en) Method and system for processing video
JP4902326B2 (en) Video transmission server and control method thereof
CN105556491A (en) Transmission-side computer, reception-side computer, and method and computer program executed by said computers

Legal Events

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