CN110366035A - Frame rate control method, device, computer equipment and computer readable storage medium - Google Patents
Frame rate control method, device, computer equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110366035A CN110366035A CN201910656739.0A CN201910656739A CN110366035A CN 110366035 A CN110366035 A CN 110366035A CN 201910656739 A CN201910656739 A CN 201910656739A CN 110366035 A CN110366035 A CN 110366035A
- Authority
- CN
- China
- Prior art keywords
- frame per
- frame
- target
- frame rate
- per
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management 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/258—Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
- H04N21/25866—Management of end-user data
- H04N21/25891—Management of end-user data being end-user preferences
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/4424—Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/01—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
- H04N7/0127—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level by changing the field or frame frequency of the incoming video signal, e.g. frame rate converter
Abstract
The invention discloses a kind of frame rate control method, device, computer equipment and computer readable storage mediums, belong to network technique field.The present invention passes through real-time statistics transmission frame per second during live streaming, to determine influence of the hardware configuration to live streaming, situation is fluctuated so as to the frame per second according to determined by the transmission frame per second based on real-time statistics, that automatically play frame rate progress dynamic adjustment had not both been needed main broadcaster and voluntarily controlled frame per second in this frame per second control mode, also server is not needed upon to carry out frame per second configuration, while realizing frame per second control, time cost and human cost are also saved, the required update cycle is reduced.
Description
Technical field
The present invention relates to network technique field, in particular to a kind of frame rate control method, device, computer equipment and calculating
Machine readable storage medium storing program for executing.
Background technique
In recent years, amusement and recreation industry also flourishes with the continuous improvement of Living consumption, live streaming industry is got over
It is more recognized by ordinary populace, the game live streaming since most, to amusement live streaming, outdoor live streaming etc., has opened live streaming class
Curtain.In live streaming, stable high frame-rate video stream can generate the video of clear and smooth, bring to spectators more outstanding
Audiovisual experience, but during actual live streaming, the terminal that main broadcaster uses configures different and not all terminal can
Enough steady operation, unstable frame per second under the video flowing of high frame per second will lead to audiovisual Caton, so that the audiovisual experience of spectators is very
Difference.Therefore, a kind of frame rate control method is needed, to avoid audiovisual experience problem caused by above-mentioned audiovisual Caton.
There are mainly two types of frame rate control methods traditional at present, first is that main broadcaster voluntarily controls, that is to say, main broadcaster can be at end
The frame per second that selection is suitble to oneself computer to configure in installed main broadcaster's client is held, second is that main broadcaster sets main broadcaster's client to certainly
The control of row frame per second, then can read the hardware configuration of the terminal, and according in the configuration list on server by server
With the matched frame per second of the hardware configuration, the frame per second of main broadcaster's client is configured.
In the implementation of the present invention, inventor find the relevant technologies the prior art has at least the following problems:
In the first above-mentioned implementation, the frame per second for allowing main broadcaster oneself selection that oneself terminal is suitble to configure, to main broadcaster's
Technological literacy has very high requirement, it is desirable that main broadcaster is very sensitive to video pictures Caton, and main broadcaster is needed repeatedly to be surveyed
It can just be matched to optimal frame per second after examination, implement time-consuming and trouble.And for above-mentioned second of implementation, it that is to say base
Central processing unit (Central Processing Unit, CPU) for the configuration of server, due to frame per second by terminal
With the double influence of video card, and hardware combinations configuration categories are extremely more, can also constantly be updated according to the development of technology, therefore, need
Higher maintenance cost is wanted to go to test the matching relationship in simultaneously configuration list between hardware configuration and frame per second, human cost one by one
Higher, the required update cycle also can be very long.
Summary of the invention
The embodiment of the invention provides a kind of frame rate control method, device, computer equipment and computer-readable storage mediums
Matter can solve main broadcaster in the related technology and voluntarily control frame per second time-consuming and trouble, and the frame per second based on server configures human cost
Problem higher, that the required update cycle also can be very long.The technical solution is as follows:
On the one hand, a kind of frame rate control method is provided, this method comprises:
When destination client starting, it is broadcast live according to the first play frame rate;
During the live streaming based on the destination client, the transmission frame number of the destination client is counted;
Every the first preset duration, average frame per second is determined based on the transmission frame number counted in first preset duration;
Based on multiple average frame per second, the target in the second preset duration before determining current point in time is averaged frame per second and frame
Rate fluctuates statistical value;
When frame per second fluctuation statistical value meets goal condition, it is averaged frame per second based on the target, determines target frame rate;
The play frame rate of the destination client is updated to the target frame rate from first play frame rate.
In one possible implementation, should be based on multiple average frame per second, second before determining current point in time is pre-
After if the target in duration is averaged, frame per second and frame per second fluctuate statistical value, this method further include:
When frame per second fluctuation statistical value is unsatisfactory for the goal condition, and frame per second fluctuation statistics acquired in continuous preset times
The goal condition is not satisfied in value, then the play frame rate of the destination client is updated to this from first play frame rate and first broadcast
The low-grade frame per second and the minimum value in the target frame rate for putting frame per second.
In one possible implementation, should be averaged frame per second based on the target, determine that target frame rate includes:
By the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
According to frame per second range locating for the compensation frame per second, the corresponding target frame of the frequency range is determined from multiple frame per second
Rate.
In one possible implementation, should be based on multiple average frame per second, second before determining current point in time is pre-
Before if the target in duration is averaged, frame per second and frame per second fluctuate statistical value, this method further include:
The average frame per second determined every time is stored to object queue;
It every second preset duration, detects whether the object queue has expired, when the object queue has expired, executes the base
In multiple average frame per second, the target in the second preset duration before determining current point in time be averaged frame per second and frame per second fluctuation counts
The step of value.
In one possible implementation, which updates from first play frame rate
After the target frame rate, this method further include:
It stores using the target frame rate and the current point in time as configuration data into the configuration file of the destination client.
In one possible implementation, before should being broadcast live according to the first play frame rate, this method further include:
Whether when destination client starting, detecting in the configuration file of the destination client has configuration data;
If having configuration data in the configuration file and the configuration data having not timed out, obtains frame per second in the configuration data and make
For first play frame rate;
If not having configuration data or the configuration data to have timed out in the configuration file, obtaining default frame per second conduct should
First play frame rate.
On the one hand, a kind of frame per second control device is provided, which includes:
Playing module, for being broadcast live according to the first play frame rate when destination client starting;
Statistical module, for during the live streaming based on the destination client, counting the transmission frame of the destination client
Number;
Determining module is used for every the first preset duration, based on the transmission frame number counted in first preset duration
Determine average frame per second;
The determining module is also used to determine based on multiple average frame per second in the second preset duration before current point in time
Target be averaged frame per second and frame per second fluctuation statistical value;
The determining module is also used to be averaged frame per second when the frame per second fluctuates statistical value and meets goal condition based on the target,
Determine target frame rate;
Update module, for the play frame rate of the destination client to be updated to the target frame from first play frame rate
Rate.
In one possible implementation, the device further include:
Setup module, for being unsatisfactory for the goal condition when frame per second fluctuation statistical value, and acquired in continuous preset times
Frame per second fluctuation statistical value the goal condition is not satisfied, will be in the low-grade frame per second of first play frame rate and the target frame rate
Minimum value is set as the play frame rate of the destination client.
In one possible implementation, the device further include:
Determining module, for by the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
The determining module is also used to the frame per second range according to locating for the compensation frame per second, and the frequency is determined from multiple frame per second
The corresponding target frame rate of range.
In one possible implementation, the device further include:
Memory module, for storing the average frame per second determined every time to object queue;
Detection module, for detecting whether the object queue has expired every second preset duration.
In one possible implementation, the device further include:
Memory module, for storing using the target frame rate and the current point in time as configuration data to the destination client
Configuration file in.
In one possible implementation, the device further include:
Detection module, for detecting whether to have in the configuration file of the destination client and match when destination client starting
Set data;
Module is obtained, for there is configuration data in the configuration file and in the case that the configuration data has not timed out, is obtained
Frame per second is as first play frame rate in the configuration data;
The acquisition module is also used to not have the case where configuration data or the configuration data have timed out in the configuration file
Under, default frame per second is obtained as first play frame rate.
On the one hand, provide a kind of computer equipment, the computer equipment include one or more processors and one or
Multiple memories are stored at least one program code in the one or more memory, and the program code is by this or more
A processor is loaded and is executed to realize operation performed by the frame rate control method.
On the one hand, a kind of computer readable storage medium is provided, is stored at least in the computer readable storage medium
One program code, the program code are loaded as processor and are executed to realize operation performed by the frame rate control method.
Frame rate control method, device, computer equipment and computer readable storage medium provided in an embodiment of the present invention lead to
It crosses real-time statistics during live streaming and sends frame per second, to determine influence of the hardware configuration to live streaming, so as to according to based on real
Frame per second determined by the transmission frame per second of Shi Tongji fluctuates situation, automatically to carry out dynamic adjustment to play frame rate, in this frame
It in rate control mode, had not both needed main broadcaster and has voluntarily controlled frame per second, and be not needed upon server to carry out frame per second configuration yet, realizing
While frame per second controls, time cost and human cost are also saved, the required update cycle is reduced.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of implementation environment schematic diagram of frame rate control method provided in an embodiment of the present invention;
Fig. 2 is a kind of frame rate control method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of frame rate control method flow chart provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of frame per second control device provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Fig. 1 is a kind of implementation environment schematic diagram of frame rate control method provided in an embodiment of the present invention, referring to Fig. 1, the reality
Applying environment includes: terminal 101 and server 102.
Terminal 101 is connected by wireless network or cable network with server 102.Terminal 101 can be smart phone, trip
At least one of play host, desktop computer, tablet computer, MP3 player, MP4 player and pocket computer on knee.
101 installation and operation of terminal has the application program for supporting direct broadcast service.The application program can be video-see program, social activity is answered
Share any one in program with program, instant messaging application program, information.Schematically, terminal 101 is used including main broadcaster
Terminal and the terminal that uses of ordinary user, can be logged in respectively in the application program run in terminal 101 main broadcaster's account and
Ordinary user's account.
Server 102 includes at least one in a server, multiple servers, cloud computing platform and virtualization center
Kind, server 102 includes User Information Database and user behavior information database.The User Information Database is used for storing
The data information etc. at family, which is used to store the network behavior of user on the server, such as watches
Live streaming, issuing interactive information etc..Certainly, server 102 can also include other function server, in order to provide more comprehensively and more
The service of sample.
Terminal 101 can refer to one in multiple terminals, and the present embodiment is only illustrated with terminal 101.This field
Technical staff could be aware that the quantity of above-mentioned terminal can be more or less.For example above-mentioned terminal can be only several, Huo Zheshang
Stating terminal is that tens or several hundred or greater number, the embodiment of the present application are not subject to the quantity and device type of terminal
It limits.
Fig. 2 is a kind of frame rate control method flow chart provided in an embodiment of the present invention.The executing subject of this method can be
Terminal, referring to fig. 2, this method comprises:
201, it when destination client starts, is broadcast live according to the first play frame rate.
202, during the live streaming based on the destination client, the transmission frame number of the destination client is counted.
203, every the first preset duration, average frame is determined based on the transmission frame number counted in first preset duration
Rate.
204, based on multiple average frame per second, the target in the second preset duration before determining current point in time is averaged frame per second
Statistical value is fluctuated with frame per second.
205, it when frame per second fluctuation statistical value meets goal condition, is averaged frame per second based on the target, determines target frame rate.
206, the play frame rate of the destination client is updated to the target frame rate from first play frame rate.
Through the above technical solutions, by real-time statistics transmission frame per second during live streaming, to determine hardware configuration to straight
The influence broadcast fluctuates situation so as to the frame per second according to determined by the transmission frame per second based on real-time statistics, come automatically to broadcasting
Frame per second progress dynamic adjustment is put both not needed main broadcaster in this frame per second control mode and voluntarily controlled frame per second, and be also not needed upon
Server carries out frame per second configuration, while realizing frame per second control, also saves time cost and human cost, reduces institute
The update cycle needed.
In a kind of possible implementation, when default based on multiple average frame per second, second before determining current point in time
Target in length is averaged after frame per second and frame per second fluctuation statistical value, this method further include:
When frame per second fluctuation statistical value is unsatisfactory for the goal condition, and frame per second fluctuation statistics acquired in continuous preset times
The goal condition is not satisfied in value, then sets the minimum value in the low-grade frame per second of first play frame rate and the target frame rate to
The play frame rate of the destination client.
In a kind of possible implementation, it is averaged frame per second based on the target, determines that target frame rate includes:
By the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
According to frame per second range locating for the compensation frame per second, the corresponding target frame of the frequency range is determined from multiple frame per second
Rate.
In a kind of possible implementation, when default based on multiple average frame per second, second before determining current point in time
Target in length is averaged before frame per second and frame per second fluctuation statistical value, this method further include:
The average frame per second determined every time is stored to object queue;
It every second preset duration, detects whether the object queue has expired, when the object queue has expired, executes the base
In multiple average frame per second, the target in the second preset duration before determining current point in time be averaged frame per second and frame per second fluctuation counts
The step of value.
In a kind of possible implementation, the play frame rate of the destination client is updated to this from first play frame rate
After target frame rate, this method further include:
It stores using the target frame rate and the current point in time as configuration data into the configuration file of the destination client.
In a kind of possible implementation, before being broadcast live according to the first play frame rate, this method further include:
Whether when destination client starting, detecting in the configuration file of the destination client has configuration data;
If having configuration data in the configuration file and the configuration data having not timed out, obtains frame per second in the configuration data and make
For first play frame rate;
If not having configuration data or the configuration data to have timed out in the configuration file, obtaining default frame per second conduct should
First play frame rate.
All the above alternatives can form alternative embodiment of the invention using any combination, herein no longer
It repeats one by one.
Fig. 3 is a kind of frame rate control method flow chart provided in an embodiment of the present invention.The executing subject of this method can be
Terminal, referring to Fig. 3, this method comprises:
301, when destination client starts, terminal is broadcast live according to the first play frame rate.
Wherein, which can be the client of application program involved in the embodiment of above-mentioned Fig. 1, terminal
It can be by downloading and installing the application program, so that terminal can be with operational objective client, Lai Shixian direct broadcast function.
For destination client, on startup, it can be broadcast live according to preset first play frame rate,
This, which is broadcast live, refers to and carries out Image Acquisition to acquisition according to first play frame rate by the image capture device of terminal
The image arrived carries out Video coding, and the data flow after coding is sent to server.
In embodiments of the present invention, the first play frame rate can be a preset frame per second, be also possible to a default
Frame per second, based on above two possible situation, which can specifically include following step 301A to 301D:
301A, when destination client starting when, whether in the configuration file of the destination client have configuration data, such as if detecting
Fruit is to execute step 301B, if not, executing step 301C.
Wherein, destination client has a configuration file for storing the setting parameter of some functions, and the configuration data
Refer to the data configured to play frame rate parameter, which can be in the operational process of destination client by user
Configure or configured according to the actual operation by destination client.
301B, judge whether the configuration data is overtime, if so, step 301C is executed, if not, executing step 301D.
301C, default frame per second is obtained as first play frame rate.
301D, frame per second is obtained in the configuration data as first play frame rate.
In above-mentioned steps 301A into 301D, if having configuration data in the configuration file and the configuration data has not timed out,
Frame per second is then obtained in the configuration data as first play frame rate;If do not have in the configuration file configuration data or this match
It sets data to have timed out, then obtains default frame per second as first play frame rate.By the above process, it can get as first
First play frame rate of beginning play frame rate, to start live streaming process.
It should be noted that default frame per second can be by the pre-set frame per second of server, and the frame per second in configuration data
It can be and store in the last destination client operational process to the frame per second of the configuration file.
Above-mentioned frame per second can be divided into multiple grades, for example, frame per second can be divided into 4 grades, respectively 30,24,20,15,
The default frame per second can be the frame per second maximum value in 4 grades, i.e., 30.
302, during the live streaming based on the destination client, terminal counts the transmission frame number of the destination client.
It is hard due to the destination client it should be noted that during being broadcast live according to the first play frame rate
Part is configured there may be limitation, and processing capacity may be unsatisfactory for live streaming demand, cause the used frame per second of practical transmissions with this
There are gaps for one play frame rate, therefore, it is necessary to count to the frame number actually sent, to obtain frame used by practical transmission
Rate.Wherein, the hardware configuration of the terminal may include CPU and video card, and for different terminals, hardware configuration may be different,
The operation of the destination client depends on above-mentioned hardware configuration.
303, every the first preset duration, terminal is determined flat based on the transmission frame number counted in first preset duration
Equal frame per second.
Wherein, average frame per second can be by the transmission frame number counted in first preset duration and first preset duration
Ratio determine.
It should be noted that the value of the first preset duration can be worth for pre-set determining, in the embodiment of the present invention
It is illustrated so that the first preset duration is 2 seconds as an example, which can also be any value met the requirements, this hair
Bright embodiment does not limit this.
304, terminal stores the average frame per second determined every time to object queue.
The object queue can count most for First Input First Output by the First Input First Output come storing data
Close to the frame per second situation of current point in time, obtains most close to the data of current point in time, guarantee the real-time of statistics.Wherein, mesh
The queue length for marking queue is N, and N is integer value greater than 0, the embodiment of the present invention to the specific value of N without limitation.
305, every second preset duration, terminal detects whether the object queue has expired, and when object queue has expired, then holds
Row step 306 then continues to execute step 303 when object queue is less than.
Wherein, the value of the second preset duration can also be able to be for pre-set determine value, second preset duration
Any value met the requirements, it is not limited in the embodiment of the present invention.
306, terminal is based on multiple average frame per second, and the target in the second preset duration before determining current point in time is average
Frame per second and frame per second fluctuate statistical value.
Since what is stored in object queue is average frame per second in multiple first preset durations, target is averaged frame per second
Determination method may include: using current point in time as end point, obtain using current point in time as separation pervious the
Multiple average frame per second in two preset durations, calculate the average value of multiple average frame per second, using the average value as current time
The target in the second preset duration before point is averaged frame per second.It, then can be from object queue by taking the second preset duration is M seconds as an example
It is middle to obtain nearest one multiple average frame per second progress mean value calculations in M second.
Frame per second fluctuation statistical value can be frame per second fluctuation variance yields, and frame per second fluctuation variance yields can embody frame per second the
Fluctuation situation in two preset durations fluctuates variance yields can determine whether current generation frame per second is stable by the frame per second.
In by the above process only in second preset duration nearest apart from current point in time frame per second and
It fluctuates situation, and the newest frame per second situation of available destination client in the process of running is subsequent in frame per second control to guarantee
When can be controlled based on newest frame per second situation, reach best display effect.
307, terminal judges whether frame per second fluctuation statistical value meets goal condition, if so, step 308 is executed, if
It is no, execute step 312.
Wherein, the value which can fluctuate statistical value for frame per second, which is no more than, stablizes frame per second statistical value threshold value.Wherein,
The stable frame per second statistical value threshold value is definite value, can take different values according to practical application type, the embodiment of the present invention to this not
It limits.
308, terminal by the target be averaged frame per second and target constant and value, be determined as compensating frame per second.
Wherein, the value of target constant can determine value for pre-set, which can also be to meet the requirements
Any value, it is not limited in the embodiment of the present invention.For example, above-mentioned target constant can be arranged in the embodiment of the present invention
It is 0.8.
When frame per second fluctuation statistical value meets the goal condition, show current generation frame per second be it is stable, therefore, can be with
Actual frame per second is centainly compensated, determines final frame per second to execute step 308.
309, the frame per second range according to locating for the compensation frame per second determines the corresponding target of the frequency range from multiple frame per second
Frame per second.
It is previously provided with multiple frame per second ranges at the terminal, each frame per second range corresponds to a target frame rate therefore can
With the frame per second range according to locating for compensation frame per second, to determine target frame rate used by follow-up play.
For example, the corresponding relationship between frame per second range and target frame rate can be such that
If the value of the compensation frame per second is determined as target frame rate less than 20, by 15, if the value of the compensation frame per second is not small
In 20 and less than 24, be then determined as target frame rate for 20, if the value of the compensation frame per second not less than 24 and less than 30, really by 24
It is set to target frame rate, if the value of the compensation frame per second is not less than 30, is determined as target frame rate for 30.
For example, frame per second is 23.4 if the target in the second preset duration before current point in time is averaged, first plays frame
Rate is 24, and target constant is 0.8, then compensating frame per second is 24.2, and according to the optimal frame rate that above-mentioned algorithm obtains, i.e. target frame rate is
24;
If the target in the second preset duration before current point in time is averaged, frame per second is 18.6, and the first play frame rate is
24, target constant is 0.8, then compensating frame per second is 19.4, and according to the optimal frame rate that above-mentioned algorithm obtains, i.e. target frame rate is 15;
If the target in the second preset duration before current point in time is averaged, frame per second is 22.2, and the first play frame rate is
30, target constant is 0.8, then compensating frame per second is 23, and according to the optimal frame rate that above-mentioned algorithm obtains, i.e. target frame rate is 20.
310, the play frame rate of the destination client is updated to the target frame rate from first play frame rate.
307 to 309 target frame rates being calculated may be considered present terminal and can reach most through the above steps
The first currently employed play frame rate directly can be updated to target frame rate by good result of broadcast, therefore, terminal, to guarantee to broadcast
The fluency put.
It should be noted that the play frame rate of the destination client is updated to the target frame rate from first play frame rate
Afterwards, since excessive change will not occur for the hardware configuration of the destination client, thus can during subsequent live streaming, no longer into
The adjustment of row frame per second during actual implementation, can continue to execute above-mentioned steps to carry out frame per second adjustment, the embodiment of the present invention
It does not limit this.
311, it stores using the target frame rate and the current point in time as configuration data to the configuration text of the destination client
In part.
It should be noted that the target frame rate determined is to adapt to when frame per second fluctuation statistical value meets goal condition
In the optimal frame rate of Current hardware configuration, then can store using the target frame rate and current point in time as configuration data to target
In the configuration file of client, used for being read when destination client starts next time, such as above-mentioned steps 301A to 301D
Process.Wherein, current point in time is timestamp, may also be referred to as Unix time (Unix time), Unix timestamp
(Unix timestamp) is a kind of mark to be made marks with the time, is the document voucher formed after encryption.Time
Point storage be in order to avoid because of situations such as time interval it is too long caused by hardware itself some declines, damage it is caused
Data inaccuracy therefore time point corresponding store to configuration file can be guaranteed into the real-time of configuration data and available
Property.
312, when frame per second fluctuation statistical value is unsatisfactory for the goal condition, and frame per second fluctuation acquired in continuous preset times
The goal condition is not satisfied in statistical value, then by the play frame rate of the destination client from first play frame rate be updated to this
The low-grade frame per second and the minimum value in the target frame rate of one play frame rate.
When frame per second fluctuation statistical value is unsatisfactory for the goal condition, illustrate that current generation frame per second is unstable, it therefore, can be with
Ignore and this time counts, still, if the goal condition is not satisfied in frame per second fluctuation statistical value acquired in continuous preset times,
It is that continuous several times are not satisfied, then illustrating the frame per second of current generation, it is impossible to meet live streaming demands, then need to reduce frame per second
Continue to be broadcast live, to guarantee the fluency of live streaming.
Wherein it is determined that the process of target frame rate and above-mentioned steps 307 to 309 are similarly, this will not be repeated here.
For example, frame per second is 23.5 if the target in the second preset duration before current point in time is averaged, first plays frame
Rate is 24, and target constant is 0.8, then compensating frame per second is 24.3, and the low-grade frame per second of optimal frame rate 24, the first play frame rate is
20, it is 20 according to the target frame rate that above-mentioned algorithm obtains;
If the target in the second preset duration before current point in time is averaged, frame per second is 18.2, and the first play frame rate is
24, target constant is 0.8, then compensating frame per second is 19, optimal frame rate 15, and the low-grade frame per second of the first play frame rate is 20, according to
The target frame rate that above-mentioned algorithm obtains is 15.
It should be noted that when frame per second fluctuation statistical value is unsatisfactory for the goal condition, the identified target frame rate
It is no longer the optimal frame rate for being adapted to hardware configuration, reference value is little, therefore, can not be by the target frame rate and current time
Point is stored as configuration data into the configuration file of destination client.
Through the above technical solutions, by real-time statistics transmission frame per second during live streaming, to determine hardware configuration to straight
The influence broadcast fluctuates situation so as to the frame per second according to determined by the transmission frame per second based on real-time statistics, come automatically to broadcasting
Frame per second progress dynamic adjustment is put both not needed main broadcaster in this frame per second control mode and voluntarily controlled frame per second, and be also not needed upon
Server carries out frame per second configuration, while realizing frame per second control, also saves time cost and human cost, reduces institute
The update cycle needed.
All the above alternatives can form alternative embodiment of the invention using any combination, herein no longer
It repeats one by one.
Fig. 4 is a kind of structural schematic diagram of frame per second control device provided in an embodiment of the present invention, referring to fig. 4, the device packet
It includes:
Playing module 401, for being broadcast live according to the first play frame rate when destination client starting;
Statistical module 402, for counting the transmission of the destination client during live streaming based on the destination client
Frame number;
Determining module 403 is used for every the first preset duration, based on the transmission frame counted in first preset duration
Number determines average frame per second;
The determining module 403 is also used to determine the second preset duration before current point in time based on multiple average frame per second
Interior target be averaged frame per second and frame per second fluctuation statistical value;
The determining module 403 is also used to be based on the target average frame when the frame per second fluctuates statistical value and meets goal condition
Rate determines target frame rate;
Update module 404, for the play frame rate of the destination client to be updated to the target from first play frame rate
Frame per second.
Frame per second control device provided in an embodiment of the present invention is come true by real-time statistics transmission frame per second during live streaming
Determine influence of the hardware configuration to live streaming, fluctuates feelings so as to the frame per second according to determined by the transmission frame per second based on real-time statistics
Condition automatically both not needed main broadcaster's voluntarily control frame in this frame per second control mode to play frame rate progress dynamic adjustment
Rate is not needed upon server also to carry out frame per second configuration, while realizing frame per second control, also saves time cost and people
Power cost reduces the required update cycle.
In one possible implementation, the device further include:
Setup module, for being unsatisfactory for the goal condition when frame per second fluctuation statistical value, and acquired in continuous preset times
Frame per second fluctuation statistical value the goal condition is not satisfied, then will be in the low-grade frame per second of first play frame rate and the target frame rate
Minimum value be set as the play frame rate of the destination client.
In one possible implementation, the device further include:
Determining module, for by the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
The determining module is also used to the frame per second range according to locating for the compensation frame per second, and the frequency is determined from multiple frame per second
The corresponding target frame rate of range.
In one possible implementation, the device further include:
Memory module, for storing the average frame per second determined every time to object queue;
Detection module, for detecting whether the object queue has expired every second preset duration.
In one possible implementation, the device further include:
Memory module, for storing using the target frame rate and the current point in time as configuration data to the destination client
Configuration file in.
In one possible implementation, the device further include:
Detection module, for detecting whether to have in the configuration file of the destination client and match when destination client starting
Set data;
Module is obtained, for there is configuration data in the configuration file and in the case that the configuration data has not timed out, is obtained
Frame per second is as first play frame rate in the configuration data;
The acquisition module is also used to not have the case where configuration data or the configuration data have timed out in the configuration file
Under, default frame per second is obtained as first play frame rate.
It should be understood that frame per second control device provided by the above embodiment is when realizing frame per second control, only with above-mentioned each
The division progress of functional module can according to need and for example, in practical application by above-mentioned function distribution by different function
Energy module is completed, i.e., the internal structure of terminal is divided into different functional modules, to complete whole described above or portion
Divide function.In addition, frame per second control device provided by the above embodiment and frame rate control method embodiment belong to same design, have
Body realizes that process is detailed in embodiment of the method, and which is not described herein again.
Fig. 5 is a kind of structural schematic diagram of computer equipment provided in an embodiment of the present invention, which can be because
Configuration or performance are different and generate bigger difference, may include one or more processors (central processing
Units, CPU) 501 and one or more memories 502, wherein it is stored at least in one or more of memories 502
One program code, at least one program code are loaded by one or more of processors 501 and are executed on to realize
State the frame rate control method that each embodiment of the method provides.Certainly, which can also have wired or wireless net
The components such as network interface, keyboard and input/output interface, to carry out input and output, which can also include
Other are for realizing the component of functions of the equipments, and this will not be repeated here.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, depositing for example including program code
Reservoir, above procedure code can be executed by processor to complete the frame rate control method in above-described embodiment.For example, the computer
Readable storage medium storing program for executing can be read-only memory (Read-Only Memory, ROM), random access memory (Random
Access Memory, RAM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM), tape, floppy disk and
Optical data storage devices etc..
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, can also be completed by program come the relevant hardware of program code, which can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
It above are only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all in the spirit and principles in the present invention
Within, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (14)
1. a kind of frame rate control method, which is characterized in that the described method includes:
When destination client starting, it is broadcast live according to the first play frame rate;
During based on the live streaming of the destination client, the transmission frame number of the destination client is counted;
Every the first preset duration, average frame per second is determined based on the transmission frame number counted in first preset duration;
Based on multiple average frame per second, the target in the second preset duration before determining current point in time is averaged frame per second and frame per second wave
Dynamic statistical value;
When frame per second fluctuation statistical value meets goal condition, it is averaged frame per second based on the target, determines target frame rate;
The play frame rate of the destination client is updated to the target frame rate from first play frame rate.
2. determining current point in time the method according to claim 1, wherein described be based on multiple average frame per second
The target in the second preset duration before is averaged after frame per second and frame per second fluctuation statistical value, the method also includes:
When frame per second fluctuation statistical value is unsatisfactory for the goal condition, and frame per second fluctuation statistics acquired in continuous preset times
The goal condition is not satisfied in value, then the play frame rate of the destination client is updated to institute from first play frame rate
State the minimum value in the low-grade frame per second and the target frame rate of the first play frame rate.
3. determining target frame the method according to claim 1, wherein described be averaged frame per second based on the target
Rate includes:
By the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
According to frame per second range locating for the compensation frame per second, the corresponding target frame of the frequency range is determined from multiple frame per second
Rate.
4. determining current point in time the method according to claim 1, wherein described be based on multiple average frame per second
The target in the second preset duration before is averaged before frame per second and frame per second fluctuation statistical value, the method also includes:
The average frame per second determined every time is stored to object queue;
It every second preset duration, detects whether the object queue has expired, when the object queue has expired, executes institute
It states based on multiple average frame per second, the target in the second preset duration before determining current point in time be averaged frame per second and frame per second fluctuates
The step of statistical value.
5. the method according to claim 1, wherein the play frame rate by the destination client is from described
First play frame rate is updated to after the target frame rate, the method also includes:
It stores using the target frame rate and the current point in time as configuration data to the configuration file of the destination client
In.
6. according to the method described in claim 4, it is characterized in that, it is described be broadcast live according to the first play frame rate before, institute
State method further include:
Whether when destination client starting, detecting in the configuration file of the destination client has configuration data;
If having configuration data in the configuration file and the configuration data having not timed out, frame per second in the configuration data is obtained
As first play frame rate;
If not having configuration data or the configuration data to have timed out in the configuration file, default frame per second is obtained as institute
State the first play frame rate.
7. a kind of frame per second control device, which is characterized in that described device includes:
Playing module, for being broadcast live according to the first play frame rate when destination client starting;
Statistical module, for during based on the live streaming of the destination client, counting the transmission frame of the destination client
Number;
Determining module is used for every the first preset duration, true based on the transmission frame number counted in first preset duration
Allocate equal frame per second;
The determining module is also used to determine the mesh in the second preset duration before current point in time based on multiple average frame per second
It marks average frame per second and frame per second fluctuates statistical value;
The determining module is also used to be averaged frame per second when the frame per second fluctuates statistical value and meets goal condition based on the target,
Determine target frame rate;
Update module, for the play frame rate of the destination client to be updated to the target frame from first play frame rate
Rate.
8. device according to claim 7, which is characterized in that described device further include:
Setup module, for being unsatisfactory for the goal condition when frame per second fluctuation statistical value, and acquired in continuous preset times
Frame per second fluctuation statistical value the goal condition is not satisfied, by the low-grade frame per second and the target frame of first play frame rate
Minimum value in rate is set as the play frame rate of the destination client.
9. device according to claim 7, which is characterized in that described device further include:
Determining module, for by the target be averaged frame per second and target constant and value, be determined as compensating frame per second;
The determining module is also used to the frame per second range according to locating for the compensation frame per second, and the frequency is determined from multiple frame per second
The corresponding target frame rate of range.
10. device according to claim 7, which is characterized in that described device further include:
Memory module, for storing the average frame per second determined every time to object queue;
Detection module, for detecting whether the object queue has expired every second preset duration.
11. device according to claim 7, which is characterized in that described device further include:
Memory module, for storing using the target frame rate and the current point in time as configuration data to the target customer
In the configuration file at end.
12. device according to claim 11, which is characterized in that described device further include:
Detection module, for whether when destination client starting, detecting in the configuration file of the destination client to have configuration
Data;
Module is obtained, for there is configuration data in the configuration file and in the case that the configuration data has not timed out, is obtained
Frame per second is as first play frame rate in the configuration data;
The acquisition module is also used to not have the case where configuration data or the configuration data have timed out in the configuration file
Under, default frame per second is obtained as first play frame rate.
13. a kind of computer equipment, which is characterized in that the computer equipment includes one or more processors and one or more
A memory is stored at least one program code in one or more of memories, and said program code is by one
Or multiple processors are loaded and are executed to realize such as claim 1 to the described in any item frame rate control method institutes of claim 6
The operation of execution.
14. a kind of computer readable storage medium, which is characterized in that be stored at least one in the computer readable storage medium
Program code, said program code are loaded by processor and are executed to realize such as claim 1 to any one of claim 6 institute
Operation performed by the frame rate control method stated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910656739.0A CN110366035B (en) | 2019-07-19 | 2019-07-19 | Frame rate control method, apparatus, computer device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910656739.0A CN110366035B (en) | 2019-07-19 | 2019-07-19 | Frame rate control method, apparatus, computer device and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110366035A true CN110366035A (en) | 2019-10-22 |
CN110366035B CN110366035B (en) | 2021-08-24 |
Family
ID=68221345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910656739.0A Active CN110366035B (en) | 2019-07-19 | 2019-07-19 | Frame rate control method, apparatus, computer device and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110366035B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024040613A1 (en) * | 2022-08-26 | 2024-02-29 | 京东方科技集团股份有限公司 | Image processing method and apparatus |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110050846A1 (en) * | 2009-08-27 | 2011-03-03 | Sean Miceli | Method and Apparatus for Displaying 3D Multi-Viewpoint Camera Video Over a Network |
CN106791956A (en) * | 2016-11-25 | 2017-05-31 | 百度在线网络技术(北京)有限公司 | The processing method and processing device of network direct broadcasting interim card |
CN108427630A (en) * | 2018-03-15 | 2018-08-21 | 腾讯科技(深圳)有限公司 | Performance information acquisition methods, device, terminal and computer readable storage medium |
WO2018177165A1 (en) * | 2017-03-30 | 2018-10-04 | 上海七牛信息技术有限公司 | Method and system for optimizing quality network pushed stream |
CN109040830A (en) * | 2017-06-08 | 2018-12-18 | 武汉斗鱼网络科技有限公司 | Prediction technique, switching method and the device of live play Caton |
CN109157839A (en) * | 2018-10-16 | 2019-01-08 | Oppo广东移动通信有限公司 | Frame per second regulates and controls method, apparatus, storage medium and terminal |
-
2019
- 2019-07-19 CN CN201910656739.0A patent/CN110366035B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110050846A1 (en) * | 2009-08-27 | 2011-03-03 | Sean Miceli | Method and Apparatus for Displaying 3D Multi-Viewpoint Camera Video Over a Network |
CN106791956A (en) * | 2016-11-25 | 2017-05-31 | 百度在线网络技术(北京)有限公司 | The processing method and processing device of network direct broadcasting interim card |
WO2018177165A1 (en) * | 2017-03-30 | 2018-10-04 | 上海七牛信息技术有限公司 | Method and system for optimizing quality network pushed stream |
CN109040830A (en) * | 2017-06-08 | 2018-12-18 | 武汉斗鱼网络科技有限公司 | Prediction technique, switching method and the device of live play Caton |
CN108427630A (en) * | 2018-03-15 | 2018-08-21 | 腾讯科技(深圳)有限公司 | Performance information acquisition methods, device, terminal and computer readable storage medium |
CN109157839A (en) * | 2018-10-16 | 2019-01-08 | Oppo广东移动通信有限公司 | Frame per second regulates and controls method, apparatus, storage medium and terminal |
Non-Patent Citations (1)
Title |
---|
黄波: "基于H.264的实时移动视频技术的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024040613A1 (en) * | 2022-08-26 | 2024-02-29 | 京东方科技集团股份有限公司 | Image processing method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN110366035B (en) | 2021-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11684849B2 (en) | Distributed sample-based game profiling with game metadata and metrics and gaming API platform supporting third-party content | |
CN104967607B (en) | A kind of information processing method, terminal and server | |
US8806518B2 (en) | Performance analysis for combining remote audience responses | |
Wu et al. | iCloudAccess: Cost-effective streaming of video games from the cloud with low latency | |
CN110418170B (en) | Detection method and device, storage medium and electronic device | |
CN106792085B (en) | A kind of method and apparatus generating video cover image | |
CN108269109A (en) | A kind of Advertisement arrangement injected volume equalization methods and device | |
CN108900923A (en) | Recommend the method and apparatus of live streaming template | |
CN110300307A (en) | Living broadcast interactive method, apparatus and direct broadcast server | |
US20230084784A1 (en) | Resource allocation method and apparatus, readable medium, electronic device, and program product | |
US11818437B2 (en) | System, method, and computer-readable medium including program for distributing live video | |
CN108900924A (en) | The method and apparatus of commending friends in direct broadcasting room | |
CN109814933A (en) | A kind of business data processing method and device | |
CN110929086A (en) | Audio and video recommendation method and device and storage medium | |
CN109348248A (en) | A kind of data processing method, system and the device of game live streaming | |
CN109428910B (en) | Data processing method, device and system | |
CN108174233A (en) | A kind of live broadcasting method, device, server and medium | |
CN101334739A (en) | System and method for managing evolving user preferences | |
CN107612844A (en) | A kind of method for mitigating server pulse, server and client side | |
US20220280867A1 (en) | Server load prediction and advanced performance measures | |
CN108174227B (en) | Virtual article display method and device and storage medium | |
WO2023077813A1 (en) | Method and apparatus for determining fake traffic in live broadcast room | |
CN110366035A (en) | Frame rate control method, device, computer equipment and computer readable storage medium | |
CN108650520B (en) | Video live broadcast control method, related equipment and computer storage medium | |
CN111569412B (en) | Cloud game resource scheduling method and device |
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 |