WO2017215279A1 - 一种视频回放方法及装置 - Google Patents

一种视频回放方法及装置 Download PDF

Info

Publication number
WO2017215279A1
WO2017215279A1 PCT/CN2017/073568 CN2017073568W WO2017215279A1 WO 2017215279 A1 WO2017215279 A1 WO 2017215279A1 CN 2017073568 W CN2017073568 W CN 2017073568W WO 2017215279 A1 WO2017215279 A1 WO 2017215279A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
speed
video frame
data transmission
mode
Prior art date
Application number
PCT/CN2017/073568
Other languages
English (en)
French (fr)
Inventor
浦世亮
张胜森
丁光凯
王伟
林起芊
汪渭春
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Priority to EP17812397.2A priority Critical patent/EP3471422B1/en
Priority to US16/309,075 priority patent/US10659824B2/en
Publication of WO2017215279A1 publication Critical patent/WO2017215279A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/23439Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements for generating different versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2402Monitoring of the downstream path of the transmission network, e.g. bandwidth available
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64784Data processing by the network
    • H04N21/64792Controlling the complexity of the content stream, e.g. by dropping packets

Definitions

  • the present application relates to the field of video communication technologies, and in particular, to a video playback method and apparatus.
  • video cloud storage systems have been widely used, especially in the field of video surveillance.
  • Common video cloud storage systems include: client, management server, storage server, and data forwarding server.
  • video playback in a video cloud storage system generally includes the following steps:
  • the client requests the address of the data forwarding server from the storage management server;
  • the storage management server determines the data forwarding server and sends the address of the data forwarding server to the client;
  • the client sends a video playback request to the data forwarding server
  • the data forwarding server After receiving the video playback request, the data forwarding server obtains the video data of the video to be played back from the storage server, and buffers the obtained video data;
  • the client obtains the cached video data from the data forwarding server and performs multi-speed playback of the obtained data.
  • not all networks can achieve 128 Mbps bandwidth.
  • the playback client and the data forwarding server are often not in the same network segment.
  • the client is located in the handheld device at 3G/4G. Under conditions, it is even more difficult to achieve. It can be seen that the network bandwidth requirement is high when the video playback is performed in the above manner.
  • the embodiment of the present application discloses a video playback method and device to reduce network bandwidth requirements during video playback.
  • the embodiment of the present application discloses a video playback method, where the method includes:
  • the target video frame discarding is selected from the preset video frame discarding manner according to the current data transmission speed and a theoretical data transmission speed corresponding to a preset video frame discarding mode.
  • the steps of the method include:
  • Determining the discarding mode of the video frame to be determined as the highest priority video frame discarding mode in the preset video frame discarding mode
  • the video frame to be determined is discarded according to the order of priority from high to low.
  • the new video frame discarding mode of the next priority and returning the bandwidth compression rate according to the to-be-determined video frame discarding mode, the video playback magnification, and the code rate of the to-be-played video, and calculating the to-be-determined a video frame discarding mode corresponding to the target theoretical data transmission speed, until the video frame discarding mode to be determined is the lowest priority video frame discarding mode, and the to-be-determined video frame discarding mode is determined as the target video frame discarding the way.
  • the step of estimating a current data transmission speed according to a historical data transmission speed includes:
  • Speed n ... Speed 1 is: the historical data transmission speed from the shortest to the long time, n times according to the preset statistical rules, T n ... T 1 is: respectively with Speed n ... Speed 1 corresponding preset coefficient, the sum of T n ... T 1 is equal to 1.
  • the T n ⁇ (T n-1 + . . . + T 1 ).
  • the method before the step of receiving the data acquisition request for the video to be played back by the receiving client, the method further includes:
  • the embodiment of the present application discloses a video playback apparatus, where the apparatus includes:
  • the request receiving module is configured to receive a data acquisition request sent by the client for the video to be played back, where the data acquisition request includes: a video playback double speed;
  • a speed estimation module configured to estimate a current data transmission speed according to a historical data transmission speed, wherein the historical data transmission speed is obtained according to a preset statistical rule
  • a mode selection module configured to select a target video frame discarding mode from the preset video frame discarding mode according to the current data transmission speed and a theoretical data transmission speed corresponding to a preset video frame discarding mode, where the The theoretical data transmission speed is determined according to the video playback speed;
  • a discarding processing module configured to discard the video data of the to-be-played video according to the target video frame discarding manner, and send the discarded video data to the client, so that the client pair The video to be played back is played back.
  • the mode selection module includes:
  • the first mode determining sub-module is configured to determine that the video frame discarding mode of the to-be-determined video frame is the highest priority video frame discarding mode in the preset video frame discarding mode;
  • a speed calculation sub-module configured to calculate, according to the bandwidth compression ratio of the to-be-determined video frame discarding mode, the video playback magnification, and the code rate of the to-be-played video, target theoretical data corresponding to the to-be-determined video frame discarding mode transfer speed;
  • a speed judging sub-module configured to determine whether the target theoretical data transmission speed is greater than or equal to a product of the current data transmission speed and the first preset coefficient
  • a second mode determining sub-module configured to determine, in a case that the determination result of the speed determining sub-module is YES, the discarding mode of the to-be-determined video frame as a target video frame discarding mode
  • a mode update sub-module configured to update the to-be-determined video frame discarding mode to a next-priority video according to a priority from high to low in a case that the determining result of the speed determining sub-module is negative
  • the frame discarding mode is used to trigger the mode selection module until the video frame discarding mode to be determined is the lowest priority video frame discarding mode, and the to-be-determined video frame discarding mode is determined as the target video frame discarding mode.
  • the velocity estimation module is configured according to the following formula to estimate the current data transfer speed Speed actual:
  • Speed n ... Speed 1 is: the historical data transmission speed from the shortest to the long time, n times according to the preset statistical rules, T n ... T 1 is: respectively with Speed n ... Speed 1 corresponding preset coefficient, the sum of T n ... T 1 is equal to 1.
  • the T n ⁇ (T n-1 + . . . + T 1 ).
  • the video playback device further includes:
  • a playback request receiving module configured to receive a video playback request sent by the client before the request receiving module receives the data acquisition request
  • a query request sending module configured to send, according to the video playback request, a video segment query request for a video to be played back to the storage management server;
  • a query result receiving module configured to receive a query result fed back by the storage management server, where the query result includes a storage server corresponding to the video segment;
  • a data cache module configured to obtain video data of the to-be-played video from the storage server based on the video segment according to the query result, and cache the obtained video data.
  • an embodiment of the present application discloses a server, where the server includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for executing the video playback method described in each of the implementations described above.
  • the embodiment of the present application discloses an application program for executing the video playback method described in each implementation manner described above at runtime.
  • the embodiment of the present application discloses a storage medium for storing executable code, and the executable code is used to execute the video playback method described in each implementation manner described above.
  • the current data transmission speed is estimated according to the historical data transmission speed.
  • the target video frame discarding mode is selected from the preset video frame discarding mode, and then the video data of the video to be played back is performed according to the target video frame discarding mode.
  • the processing is discarded, and the discarded video data is sent to the client, so that the client can implement playback of the video to be played back.
  • the video data sent to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Therefore, applying the solution provided by the embodiment of the present application can reduce the network bandwidth requirement during video playback.
  • FIG. 1 is a schematic flowchart of a video playback method according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a method for selecting a target video frame discarding manner according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a cloud video storage system according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a signaling process of a video playback method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a video playback apparatus according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic flowchart of a video playback method according to an embodiment of the present disclosure, where the method includes:
  • S101 Receive a data acquisition request sent by the client for the video to be played back.
  • the executor of the embodiment of the present application may be a data forwarding server in a video cloud storage system, and may be any server that can provide video data of a video to be played back, which is not limited in this application.
  • the foregoing data acquisition request includes at least: a video playback speed, for example, a 5x speed, an 8x speed, etc., that is, a playback speed of 5 times when the video to be played back is normally played, and 8 times when the video to be played back is normally played.
  • a video playback speed for example, a 5x speed, an 8x speed, etc.
  • Speed playback, etc. of course, the above data acquisition request may also include other information, such as the identifier of the video to be played back, etc., which is not limited in this application.
  • the video to be played back may be a video corresponding to a certain identifier, may be a video encoded by a certain encoder, may be a video encoded in a certain period of time, or may be a specific encoder at a specific time period. In-coded video.
  • the video data of the video to be played back may be stored in one storage server or may be stored in multiple storage servers.
  • S102 Estimate the current data transmission speed according to the historical data transmission speed.
  • the above historical data transmission speed is obtained according to a preset statistical rule.
  • the preset statistical rule may be a statistic according to a GOP (Group of Pictures), where one GOP is composed of one I frame and a series of non-I frames, but the number of non-I frames is not limited, The frame is the beginning of the entire GOP.
  • GOP Group of Pictures
  • one GOP is composed of 1 I frame and 14 P frames, or one GOP is composed of 1 I frame, 14 P frames, and 10 B frames, and the like.
  • a GOP When determining a GOP, a GOP can be considered to start when an I is detected, and then subsequent frames are detected frame by frame. When the I frame is detected again, the GOP is considered to have ended, and another GOP is started.
  • the preset statistical rule may also be a statistic according to time, for example, statistics performed in units of 1 second, and the like.
  • Speed n ... Speed 1 is: the historical data transmission speed from the shortest to the long time, n times according to the preset statistical rules, T n ... T 1 is: respectively with Speed n ... Speed 1 corresponding preset coefficient, the sum of T n ... T 1 is equal to 1.
  • the transmission data corresponding to the historical data transmission speed that is longer than the current time has been relatively stable, and the transmission data corresponding to the historical data transmission speed that is shorter than the current time may still fluctuate.
  • the above T n ⁇ (T n-1 + . . . + T 1 ) can ensure the accuracy of the estimated current data transmission speed as much as possible.
  • n may be 2, 3, 4, 5, etc., as the value of n increases, the richer information available when estimating Speed actual , the more accurate the estimated Speed actual is .
  • the present application does not limit the value of n described above, since the duration from the current time is too long, the correlation between the historical data transmission speed and the actual data transmission speed at the current time is weakened, so n The value of the value cannot be increased. In practical applications, the value of n can be selected according to the specific situation.
  • n 2 + 0.2 * Speed 2 ;
  • n 3
  • Speed actual 0.4 * Speed 1 + 0.4 * Speed 2 + 0.2 * Speed 3 ;
  • S103 Select a target video frame discarding mode from a preset video frame discarding mode according to a current data transmission speed and a theoretical data transmission speed corresponding to the preset video frame discarding mode.
  • the foregoing preset video frame discarding manner may include multiple manners.
  • the video frame discarding method is mainly for discarding non-I frames, for example, discarding part or all of the P frames, discarding part or all of the B frames, and the like. This way can be understood as a discarding process for a complete video frame.
  • part of the data of the video frame may be discarded, for example, downsampling the video frame, thereby reducing the resolution of the video.
  • the method can not only discard non-I frames, but also can process I frames. Line drop processing.
  • a frame rate of a video to be played back is 25 frames/s
  • an I frame interval is 25 frames (one I frame per second)
  • one GOP includes one I frame 24
  • the number of bits of the P frame and the I frame is 30% of the code rate, and the optimal picture clarity and the best picture fluency are targeted.
  • the preset video frame discarding mode can be seen in Table 1 below.
  • the P frame When the P frame is discarded in the mode B and the mode C, the P frame can be uniformly selected and discarded according to a certain interval, so that the playback effect during video playback is smooth, and there is no jamming phenomenon.
  • the discard operation is performed on some non-key frames, which can save bandwidth on the one hand and reduce the actual number of frames on the other hand, thereby reducing the pressure of hardware decoding display.
  • the video condition can be selected according to the network condition and the hardware condition.
  • the discarding method that is, the best multi-speed playback can be achieved without affecting the visual effect and without upgrading the hardware device.
  • the scene is often large and the target is relatively small. If the target of multi-speed and full frame rate playback cannot be achieved, according to the video frame discarding schemes listed in Table 1 above, the resolution and smoothness of the playback process picture can be preferentially guaranteed.
  • the above theoretical data transmission speed is determined according to the video playback speed.
  • the transmission speed Speed ideal can be calculated according to the following formula:
  • the foregoing playback speed may be sent by the client, and the code rate may be obtained after the data forwarding server reads the video data of the video to be played back from the storage server, and the bandwidth compression rate may be based on the number of bits of the I frame.
  • the value in the ratio is obtained, and the value can be a preset value.
  • the target video frame discarding mode is selected from the preset video frame discarding mode according to the current data transmission speed and the theoretical data transmission speed corresponding to the preset video frame discarding mode
  • the video frame discarding mode in which the discarding mode of the video frame to be determined is the highest priority in the discarding mode of the video frame may be determined first;
  • Target theoretical data transmission speed corresponding to the discarding mode of the video frame to be determined is calculated, and the calculated theoretical data transmission speed may be referred to as: Target theoretical data transmission speed;
  • the video frame discarding mode to be determined is updated to the next priority video frame discarding mode, and the bandwidth compression rate according to the to-be-determined video frame discarding mode is returned,
  • the video playback magnification and the code rate of the video to be played back the step of calculating the target theoretical data transmission speed corresponding to the discarding mode of the video frame to be determined, until the video frame discarding mode is determined to be the lowest priority video frame discarding mode and the video frame to be determined
  • the discard mode is determined as the target video frame discard mode.
  • the foregoing first preset coefficient may be 0.9, 0.8, etc., which is not limited in this application.
  • S104 discard the video data to be played back according to the target video frame discarding manner, And sending the discarded video data to the client, so that the client plays back the playback video.
  • the alarm prompt information may also be generated, and the operation and maintenance personnel determine whether the network has a fault, and then perform manual intervention. Allows users to watch better video playback effects.
  • the video playback method provided by the embodiment of the present application may be applied to a data forwarding server in a video cloud storage system
  • the video cloud storage system may include: a storage management server in addition to the data forwarding server. , storage server, and more.
  • the video data is stored in the storage server. Since there may be multiple storage servers in the system, for one video, the video data may be stored in multiple storage servers. For example, video data of one video is divided into a plurality of video segments, and video data is stored in each storage server based on the video segments.
  • the storage management server can be used to store the correspondence between each video segment and the storage server in which it resides.
  • the method before receiving the data acquisition request for the video to be played back sent by the client, the method may further include:
  • the video data of the video to be played back is obtained from the storage server based on the video segment, and the obtained video data is buffered.
  • the video data of the video to be played back in the storage server is discarded according to the target video frame discarding mode.
  • the target video frame discarding mode is selected from the preset video frame discarding mode, and then the video of the video to be played back is processed according to the target video frame discarding mode.
  • the data is discarded, and the discarded video data is sent to the client, so that the client can implement playback of the video to be played back.
  • the video data sent to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Small, therefore, applying the solution provided by the various embodiments described above can reduce the network bandwidth requirement during video playback.
  • the video playback method provided by the embodiment of the present application is further described in detail by using a specific example.
  • Example 1 Combining the information given in Table 1, Figure 2 provides a schematic flow chart of a method for selecting a target video frame discarding mode, assuming that the five video frames listed in Table 1 are in order of priority from highest to lowest.
  • the order of the discarding mode is: mode A, mode B, mode C, mode D, mode E, and the first preset threshold is equal to 0.9.
  • the discarding mode of the video frame to be determined is mode A.
  • the bandwidth compression ratio of the mode A, the video playback ratio, and the code rate of the video to be played back the theoretical data transmission speed S A corresponding to the calculation mode A is determined, and the current data transmission speed S Cur is determined. Whether it is greater than or equal to the theoretical data transmission speed S A *0.9 corresponding to mode A. If yes, the target video frame discarding mode is mode A. If not, the video frame discarding mode to be determined is updated to mode B, and the following steps are performed. .
  • the theoretical data transmission speed S B corresponding to the calculation mode B is determined whether the current data transmission speed S Cur is greater than or equal to the theoretical data transmission speed S corresponding to the mode B. B * 0.9. If yes, the target video frame discarding mode is mode B. If no, the video frame discarding mode to be determined is updated to mode C, and the following steps are performed.
  • the theoretical data transmission speed S C corresponding to the calculation mode C is determined whether the current data transmission speed S Cur is greater than or equal to the theoretical data transmission speed S corresponding to the mode C. C * 0.9. If yes, the target video frame discarding mode is mode C. If no, the video frame discarding mode to be determined is updated to mode D, and the following steps are performed.
  • the theoretical data transmission speed S D corresponding to the calculation mode D is determined whether the current data transmission speed S Cur is greater than or equal to the theoretical data transmission speed S corresponding to the mode D. D * 0.9. If yes, the target video frame discarding mode is mode D. If no, the video frame discarding mode to be determined is updated to mode E, and the target video frame discarding mode is mode E.
  • the mode E is used to discard the video frame, and an alarm prompt message may be generated to prompt the operation and maintenance personnel to perform manual intervention.
  • the video data is continuously transmitted to the client. After the discarded video data is sent to the client in the above manner, if it is determined that the video data needs to be transmitted, the process may be repeated again until the video data is transmitted. The data transfer ends.
  • Example 2 Based on the video cloud storage system, the above video playback method is introduced.
  • FIG. 3 is a schematic structural diagram of a video cloud storage system according to an embodiment of the present disclosure.
  • the video cloud storage system includes: a client (video integrated platform), a CVM (Cloud Video Master, storage management server), and a CVS (Cloud Video Slave, storage). Server) and CDT (Cloud Data Transmitter).
  • FIG. 4 is a schematic diagram of a signaling flow of a video playback method provided on the basis of FIG. 3. Specifically, the video playback process includes the following steps:
  • Step 1 The client sends a CDT address acquisition request to the CVM. After receiving the CDT address acquisition request, the CVM obtains the address of the CDT and returns an address of the available CDT to the client.
  • Step 2 The client sends a video playback request to the CDT according to the received CDT address;
  • Step 3 After receiving the video playback request, the CDT queries the CVM for all video segment information of the current encoder and the start time.
  • the CVM queries all storage servers in the cloud domain according to the encoder trajectory table, and returns the query result to the CDT.
  • the foregoing query result may include a storage server where each video segment is located, and the video segments may be located in the same storage server or may be located in different storage servers;
  • Step4 The CDT opens up a new thread, and downloads the video data to the CVS one by one according to the above query result, and waits for the client to obtain the data from the cache;
  • Step 5 The client obtains data from the buffer area of the CDT according to the requirements of the user for the video playback double speed and the decoding display speed requirement;
  • Step6 CDT estimated current data transmission rate based on historical data transmission speed, in particular, according to the current distance of the shortest length of time the data transmission speed two historical, estimated speed Speed actual current data transmission in accordance with the following expression:
  • the CDT selects the target video frame discarding mode from the video frame discarding modes listed in Table 1 according to the flowchart shown in FIG. 2; the CDT discards the video data in the buffer area by using the above-mentioned target video frame discarding mode, and discards the video data.
  • the processed video data is forwarded to the client so that the client can play back the received video data.
  • the CDT obtains the request data from a CVS, and after discarding the requested data and forwarding it to the client, the CDT can continue to obtain the request data from other CVSs, and repeat the above-mentioned request data discarding. The process of processing and forwarding to the client.
  • the embodiment of the present application further provides a video playback apparatus.
  • FIG. 5 is a schematic structural diagram of a video playback apparatus according to an embodiment of the present disclosure, where the foregoing apparatus includes:
  • the request receiving module 501 is configured to receive a data acquisition request sent by the client for the video to be played back, where the data acquisition request includes: a video playback double speed;
  • the speed estimation module 502 is configured to estimate a current data transmission speed according to a historical data transmission speed, where the historical data transmission speed is obtained according to a preset statistical rule;
  • the mode selection module 503 is configured to select a target video frame discarding mode from the preset video frame discarding mode according to the current data transmission speed and a theoretical data transmission speed corresponding to the preset video frame discarding mode, where The theoretical data transmission speed is determined according to the video playback speed;
  • the discarding processing module 504 is configured to discard the video data of the to-be-played video according to the target video frame discarding manner, and send the discarded video data to the client. So that the client plays back the video to be played back.
  • the mode selection module 503 may include:
  • the first mode determining sub-module is configured to determine that the video frame discarding mode of the to-be-determined video frame is the highest priority video frame discarding mode in the preset video frame discarding mode;
  • a speed calculation sub-module configured to calculate, according to the bandwidth compression ratio of the to-be-determined video frame discarding mode, the video playback magnification, and the code rate of the to-be-played video, target theoretical data corresponding to the to-be-determined video frame discarding mode transfer speed;
  • a speed judging sub-module configured to determine whether the target theoretical data transmission speed is greater than or equal to a product of the current data transmission speed and the first preset coefficient
  • a second mode determining sub-module configured to determine, in a case that the determination result of the speed determining sub-module is YES, the discarding mode of the to-be-determined video frame as a target video frame discarding mode
  • a mode update sub-module configured to update the to-be-determined video frame discarding mode to a next-priority video according to a priority from high to low in a case that the determining result of the speed determining sub-module is negative
  • the frame discarding mode is used to trigger the mode selection module until the video frame discarding mode to be determined is the lowest priority video frame discarding mode, and the to-be-determined video frame discarding mode is determined as the target video frame discarding mode.
  • the velocity estimation module 502 may be specifically configured according to the following formula to estimate the current data transfer speed Speed actual:
  • Speed n ... Speed 1 is: the historical data transmission speed from the shortest to the long time, n times according to the preset statistical rules, T n ... T 1 is: respectively with Speed n ... Speed 1 corresponding preset coefficient, the sum of T n ... T 1 is equal to 1.
  • the T n ⁇ (T n-1 + . . . + T 1 ).
  • the video playback device may further include:
  • the information generating module is configured to generate alarm prompt information when the target video frame discarding mode is the lowest priority video frame discarding mode.
  • the video playback device may further include:
  • a playback request receiving module configured to receive a video playback request sent by the client before the request receiving module 501 receives the data acquisition request
  • a query request sending module configured to send, according to the video playback request, a video segment query request for a video to be played back to the storage management server;
  • a query result receiving module configured to receive a query result fed back by the storage management server, where the query result includes a storage server corresponding to the video segment;
  • a data cache module configured to obtain video data of the to-be-played video from the storage server based on the video segment according to the query result, and cache the obtained video data.
  • the current data transmission speed is estimated according to the historical data transmission speed, according to the current data transmission speed and the preset video.
  • the theoretical data transmission speed corresponding to the frame discarding mode is selected from the preset video frame discarding mode, and then the video data to be played back is discarded according to the target video frame discarding mode, and the discarding process is sent to the client.
  • the client can implement playback of the video to be played back.
  • the video data sent to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Small, therefore, applying the solution provided by the various embodiments described above can reduce the network bandwidth requirement during video playback.
  • the embodiment of the present application further provides a server, where the server includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for executing a video playback method
  • the above video playback method includes:
  • the server after receiving the data acquisition request sent by the client for the video to be played back, the server estimates the current data transmission speed according to the historical data transmission speed, according to the current data transmission speed and the preset video.
  • the theoretical data transmission speed corresponding to the frame discarding mode is selected from the preset video frame discarding mode, and then the video data to be played back is discarded according to the target video frame discarding mode, and the discarding process is sent to the client.
  • the client can implement playback of the video to be played back.
  • the video data sent by the server to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Small, therefore, applying the solution provided by this embodiment can reduce the network bandwidth requirement during video playback.
  • the above video playback method includes:
  • the server after receiving the data acquisition request sent by the client for the video to be played back, the server estimates the current data transmission speed according to the historical data transmission speed, according to the current data transmission. Speed and the theoretical data transmission speed corresponding to the preset video frame discarding mode, selecting the target video frame discarding mode from the preset video frame discarding mode, and then discarding the video data to be played back according to the target video frame discarding mode, and The discarded video data is sent to the client, so that the client can implement playback of the video to be played back.
  • the video data sent by the server to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Small, therefore, applying the solution provided by this embodiment can reduce the network bandwidth requirement during video playback.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store executable code, and the executable code is used to execute a video playback method;
  • the above video playback method includes:
  • the server after executing the executable code stored in the foregoing storage medium, receives the data acquisition request sent by the client for the video to be played back, and estimates the current data transmission according to the historical data transmission speed.
  • Speed according to the current data transmission speed and the theoretical data transmission speed corresponding to the preset video frame discarding mode, select the target video frame discarding mode from the preset video frame discarding mode, and then treat the video of the playback video according to the target video frame discarding mode.
  • the data is discarded, and the discarded video data is sent to the client, so that the client can implement playback of the video to be played back.
  • the video data sent by the server to the client is the video data after the video frame discarding process is performed. Therefore, compared with the video data of all the videos to be played back, the network bandwidth requirement is compared. Small, therefore, applying the solution provided by this embodiment can reduce the network bandwidth requirement during video playback.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本申请实施例公开了一种视频回放方法及装置,涉及视频通信技术领域,其中,上述方法包括:接收客户端发送的针对待回放视频的数据获取请求,其中,根据历史数据传输速度估算当前数据传输速度;根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。应用本申请实施例提供的方案,降低了视频回放时对网络带宽的要求。

Description

一种视频回放方法及装置
本申请要求于2016年6月12日提交中国专利局、申请号为201610409041.5发明名称为“一种视频回放方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及视频通信技术领域,特别涉及一种视频回放方法及装置。
背景技术
随着计算机和网络技术的快速发展,视频云存储系统得到了广泛的应用,尤其是在视频监控领域中得到了广泛的应用。常见的视频云存储系统包括:客户端、管理服务器、存储服务器和数据转发服务器。
另外,在视频云存储系统中往往需要对视频进行多倍速回放,相关技术中在视频云存储系统中进行视频回放时一般包括以下步骤:
客户端向存储管理服务器请求数据转发服务器的地址;
存储管理服务器确定数据转发服务器,并将数据转发服务器的地址发送至客户端;
客户端向数据转发服务器发送视频回放请求;
数据转发服务器接收到视频回放请求后,从存储服务器中获得待回放视频的视频数据,并缓存所获得的视频数据;
客户端从数据转发服务器中获得缓存的视频数据,并对所获得的数据进行多倍速回放。
对于码率为4M的码流而言,如果按照上述方式进行8倍速回放,要求带宽是4*8=32(Mbps),另外,对视频进行历史回放时,往往是多画面的,故而带宽的要求须乘以回放的路数,假设回放的路数是4路,那么要求带宽是4*8*4=128(Mbps)。
而实际应用中,并不是所有的网络都能达到128Mbps的带宽,尤其回放客户端和数据转发服务器往往不在同一个网段内,这情况下对于位于手持式设备中客户端而言在3G/4G条件下更是难以达到。由此可见应用上述方式进行视频回放时对网络带宽的要求较高。
发明内容
本申请实施例公开了一种视频回放方法及装置,以降低视频回放时对网络带宽的要求。
为达到上述目的,本申请实施例公开了一种视频回放方法,所述方法包括:
接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
在本申请的一种实现方式中,所述根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式的步骤,包括:
确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度;
判断所述目标理论数据传输速度是否大于等于所述当前数据传输速度与第一预设系数之积;
若为是,将所述待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
若为否,按照优先级由高到低的顺序,将所述待判定视频帧丢弃方式更 新为下一优先级的视频帧丢弃方式,并返回所述根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度的步骤,直至所述待判定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将所述待判定视频帧丢弃方式确定为所述目标视频帧丢弃方式。
在本申请的一种实现方式中,所述根据历史数据传输速度估算当前数据传输速度的步骤,包括:
按照以下公式,估算当前数据传输速度Speedactual
Speedactual=T1*Speed1+……+Tn*Speedn
其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
在本申请的一种实现方式中,所述Tn<(Tn-1+……+T1)。
在本申请的一种实现方式中,在所述接收客户端发送的针对待回放视频的数据获取请求步骤之前,还包括:
接收所述客户端发送的视频回放请求;
根据所述视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
接收所述存储管理服务器反馈的查询结果,其中,所述查询结果中包括视频段对应的存储服务器;
根据所述查询结果,基于视频段从存储服务器中获得所述待回放视频的视频数据,并缓存所获得的视频数据。
为达到上述目的,本申请实施例公开了一种视频回放装置,所述装置包括:
请求接收模块,用于接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
速度估算模块,用于根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
方式选择模块,用于根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
丢弃处理模块,用于按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
在本申请的一种实现方式中,所述方式选择模块,包括:
第一方式确定子模块,用于确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
速度计算子模块,用于根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度;
速度判断子模块,用于判断所述目标理论数据传输速度是否大于等于所述当前数据传输速度与第一预设系数之积;
第二方式确定子模块,用于在所述速度判断子模块的判断结果为是的情况下,将所述待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
方式更新子模块,用于在所述速度判断子模块的判断结果为否的情况下,按照优先级由高到低的顺序,将所述待判定视频帧丢弃方式更新为下一优先级的视频帧丢弃方式,并触发所述方式选择模块,直至所述待判定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将所述待判定视频帧丢弃方式确定为所述目标视频帧丢弃方式。
在本申请的一种实现方式中,所述速度估算模块,具体用于按照以下公式,估算当前数据传输速度Speedactual
Speedactual=T1*Speed1+……+Tn*Speedn
其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照 预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
在本申请的一种实现方式中,所述Tn<(Tn-1+……+T1)。
在本申请的一种实现方式中,所述视频回放装置还包括:
回放请求接收模块,用于在所述请求接收模块接收所述数据获取请求之前,接收所述客户端发送的视频回放请求;
查询请求发送模块,用于根据所述视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
查询结果接收模块,用于接收所述存储管理服务器反馈的查询结果,其中,所述查询结果中包括视频段对应的存储服务器;
数据缓存模块,用于根据所述查询结果,基于视频段从存储服务器中获得所述待回放视频的视频数据,并缓存所获得的视频数据。
为达到上述目的,本申请实施例公开了一种服务器,所述服务器包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行上述各个实现方式所述的视频回放方法。
为达到上述目的,本申请实施例公开了一种应用程序,所述应用程序用于在运行时执行上述各个实现方式所述的视频回放方法。
为达到上述目的,本申请实施例公开了一种存储介质,所述存储介质用于存储可执行代码,所述可执行代码用于执行上述各个实现方式所述的视频回放方法。
由以上可见,本申请实施例提供的方案中,接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速度, 根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,本申请实施例提供的方案中,向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用本申请实施例提供的方案,能够降低视频回放时对网络带宽的要求。
附图说明
为了更清楚地说明本申请实施例和相关技术的技术方案,下面对实施例和相关技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种视频回放方法的流程示意图;
图2为本申请实施例提供的一种目标视频帧丢弃方式选择方法的流程示意图;
图3为本申请实施例提供的一种云视频存储系统的结构示意图;
图4为本申请实施例提供的一种视频回放方法的信令流程示意图;
图5为本申请实施例提供的一种视频回放装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
图1为本申请实施例提供的一种视频回放方法的流程示意图,该方法包括:
S101:接收客户端发送的针对待回放视频的数据获取请求。
需要说明的是,本申请实施例的执行主体可以是视频云存储系统中的数据转发服务器,当然也可以是其它能够提供待回放视频的视频数据的任何服务器,本申请并不对此进行限定。
另外,上述数据获取请求中至少需包括:视频回放倍速,例如,5倍速、8倍速等等,也就是以待回放视频正常播放时5倍的速度回放、以待回放视频正常播放时8倍的速度回放等等,当然,上述数据获取请求中还可以包括其它信息,例如,待回放视频的标识等等,本申请也不对此进行限定。
上述待回放视频可以是对应于某一确定标识的视频,可以是一台确定的编码器所编码的视频,可以是一定时间段内编码的视频,还可以是特定的编码器在特定的时间段内编码的视频。
另外,在云视频存储系统中,上述待回放视频的视频数据可能存储于一台存储服务器中,也可能存储于多台存储服务器中。
S102:根据历史数据传输速度估算当前数据传输速度。
上述历史数据传输速度为按照预设统计规则统计得到的。
可选的,上述预设统计规则可以是按照GOP(Group of Pictures)进行的统计,其中,一个GOP由一个I帧和一系列的非I帧组成,但并不限定非I帧的数量,I帧为整个GOP的开始。
例如,一个GOP由1个I帧和14个P帧组成,或者一个GOP由1个I帧、14个P帧和10个B帧组成等等。
在确定一个GOP时,可以在检测到一个I时认为一个GOP开始了,然后逐帧检测后续各帧,当再次检测到I帧时,认为该GOP结束了,同时另一个GOP开始了。
在按照GOP进行统计时,若检测到一个GOP结束了,则可以开始进行统计,得到该GOP对应的历史数据传输速度。
另外,上述预设统计规则还可以是按照时间进行的统计,例如,以1秒为单位进行的统计等等。
在本申请的一种可选实现方式中,根据历史数据传输速度估算当前数据 传输速度时,可以按照以下公式,估算当前数据传输速度Speedactual
Speedactual=T1*Speed1+……+Tn*Speedn
其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
本领域内的技术人员可以理解的是,距离当前时刻时长较长的历史数据传输速度对应的传输数据已比较平稳,而距离当前时刻时长较短的历史数据传输速度对应的传输数据可能还存在波动,鉴于此,在本申请的一种可选实现方式中,上述Tn<(Tn-1+……+T1),这样可以尽可能的保证估算得到的当前数据传输速度的准确性。
具体的,上述n的取值可以为2、3、4、5等等,随着n的取值增大,估算Speedactual时可用的信息越丰富,估算得到的Speedactual越准确。然而,虽然本申请并不限定上述n的取值,但是由于距离当前时刻的时长过长的情况下,历史数据传输速度与当前时刻的实际数据传输速度之间的关联性会减弱,所以,n的取值也不可一味增大,实际应用中可以根据具体情况选择n的取值。
例如,n的取值可以为2,Speedactual=0.8*Speed1+0.2*Speed2
n的取值可以为3,Speedactual=0.4*Speed1+0.4*Speed2+0.2*Speed3
或者Speedactual=0.3*Speed1+0.5*Speed2+0.2*Speed3等等。
S103:根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式。
具体的,上述预设的视频帧丢弃方式中可以包含多种方式。
可以理解的,I帧是其它视频帧正常解码的基础,所以,上述视频帧丢弃方式主要是针对非I帧进行丢弃处理,例如,丢弃部分或者全部P帧、丢弃部分或者全部B帧等等,这种方式可以理解为是对完整的视频帧的丢弃处理。
另外,在对视频帧进行丢弃处理时,除了可以丢弃完整的视频帧之外,还可以丢弃视频帧的部分数据,例如,对视频帧进行下采样处理,这样可以降低视频的分辨率,这种方式不仅可以对非I帧进行丢弃处理,还可以对I帧进 行丢弃处理。
具体的,在本申请的一种实现方式中,假设,待回放视频的帧率为25帧/s、I帧间隔为25帧(每秒一个I帧),也就是一个GOP包含一个I帧24个P帧、I帧的比特数占码率的30%,以最优画面清晰度、最佳画面流畅度为目标,预设的视频帧丢弃方式可以参见如下表1所示。
表1
Figure PCTCN2017073568-appb-000001
其中,方式B和方式C中丢弃P帧时可以按照一定间隔均匀选择P帧进行丢弃处理,这样可以保证视频回放时回放效果流畅,不存在卡顿现象。
从上表可以看出,对一些非关键帧执行丢弃操作,一方面可以节省带宽,另外一方面又能够减少实际的帧数目,从而降低硬件解码显示的压力。但是丢弃过多的非关键帧虽然可以节省网络带宽,但是又会导致整个画面的流畅性比较差,故而应用本申请实施例提供的方案进行视频回放时,可以兼顾网络条件和硬件条件选择视频帧丢弃方式,也就是能够在不影响视觉效果、不升级硬件设备的情况下达到最佳的多倍速回放。
尤其是对于监控视频而言,往往是场景比较大,目标相对比较小。如果多倍速、全帧率回放的目标无法实现,按照上述表1列出的几种视频帧丢弃方案,能够优先保证回放过程画面的清晰度和流畅度。
另外,上述理论数据传输速度为根据视频回放倍速确定的。
对一路的多倍速视频回放而言,假设,当前视频帧丢弃方式下的带宽压 缩率为Compress,回放倍速为Rate,待回放视频的码率为Bits,那么上述当前视频帧丢弃方式对应的理论数据传输速度Speedideal可以按照以下公式计算得到:
Speedideal=Rate*Bits*Compress。
具体的,上述回放倍速可以是客户端发送的,码率可以是数据转发服务器从存储服务器中读取待回放视频的视频数据后得到的,而带宽压缩率可以是根据I帧的比特数在码率中的占比得到的,该值可以为预先设定的数值。
在本申请的一种实现方式中,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式时,
可以先确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
然后根据待判定视频帧丢弃方式的带宽压缩率、视频回放倍率和待回放视频的码率,计算待判定视频帧丢弃方式对应的理论数据传输速度,计算得到的理论数据传输速度可以称之为:目标理论数据传输速度;
判断上述目标理论数据传输速度是否大于等于当前数据传输速度与第一预设系数之积;
若为是,将待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
若为否,按照优先级由高到低的顺序,将待判定视频帧丢弃方式更新为下一优先级的视频帧丢弃方式,并返回上述根据所述待判定视频帧丢弃方式的带宽压缩率、视频回放倍率和待回放视频的码率,计算待判定视频帧丢弃方式对应的目标理论数据传输速度的步骤,直至待判定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将待判定视频帧丢弃方式确定为目标视频帧丢弃方式。
具体的,上述第一预设系数可以为0.9、0.8等等,本申请并不对此进行限定。
S104:按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理, 并向客户端发送丢弃处理后的所述视频数据,以使得客户端对待回放视频进行回放。
本申请的一种实现方式中,在目标视频帧丢弃方式为优先级最低的视频帧丢弃方式的情况下,还可以生成报警提示信息,由运维人员确定网络是否存在故障,进而进行人工干预以使得用户观看到较佳的视频回放效果。
前面的描述中提到,本申请实施例提供的视频回放方法可以应用于视频云存储系统中的数据转发服务器,而视频云存储系统中除了可以包括数据转发服务器外,还可以包括:存储管理服务器、存储服务器等等。其中,视频数据存储于存储服务器中,由于该系统中可以存在多台存储服务器,所以,对于一个视频而言,其视频数据可以存储于多台存储服务器中。例如,将一个视频的视频数据划分为多个视频段,以视频段为基准在各台存储服务器中存储视频数据。另外,存储管理服务器可以用于存储各个视频段与其所在的存储服务器之间的对应关系。
基于上述情况,本申请的一种实现方式中,在接收客户端发送的针对待回放视频的数据获取请求之前,还可以包括:
接收客户端发送的视频回放请求;
根据视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
接收存储管理服务器反馈的查询结果,其中,查询结果中包括视频段对应的存储服务器;
根据查询结果,基于视频段从存储服务器中获得待回放视频的视频数据,并缓存所获得的视频数据。
在此基础上,S104中按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理时,可以理解为:按照目标视频帧丢弃方式对存储服务器中缓存的待回放视频的视频数据进行丢弃处理。
由以上可见,上述各个实施例提供的方案中,接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速 度,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,上述各个实施例提供的方案中,向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用上述各个实施例提供的方案,能够降低视频回放时对网络带宽的要求。
下面通过具体实例再对本申请实施例提供的视频回放方法进行更加详细的介绍。
实例一:结合表1给出的信息,图2提供了一种目标视频帧丢弃方式选择方法的流程示意图,假设,按照优先级由高到低的顺序,表1所列出的五种视频帧丢弃方式的排序为:方式A、方式B、方式C、方式D、方式E,第一预设阈值等于0.9。
估算出当前数据传输速度SCur之后,确定目标视频帧方式时,
首先确定待判定视频帧丢弃方式为方式A,根据方式A的带宽压缩率、视频回放倍率和待回放视频的码率,计算方式A对应的理论数据传输速度SA,判断当前数据传输速度SCur是否大于等于方式A对应的理论数据传输速度SA*0.9,若为是,目标视频帧丢弃方式为方式A,若为否,则将待判定视频帧丢弃方式更新为方式B,并执行以下步骤。
根据方式B的带宽压缩率、视频回放倍率和待回放视频的码率,计算方式B对应的理论数据传输速度SB,判断当前数据传输速度SCur是否大于等于方式B对应的理论数据传输速度SB*0.9,若为是,目标视频帧丢弃方式为方式B,若为否,则将待判定视频帧丢弃方式更新为方式C,并执行以下步骤。
根据方式C的带宽压缩率、视频回放倍率和待回放视频的码率,计算方式C对应的理论数据传输速度SC,判断当前数据传输速度SCur是否大于等于方式C对应的理论数据传输速度SC*0.9,若为是,目标视频帧丢弃方式为方式C,若为否,则将待判定视频帧丢弃方式更新为方式D,并执行以下步骤。
根据方式D的带宽压缩率、视频回放倍率和待回放视频的码率,计算方式D对应的理论数据传输速度SD,判断当前数据传输速度SCur是否大于等于方式D对应的理论数据传输速度SD*0.9,若为是,目标视频帧丢弃方式为方式D,若为否,则将待判定视频帧丢弃方式更新为方式E,目标视频帧丢弃方式为方式E。
另外,确定目标视频帧丢弃方式为方式E之后,采用方式E对视频帧进行丢弃处理,同时可以生成报警提示信息,提示运维人员进行人工干预。
再者,视频数据是源源不断的向客户端传输的,在按照上述方式向客户端发送丢弃处理后的视频数据后,若判断得知还有视频数据需要传输,则可以再次重复上述过程,直至数据传输结束。
实例二:以视频云存储系统为基础,对上述视频回放方法进行介绍。
图3为本申请实施例提供的视频云存储系统的结构示意图,该视频云存储系统包括:客户端(视频综合平台)、CVM(Cloud Video Master,存储管理服务器)、CVS(Cloud Video Slave,存储服务器)和CDT(Cloud Data Transmitter,数据转发服务器)。
图4为在图3的基础上,提供的一种视频回放方法的信令流程示意图,具体的,视频回放过程包括以下步骤:
Step1:客户端向CVM发送CDT地址获取请求,CVM接收CDT地址获取请求后,获取CDT的地址,并向客户端返回一个可用CDT的地址;
Step2:客户端根据所接收的CDT的地址,向CDT发送视频回放请求;
Step3:CDT接收到视频回放请求后,向CVM查询当前编码器和开始结束时间内的所有视频段信息,CVM根据编码器轨迹表向云域内的所有存储服务器进行查询,并将查询结果返回给CDT,其中,上述查询结果中可以包含各个视频段所在的存储服务器,这些视频段可能位于同一台存储服务器也可能位于不同的存储服务器;
Step4:CDT开辟一个新的线程,根据上述查询结果逐个向CVS下载视频数据放在缓存中,同时等待客户端从缓存中获取数据;
Step5:客户端根据用户对视频回放倍速的要求和解码显示速度的要求向CDT的缓存区中获取数据;
Step6:CDT根据历史数据传输速度估算当前数据传输速度,具体的,可以根据距离当前时刻时长最短的两个历史数据传输速度,按照以下表达式估算当前数据传输速度Speedactual
Speedactual=0.8*Speed1+0.2*Speed2
然后,CDT按照图2所示流程图从表1所列的视频帧丢弃方式中选择目标视频帧丢弃方式;CDT采用上述目标视频帧丢弃方式,对缓存区的视频数据进行丢弃处理,并将丢弃处理后的视频数据转发给客户端,这样客户端可以对所接收到的视频数据进行回放。
需要说明的是,CDT从一台CVS中获得请求数据,对所请求数据进行丢弃处理并转发至客户端后,CDT还可以继续从其他台CVS中获得请求数据,并重复上述对请求数据进行丢弃处理、转发至客户端的过程。
与上述视频回放方法相对应,本申请实施例还提供了一种视频回放装置。
图5为本申请实施例提供的一种视频回放装置的结构示意图,上述装置包括:
请求接收模块501,用于接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
速度估算模块502,用于根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
方式选择模块503,用于根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
丢弃处理模块504,用于按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据, 以使得所述客户端对所述待回放视频进行回放。
可选的,所述方式选择模块503可以包括:
第一方式确定子模块,用于确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
速度计算子模块,用于根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度;
速度判断子模块,用于判断所述目标理论数据传输速度是否大于等于所述当前数据传输速度与第一预设系数之积;
第二方式确定子模块,用于在所述速度判断子模块的判断结果为是的情况下,将所述待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
方式更新子模块,用于在所述速度判断子模块的判断结果为否的情况下,按照优先级由高到低的顺序,将所述待判定视频帧丢弃方式更新为下一优先级的视频帧丢弃方式,并触发所述方式选择模块,直至所述待判定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将所述待判定视频帧丢弃方式确定为所述目标视频帧丢弃方式。
可选的,所述速度估算模块502可以具体用于按照以下公式,估算当前数据传输速度Speedactual
Speedactual=T1*Speed1+……+Tn*Speedn
其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
可选的,所述Tn<(Tn-1+……+T1)。
可选的,所述视频回放装置还可以包括:
信息生成模块,用于在所述目标视频帧丢弃方式为优先级最低的视频帧丢弃方式的情况下,生成报警提示信息。
可选的,上述视频回放装置还可以包括:
回放请求接收模块,用于在所述请求接收模块501接收所述数据获取请求之前,接收所述客户端发送的视频回放请求;
查询请求发送模块,用于根据所述视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
查询结果接收模块,用于接收所述存储管理服务器反馈的查询结果,其中,所述查询结果中包括视频段对应的存储服务器;
数据缓存模块,用于根据所述查询结果,基于视频段从存储服务器中获得所述待回放视频的视频数据,并缓存所获得的视频数据。
由以上可见,上述各个实施例提供的方案中,接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速度,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,上述各个实施例提供的方案中,向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用上述各个实施例提供的方案,能够降低视频回放时对网络带宽的要求。
本申请实施例还提供了一种服务器,所述服务器包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行视频回放方法;
其中,上述视频回放方法,包括:
接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
由以上可见,本实施例提供的方案中,服务器接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速度,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,本实施例提供的方案中,服务器向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用本实施例提供的方案,能够降低视频回放时对网络带宽的要求。
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行视频回放方法:
其中,上述视频回放方法,包括:
接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
由以上可见,本实施例提供的方案中,服务器通过执行上述应用程序,接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速度,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,本实施例提供的方案中,服务器向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用本实施例提供的方案,能够降低视频回放时对网络带宽的要求。
本申请实施例还提供了一种存储介质,所述存储介质用于存储可执行代码,所述可执行代码用于执行视频回放方法;
其中,上述视频回放方法,包括:
接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处 理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
由以上可见,本实施例提供的方案中,服务器通过执行上述存储介质中存储的可执行代码,接收到客户端发送的针对待回放视频的数据获取请求后,根据历史数据传输速度估算当前数据传输速度,根据当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从预设的视频帧丢弃方式中选择目标视频帧丢弃方式,然后按照目标视频帧丢弃方式对待回放视频的视频数据进行丢弃处理,并向客户端发送丢弃处理后的视频数据,这样客户端可以实现对待回放视频的回放。可见,本实施例提供的方案中,服务器向客户端发送的视频数据为进行过视频帧丢弃处理之后的视频数据,所以,与全部发送待回放视频的视频数据相比,对网络带宽的需求较小,因此,应用本实施例提供的方案,能够降低视频回放时对网络带宽的要求。
对于装置、服务器、应用程序以及存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (13)

  1. 一种视频回放方法,其特征在于,所述方法包括:
    接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
    根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
    根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
    按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频帧丢弃方式的步骤,包括:
    确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
    根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度;
    判断所述目标理论数据传输速度是否大于等于所述当前数据传输速度与第一预设系数之积;
    若为是,将所述待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
    若为否,按照优先级由高到低的顺序,将所述待判定视频帧丢弃方式更新为下一优先级的视频帧丢弃方式,并返回所述根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度的步骤,直至所述待判 定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将所述待判定视频帧丢弃方式确定为所述目标视频帧丢弃方式。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据历史数据传输速度估算当前数据传输速度的步骤,包括:
    按照以下公式,估算当前数据传输速度Speedactual
    Speedactual=T1*Speed1+……+Tn*Speedn
    其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
  4. 根据权利要求3所述的方法,其特征在于,所述Tn<(Tn-1+……+T1)。
  5. 根据权利要求1所述的方法,其特征在于,在所述接收客户端发送的针对待回放视频的数据获取请求步骤之前,还包括:
    接收所述客户端发送的视频回放请求;
    根据所述视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
    接收所述存储管理服务器反馈的查询结果,其中,所述查询结果中包括视频段对应的存储服务器;
    根据所述查询结果,基于视频段从存储服务器中获得所述待回放视频的视频数据,并缓存所获得的视频数据。
  6. 一种视频回放装置,其特征在于,所述装置包括:
    请求接收模块,用于接收客户端发送的针对待回放视频的数据获取请求,其中,所述数据获取请求中包括:视频回放倍速;
    速度估算模块,用于根据历史数据传输速度估算当前数据传输速度,其中,所述历史数据传输速度为按照预设统计规则统计得到的;
    方式选择模块,用于根据所述当前数据传输速度和预设的视频帧丢弃方式对应的理论数据传输速度,从所述预设的视频帧丢弃方式中选择目标视频 帧丢弃方式,其中,所述理论数据传输速度为根据所述视频回放倍速确定的;
    丢弃处理模块,用于按照所述目标视频帧丢弃方式对所述待回放视频的视频数据进行丢弃处理,并向所述客户端发送丢弃处理后的所述视频数据,以使得所述客户端对所述待回放视频进行回放。
  7. 根据权利要求6所述的装置,其特征在于,所述方式选择模块,包括:
    第一方式确定子模块,用于确定待判定视频帧丢弃方式为预设的视频帧丢弃方式中优先级最高的视频帧丢弃方式;
    速度计算子模块,用于根据所述待判定视频帧丢弃方式的带宽压缩率、所述视频回放倍率和所述待回放视频的码率,计算所述待判定视频帧丢弃方式对应的目标理论数据传输速度;
    速度判断子模块,用于判断所述目标理论数据传输速度是否大于等于所述当前数据传输速度与第一预设系数之积;
    第二方式确定子模块,用于在所述速度判断子模块的判断结果为是的情况下,将所述待判定视频帧丢弃方式确定为目标视频帧丢弃方式;
    方式更新子模块,用于在所述速度判断子模块的判断结果为否的情况下,按照优先级由高到低的顺序,将所述待判定视频帧丢弃方式更新为下一优先级的视频帧丢弃方式,并触发所述方式选择模块,直至所述待判定视频帧丢弃方式为优先级最低的视频帧丢弃方式并将所述待判定视频帧丢弃方式确定为所述目标视频帧丢弃方式。
  8. 根据权利要求6或7所述的装置,其特征在于,所述速度估算模块,具体用于按照以下公式,估算当前数据传输速度Speedactual
    Speedactual=T1*Speed1+……+Tn*Speedn
    其中,Speedn……Speed1为:距离当前时刻的时长由短到长的、n次按照预设统计规则统计的历史数据传输速度,Tn……T1为:分别与Speedn……Speed1对应的预设系数,Tn……T1之和等于1。
  9. 根据权利要求8所述的装置,其特征在于,所述Tn<(Tn-1+……+T1)。
  10. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    回放请求接收模块,用于在所述请求接收模块接收所述数据获取请求之前,接收所述客户端发送的视频回放请求;
    查询请求发送模块,用于根据所述视频回放请求,向存储管理服务器发送针对待回放视频的视频段查询请求;
    查询结果接收模块,用于接收所述存储管理服务器反馈的查询结果,其中,所述查询结果中包括视频段对应的存储服务器;
    数据缓存模块,用于根据所述查询结果,基于视频段从存储服务器中获得所述待回放视频的视频数据,并缓存所获得的视频数据。
  11. 一种服务器,其特征在于,所述服务器包括:
    处理器、存储器、通信接口和总线;
    所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
    所述存储器存储可执行程序代码;
    所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行权利要求1-5中任一项所述的视频回放方法。
  12. 一种应用程序,其特征在于,所述应用程序用于在运行时执行权利要求1-5中任一项所述的视频回放方法。
  13. 一种存储介质,其特征在于,所述存储介质用于存储可执行代码,所述可执行代码用于执行权利要求1-5中任一项所述的视频回放方法。
PCT/CN2017/073568 2016-06-12 2017-02-15 一种视频回放方法及装置 WO2017215279A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17812397.2A EP3471422B1 (en) 2016-06-12 2017-02-15 Video playback method and apparatus for selecting a video frame discarding scheme
US16/309,075 US10659824B2 (en) 2016-06-12 2017-02-15 Video playback method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610409041.5A CN107493482B (zh) 2016-06-12 2016-06-12 一种视频回放方法及装置
CN201610409041.5 2016-06-12

Publications (1)

Publication Number Publication Date
WO2017215279A1 true WO2017215279A1 (zh) 2017-12-21

Family

ID=60642710

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073568 WO2017215279A1 (zh) 2016-06-12 2017-02-15 一种视频回放方法及装置

Country Status (4)

Country Link
US (1) US10659824B2 (zh)
EP (1) EP3471422B1 (zh)
CN (1) CN107493482B (zh)
WO (1) WO2017215279A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143407A (zh) * 2021-11-25 2022-03-04 厦门汉印电子技术有限公司 一种远程实时预览实现设备及方法、装置、可读存储介质
CN115396696A (zh) * 2022-08-22 2022-11-25 网易(杭州)网络有限公司 视频数据传输方法、系统、处理设备及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405370B (zh) * 2019-11-13 2022-04-05 杭州海康威视系统技术有限公司 一种视频回放方法和装置
CN111784870B (zh) * 2020-06-29 2022-08-16 杭州海康威视数字技术股份有限公司 历史轨迹的回放方法、装置和电子设备
CN112437345B (zh) * 2020-11-20 2023-03-14 北京字跳网络技术有限公司 视频倍速播放方法、装置、电子设备及存储介质
CN112788366B (zh) * 2020-12-28 2023-03-24 杭州海康威视系统技术有限公司 视频处理的方法和装置
CN112929706A (zh) * 2021-03-05 2021-06-08 浙江大华技术股份有限公司 视频数据的回放方法、装置、存储介质以及电子装置
CN113194042B (zh) * 2021-03-19 2023-02-21 迅雷计算机(深圳)有限公司 一种流量传输速度的控制方法、装置以及存储介质
CN114627877A (zh) * 2022-05-09 2022-06-14 杭州海康威视数字技术股份有限公司 基于定向目标的智能语音识别安全防御方法、装置和设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013138224A2 (en) * 2012-03-13 2013-09-19 Google Inc. Adaptive trick play streaming
CN104639951A (zh) * 2013-11-06 2015-05-20 杭州海康威视数字技术股份有限公司 视频码流的抽帧处理方法及装置
CN104869430A (zh) * 2015-05-18 2015-08-26 北京中熙正保远程教育技术有限公司 一种视频倍速播放方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070058926A1 (en) 2005-09-09 2007-03-15 Microsoft Corporation Optimizing trick modes for streaming media content
US7991904B2 (en) * 2007-07-10 2011-08-02 Bytemobile, Inc. Adaptive bitrate management for streaming media over packet networks
US8904027B2 (en) * 2010-06-30 2014-12-02 Cable Television Laboratories, Inc. Adaptive bit rate for data transmission
CN102595204A (zh) * 2012-02-28 2012-07-18 华为终端有限公司 一种流媒体传输方法、设备及系统
US10397664B2 (en) * 2014-01-10 2019-08-27 Sony Corporation Method for operating a mobile device
US20150350714A1 (en) * 2014-05-29 2015-12-03 Apple Inc. Playback of video on demand

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013138224A2 (en) * 2012-03-13 2013-09-19 Google Inc. Adaptive trick play streaming
CN104639951A (zh) * 2013-11-06 2015-05-20 杭州海康威视数字技术股份有限公司 视频码流的抽帧处理方法及装置
CN104869430A (zh) * 2015-05-18 2015-08-26 北京中熙正保远程教育技术有限公司 一种视频倍速播放方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143407A (zh) * 2021-11-25 2022-03-04 厦门汉印电子技术有限公司 一种远程实时预览实现设备及方法、装置、可读存储介质
CN115396696A (zh) * 2022-08-22 2022-11-25 网易(杭州)网络有限公司 视频数据传输方法、系统、处理设备及存储介质
CN115396696B (zh) * 2022-08-22 2024-04-12 网易(杭州)网络有限公司 视频数据传输方法、系统、处理设备及存储介质

Also Published As

Publication number Publication date
CN107493482B (zh) 2020-02-04
EP3471422B1 (en) 2020-08-05
US20190313136A1 (en) 2019-10-10
US10659824B2 (en) 2020-05-19
EP3471422A4 (en) 2019-04-17
CN107493482A (zh) 2017-12-19
EP3471422A1 (en) 2019-04-17

Similar Documents

Publication Publication Date Title
WO2017215279A1 (zh) 一种视频回放方法及装置
US6910079B2 (en) Multi-threshold smoothing
US20140241415A1 (en) Adaptive streaming techniques
WO2017161998A1 (zh) 视频处理方法和装置、计算机存储介质
US7783773B2 (en) Glitch-free media streaming
US11159834B2 (en) Managing congestion response during content delivery
KR20180031547A (ko) 서버에서 멀티 비트 레이트 스트림 미디어를 적응적으로 제공하기 위한 방법 및 장치
US11005975B2 (en) Rapid optimization of media stream bitrate
JP2006115477A (ja) メディアストリームから得られるメディアの提示を行う方法およびシステム
EP2299636A1 (en) Streaming communication device, streaming communication method, and streaming communication system
WO2017161967A1 (zh) 包每秒流量监管方法、装置和计算机存储介质
JP2008005108A (ja) 映像品質推定装置、映像品質管理装置、映像品質推定方法、映像品質管理方法、およびプログラム
EP3777218A1 (en) Congestion response for timely media delivery
GB2559271A (en) Managing congestion response during content delivery
TWI431986B (zh) Information processing apparatus and method, and program
JP2011061533A (ja) コンテンツ配信システム、体感品質推定装置、方法、及び、プログラム
CN106534889A (zh) 一种基于环形缓冲的实时流媒体多路转发方法
CN107087210B (zh) 基于缓存时间判断视频播放状态的方法及终端
KR20230040872A (ko) 비디오 스트림의 전송을 제어하는 방법들 및 장치들
CN114793299A (zh) 流媒体传输控制方法、系统、设备与介质
TW201720151A (zh) 影像處理方法及其攝影機
US7301955B1 (en) Method for smoothing the transmission of a time-sensitive file
GB2572357A (en) Congestion response for timely media delivery
JP2017084044A (ja) コンテンツ配信システムのクライアント装置、コンテンツの再生開始タイミングを判定する方法及びプログラム
Zhou et al. A Markov decision based rate adaption approach for dynamic HTTP streaming

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17812397

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017812397

Country of ref document: EP

Effective date: 20190114