CN110460875A - A kind of switching method of video code rate, device, electronic equipment and storage medium - Google Patents
A kind of switching method of video code rate, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110460875A CN110460875A CN201910717024.1A CN201910717024A CN110460875A CN 110460875 A CN110460875 A CN 110460875A CN 201910717024 A CN201910717024 A CN 201910717024A CN 110460875 A CN110460875 A CN 110460875A
- Authority
- CN
- China
- Prior art keywords
- video data
- code rate
- played
- video
- switched
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000005611 electricity Effects 0.000 claims 1
- 230000003044 adaptive effect Effects 0.000 abstract description 4
- 238000004891 communication Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 208000001491 myopia Diseases 0.000 description 3
- 241001269238 Data Species 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
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/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing 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
-
- 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/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- 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/25808—Management of client data
- H04N21/25825—Management of client data involving client display capabilities, e.g. screen resolution of a mobile phone
-
- 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/266—Channel 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/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Computer Graphics (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
A kind of switching method of the disclosure about video code rate, device, electronic equipment and storage medium, it can be in code rate of the average download rate of determining target video data greater than to be switched video data in scheme, and duration to be played be greater than first threshold when, since the finish time of first time period, to be switched video data is downloaded in switching, due to first downloading the target video data of low bit- rate, ensure that the fluency of video playing, when average download rate is greater than the code rate of to be switched video data, and duration to be played be greater than first threshold when, to be switched video data is downloaded in switching that can be adaptive, realize the code rate of adaptively changing video, and improve the clarity of video to be played.
Description
Technical field
This disclosure relates to which field of video broadcasting technology more particularly to a kind of switching method of video code rate, device, electronics are set
Standby and storage medium.
Background technique
With the development of network technology, more and more users like watching video by network, and in network
The continuous promotion of the quality and quantity of video content, requirement of the user to the viewing experience of internet video are also higher and higher.Depending on
The clarity and fluency that frequency plays are to influence most important two factors of viewing experience, in general, the code rate of a video
Higher, the clarity played is higher, but the video that code rate is excessively high, and when broadcasting is often more easy to happen Caton, to reduce
The fluency of video playing.
Clarity and fluency when in order to balance video broadcasting, video service provider are providing Video service
When, the video for first providing default code rate plays out, and after playing a period of time, regards further according to the code rate that user manually selects
Frequency plays.
In the related technology, the change of video code rate, can only be by manually selecting suitable code rate by user.
Summary of the invention
The disclosure provides switching method, device, electronic equipment and the storage medium of a kind of video code rate, at least to solve phase
In the technology of pass during video playing can not adaptively changing video code rate the problem of.The technical solution of the disclosure is such as
Under:
According to the first aspect of the embodiments of the present disclosure, a kind of switching method of video code rate is provided, comprising:
Determine video to be played target video data and to be switched video data, wherein the target video data
Code rate is less than the code rate of the to be switched video data;
Video data of the target video data in first time period is downloaded, as the first video data;
Statistics is completed to download the average download rate of first video data, and determines that downloading completes described in the moment the
The duration to be played of video data in one video data in state to be played;
When the average download rate is greater than the code rate of the to be switched video data, and the duration to be played is greater than the
When one threshold value, since the finish time of the first time period, the to be switched video data is downloaded in switching.
Further, further includes:
When the average download rate no more than the code rate of the to be switched video data or it is described to be played when it is childlike
When first threshold, continue to download the target video data from the finish time of the first time period.
Further, the duration of the first time period is less than the picture group GOP value of the video to be played.
Further, it before the target video data of determination video to be played and to be switched video data, also wraps
It includes:
Determine the code rate size of the corresponding each video data of video to be played;
The target video data of the determination video to be played and to be switched video data, comprising:
The smallest video data of code rate in each video data is determined as target video data;
Code rate is greater than to the video data of the code rate of the target video data, is determined as to be switched video data.
Further, it is described when the average download rate be greater than the to be switched video data code rate, and it is described to
When playing duration is greater than first threshold, since the finish time of the first time period, the to be switched video is downloaded in switching
Data, comprising:
In each to be switched video data, determine that code rate is less than the average speed of download and fast with the average downloading
The smallest to be switched video data of difference is spent, as target Switch Video data;
If the duration to be played is greater than first threshold, since the finish time of the first time period, under switching
Carry the target Switch Video data.
Further, the target video data corresponds to the video to be played completely video content to be played, described
To be switched video data corresponds to the part video content to be played of the video to be played;
Before video data of the downloading target video data in first time period, further includes:
The content time for obtaining the target video data and the to be switched video data is poor, and the content time difference is
Interior tolerance duration between the complete video content to be played and part video content to be played;
Since the moment is downloaded in the starting of the target video data, the period of a length of interior tolerance duration when determining
For the first time period of the target video data.
According to the second aspect of an embodiment of the present disclosure, a kind of switching device of video code rate is provided, comprising:
Video data determining module, be configured to determine that video to be played target video data and to be switched video counts
According to, wherein the code rate of the target video data is less than the code rate of the to be switched video data;
Video data download module is configured as downloading video counts of the target video data in first time period
According to as the first video data;
Statistical module is configured as statistics and completes to download the average download rate of first video data, and determines
The duration to be played of the video data in the first video data described in the moment in state to be played is completed in downloading;
Video data switching module is configured as being greater than the code of the to be switched video data when the average download rate
Rate, and the duration to be played be greater than first threshold when, since the finish time of the first time period, switching downloading described in
To be switched video data.
Further, the video data download module is additionally configured to when the average download rate is no more than described
When the code rate of to be switched video data or the duration to be played are not more than first threshold, from the end of the first time period
Moment continues to download the target video data.
Further, the duration of the first time period is less than the picture group GOP value of the video to be played.
Further, further includes:
Code rate size determining module is configured as determining the target view of video to be played in the video data determining module
Before frequency evidence and to be switched video data, the code rate size of the corresponding each video data of video to be played is determined;
The video data determining module is specifically configured to the smallest video counts of code rate in each video data
According to being determined as target video data, and code rate is greater than to the video data of the code rate of the target video data, be determined as to
Switch Video data.
Further, the video data switching module is specifically configured in each to be switched video data, determines code
Rate be less than the average speed of download and with the average the smallest to be switched video data of speed of download difference, as target
Switch Video data, and if the duration to be played be greater than first threshold, opened from the finish time of the first time period
Begin, the target Switch Video data are downloaded in switching.
Further,
Content time difference obtains module, is configured as downloading the target video data in the video data download module
Before video data in first time period, when obtaining the content of the target video data and the to be switched video data
Between it is poor, the content time difference is interior between the complete video content to be played and part video content to be played
Tolerance duration
The video data download module is specifically configured to open from the starting of the target video data downloading moment
Begin, the period of a length of interior tolerance duration is the first time period of the target video data when determining.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided characterized by comprising
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to described instruction is executed, to realize video code rate described in any of the above embodiments
Switching method.
According to a fourth aspect of embodiments of the present disclosure, a kind of storage medium is provided, when the instruction in the storage medium by
When the processor of electronic equipment executes, so that electronic equipment is able to carry out the switching side of video code rate described in any of the above embodiments
Method.
According to a fifth aspect of the embodiments of the present disclosure, a kind of computer program product is provided, when the computer program produces
When instruction in product is executed by the processor of electronic equipment, so that electronic equipment is able to carry out video as described in any one of the above embodiments
The switching method of code rate.
The technical scheme provided by this disclosed embodiment is at least brought following the utility model has the advantages that determining the target of video to be played
Video data and to be switched video data, wherein the code rate of target video data is less than the code rate of to be switched video data, and
Video data of the target video data in first time period is downloaded, as the first video data, statistics completes the first view of downloading
The average download rate of frequency evidence, and determine that the video counts that state to be played is in the first video data of moment are completed in downloading
According to duration to be played, and when average download rate is greater than the code rate of to be switched video data, and duration to be played is greater than the
When one threshold value, since the finish time of first time period, to be switched video data is downloaded in switching, due to working as average download rate
Greater than the code rate of the to be switched video data, and when the duration to be played is greater than first threshold, switching that can be adaptive
The to be switched video data is downloaded, the code rate of adaptively changing video is realized.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure, do not constitute the improper restriction to the disclosure.
Fig. 1 is a kind of flow chart of the switching method of video code rate shown according to an exemplary embodiment.
Fig. 2 is a kind of block diagram of the switching device of video code rate shown according to an exemplary embodiment.
Fig. 3 is a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
In order to make ordinary people in the field more fully understand the technical solution of the disclosure, below in conjunction with attached drawing, to this public affairs
The technical solution opened in embodiment is clearly and completely described.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiment of the disclosure described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.Embodiment described in following exemplary embodiment does not represent and disclosure phase
Consistent all embodiments.On the contrary, they are only and as detailed in the attached claim, the disclosure some aspects
The example of consistent device and method.
Fig. 1 is a kind of flow chart of the switching method of video code rate shown according to an exemplary embodiment, such as Fig. 1 institute
Show, includes the following steps.
S101: determine video to be played target video data and to be switched video data, wherein target video data
Code rate is less than the code rate of to be switched video data.
In step s101, video to be played can be user and select the video watched.
Illustratively, in short video platform, video selection page includes the short-sighted frequency of multiple displayings, is shown when receiving to be directed to
Short-sighted frequency selection operation when, using the selected short-sighted frequency of the selection operation as video to be played.
In one embodiment, when video to be played only exists the video data of two kinds of code rates, then can by code rate compared with
Low video data is as target video data, using the higher video data of code rate as to be switched video data.
In one embodiment, when video to be played may exist the video data of various code rate.
It is known to those of skill in the art, it, can be to video dispatching server after receiving the selection operation of user
It sends the request for obtaining the video data of video to be played, in the request, may include the mark of video to be played, video tune
Degree server according to the mark of video to be played, can search the download address of each video data of the video to be played, and anti-
The code rate information for presenting the download address found and the corresponding download address, when each view for receiving video dispatching server feedback
After the download address and code rate information of frequency evidence, target video data and to be switched video counts can be determined from each video data
According to, wherein code rate information includes at least code rate size, and target video data, which can be, currently to be needed to download simultaneously in each video data
The video data of broadcasting, to be switched video data can be the video data that code rate is not less than target video data.
In one embodiment, target video can be determined in each video data of video to be played by following steps
Data and to be switched video data, comprising:
Step 1: determining the code rate size of the corresponding each video data of video to be played.
In one embodiment, can be believed by the code rate corresponding with each download address of video dispatching server feedback
Breath, determines the code rate size of each video data, by each download address, can determine each video counts existing for video to be played
According to, and according to code rate information, determine the code rate size of the video data of corresponding each download address.
Illustratively, each download address of video dispatching server feedback includes ur_1, ur_2 and ur_1, corresponding code rate
Information is respectively 360Kbps, 1024Kbps and 720Kbps, then the code rate size for the video data that download address is ur_1 is
The video counts that the code rate size of 360Kbps, the video data that download address is ur_2 are 1024Kbps and download address is ur_3
According to code rate size be 720Kbps.
Step 2: by each video data in the smallest video data of code rate be determined as target video data.
The smallest video data of code rate in each video data, which is determined as target video data, can guarantee that user is playing
Guarantee the fluency of video playing when video.
Illustratively, the code rate size for the video data for being ur_1 in above-mentioned determining download address is 360Kbps, downloading ground
The code rate size for the video data that the code rate size for the video data that location is ur_2 is 1024Kbps and download address is ur_3 is
In the example of 1024Kbps, the video data that the download address of the smallest 360Kbps of code rate size is ur_1 is determined as target
Video data.
Step 3: code rate to be greater than to the video data of the code rate of target video data, it is determined as to be switched video data.
It illustratively, can in the above-mentioned example that the video data that code rate is 360Kbps is determined as target video data
It is determined as to be switched video data so that remaining code rate to be greater than to the video data of the code rate of target video data, it therefore, can be true
Fixed to be switched video data includes the video data that code rate is 1024Kbps and 720Kbps.
S102: video data of the downloading target video data in first time period, as the first video data.
In step s 102, can be downloaded by the download address of target video data target video data at first
Between video data in section.
In one embodiment, video to be played can be downloaded first since the starting video frame of video to be played
Video data in period.
In one embodiment, the duration of first time period is less than the picture group GOP value of video to be played.
Known to those of skill in the art, in video coding technique, there are the videos of three types in video data
Frame: I frame, P frame and B frame.Wherein, I frame, that is, in-frame encoding picture frame (Intra-Coded Picture), can be without reference to it
His picture frame is only encoded using the information of this frame, P frame, that is, predictive-coded picture frame (Predictive-Coded
Picture), using the I frame or P frame before the frame, inter prediction encoding is carried out by the way of motion prediction, B frame is i.e. double
To predictive-coded picture frame (Bidirectionally Predicted Picture), highest compression ratio is provided, was both needed
Picture frame (I frame or P frame) before, it is also desirable to which it is two-way to carry out interframe by the way of motion prediction for later picture frame (P frame)
Predictive coding.
And GOP (Group of Picture, image group), indicate one group of continuous I frame, P frame and B in video data
Frame, each P frame and B frame in a GOP only need the picture frame in the GOP that coding can be completed.
For those skilled in the art, GOP value may refer to GOP length, for example, GOP length is 150, refer to
In generation,, there are 150 picture frames in a picture group, GOP value also may refer to persistently broadcasting for a picture group in video data
It puts the time, such as GOP value is 1s, it means that, the time that one group of picture multicast is put in video data is 1s, in the present embodiment
In, GOP value refers to the lasting play time of a picture group, when can be the picture less than video to be played in first time period
Group GOP value, can will be limited in Millisecond, specific value can be according to the scene and demand of actual use in first time period
It is determined, the application is not specifically limited again.
S103: statistics completes the average download rate of the first video data of downloading, and determines that the moment first is completed in downloading
The duration to be played of video data in video data in state to be played.
In step s 103, the average download rate for completing the downloading of the first video data can be counted, and determines downloading
Complete the duration to be played of the video data in the first video data of moment in state to be played.
According to different application scenarios and demand, it can determine in different ways and complete the downloading of the first video data
Average download rate.
In one embodiment, the download time for completing the downloading of the first video data and the first video counts can be counted
According to data volume size, further according to complete the first video data downloading download time and the first video data data volume size
Calculate average download rate.
In one embodiment, can also by during downloading the first video data multi collect download speed in real time
Rate, then determine by way of being averaged the average download rate of the first video data downloading, which kind of mode is specifically used, this
Application embodiment is not done herein specifically to place an order.
In one embodiment, a length of when to be played that the video data not being played in the video data of downloading is completed
The time that can also be played, wherein it can be data cached that the video data of downloading, which is completed,.
It avoids by the way that determination duration to be played is available due to average download rate mistake of statistics, caused real network situation
It is not inconsistent with the average download rate of statistics, occurs mistake when subsequent step being caused to be judged, further ensure that switching code
The accuracy of rate.
S104: when code rate of the average download rate greater than to be switched video data, and duration to be played is greater than first threshold
When, since the finish time of first time period, to be switched video data is downloaded in switching.
In step S104, when code rate of the average download rate greater than to be switched video data, and duration to be played is greater than
When first threshold, illustrate that current network state can satisfy the downloading and broadcasting of higher-quality video data, therefore, Ke Yicong
To be switched video data is downloaded in the finish time of first time period, switching.
In one embodiment, in order to download to be switched video data, the downloading of to be switched video data can first be obtained
Address, in one embodiment, the download address of the target video data of to be switched video data can be while obtaining.
When needs are since the finish time of first time period, to be switched video data is downloaded in switching, can be according to be cut
The download address for changing video data is downloaded.
In one embodiment, target video data corresponds to video to be played completely video content to be played, to be switched
Video data corresponds in the part video to be played of video to be played, when so as to avoid switching from downloading to be switched video data
There is unnecessary video data downloading.
Illustratively, video to be played completely the content of video content to be played when a length of 10s, the portion of video to be played
A length of 9s when point video content to be played, then target video data includes complete 10s content, and to be switched video data only wraps
Content containing 9s.
At this point, that there are content times between target video data and to be switched video data is poor, wherein content time difference is
Interior tolerance duration between complete video content to be played and part video content to be played.
In one embodiment, first time period can be determined by following steps.
Step 1: the content time for obtaining target video data and to be switched video data is poor, and content time difference is complete
Video content to be played and part video content to be played between interior tolerance duration.
Illustratively, video to be played completely the content of video content to be played when a length of 10s, the portion of video to be played
A length of 9s when point video content to be played, then target video data includes complete 10s content, and to be switched video data only wraps
Content containing 9s, then interior tolerance duration is 1s.
Step 2: since the moment is downloaded in the starting of target video data, the period of a length of content difference duration when determining
For the first time period of target video data.
In one embodiment, the starting downloading moment of target video data be from the corresponding playing time of initial position,
When interior tolerance duration is 1s, determine that the preceding 1s of target video data is first time period.
In one embodiment, step S104 can also be realized by following steps, comprising:
Step 1: in each to be switched video data, determine that code rate is less than average speed of download and fast with average downloading
The smallest to be switched video data of difference is spent, as target Switch Video data.
Illustratively, to be switched video data include to be switched video data DS-1, to be switched video data DS-2 and to
Tri- to be switched video datas of Switch Video data DS-3, wherein the code rate of DS-1 is 360Kbps, and the code rate of DS-2 is
The code rate of 720Kbps, DS-3 are 1024Kbps, when average speed of download is 550Kbps, then switches DS-2 as target and regard
Frequency evidence.
Step 2: if duration to be played is greater than first threshold, since the finish time of first time period, switching downloading
Target Switch Video data.
In one embodiment, when code rate of the average download rate no more than to be switched video data or duration to be played
When no more than first threshold, continue to download target video data from the finish time of first time period.
Illustratively, in conjunction with step S101-S104 and actual usage scenario, one embodiment is provided:
The video data that can each play, there are two kinds of video datas of low bit- rate and high code rate in video server,
When need it is preferential guarantee that user watches the fluency of video when, can using the video data of low bit- rate as target video data,
The video data of high code rate can not include in first time period target video data as to be switched video data
Video data.
After determining video to be played, video server return target video data and to be switched video data it is corresponding under
Set address, at this point it is possible to the video data in first time period is downloaded according to the corresponding download address of target video data, and
Statistics completes the average download rate of video data downloading, and determines duration to be played, when average download rate is greater than to be cut
Change the code rate of video data, and when duration to be played is greater than first threshold, show when network environment is preferable, at this time can by
The download address of Switch Video data downloads to be switched video data, due to be switched video data, does not include first time period
Therefore interior video data can directly download to be switched video data, and play out.
When average download rate is not more than first threshold no more than the code rate of to be switched video data or duration to be played
When, then judge that current network environment is not suitable for carrying out the downloading and broadcasting of the to be switched video data of high code rate, it at this time can be by
According to the download address of target video data, continue to download target video data from the finish time of first time period.
In embodiment as shown in Figure 1 provided by the present application, can determine video to be played target video data and to
Switch Video data, wherein the code rate of target video data is less than the code rate of to be switched video data, and downloads target video
Video data of the data in first time period, as the first video data, statistics completes being averaged for the first video data of downloading
Downloading rate, and determine downloading complete the first video data of moment in state to be played video data it is to be played when
It is long, and when average download rate is greater than the code rate of to be switched video data, and duration to be played is greater than first threshold, from the
To be switched video data is downloaded in the finish time of one period, switching, due to being greater than to be switched view when average download rate
The code rate of frequency evidence, and when duration to be played is greater than first threshold, to be switched video data is downloaded in switching that can be adaptive, real
The code rate of adaptively changing video is showed.
Also, it is avoided since first time period is less than GOP value so as to which first time period is limited in grade
When not knowing current network environment, clarity is too long compared with the play time at bottom or the lower video of fluency, influences user's body
It tests, by the way that first time period is limited in grade, user can be made lower compared with bottom or fluency less than clarity in perception
Video when just complete the switching of code rate.
Fig. 2 is a kind of switching device block diagram of video code rate shown according to an exemplary embodiment.Referring to Fig. 2, the dress
It sets including video data determining module 201, video data download module 202, statistical module 203 and video data switching module
204。
The video data determining module 201 is configured as executing the target video data for determining video to be played and to be switched
Video data, wherein the code rate of target video data is less than the code rate of to be switched video data;
The video data download module 202 is configured as executing video of the downloading target video data in first time period
Data, as the first video data;
The statistical module 203 is configured as executing the average download rate that statistics completes the first video data of downloading, and
Determine that the duration to be played of the video data in the first video data of moment in state to be played is completed in downloading;
The video data switching module 204 is configured as executing when average download rate is greater than the code of to be switched video data
Rate, and when duration to be played is greater than first threshold, since the finish time of first time period, to be switched video counts are downloaded in switching
According to.
Further, video data download module 202 is additionally configured to execute when average download rate is no more than to be switched
When the code rate of video data or duration to be played are not more than first threshold, continue to download mesh from the finish time of first time period
Mark video data.
Further, the duration of first time period is less than the picture group GOP value of video to be played.
Further, further includes:
Code rate size determining module 205 is configured as determining video to be played in the video data determining module 201
Before target video data and to be switched video data, the code rate size of the corresponding each video data of video to be played is determined;
The video data determining module 201 is specifically configured to the smallest view of code rate in each video data
Frequency is determined according to target video data, and the video data by code rate greater than the code rate of the target video data is determined as
For to be switched video data.
Further, video data switching module 204 is specifically configured to execute in each to be switched video data, really
Constant bit rate be less than average speed of download and with the smallest to be switched video data of average speed of download difference, switch as target
Video data, and if duration to be played be greater than first threshold, since the finish time of first time period, switching downloading mesh
Mark Switch Video data.
Further, further includes:
Content time difference obtains module 206, is configured as downloading the target video in the video data download module
Before video data of the data in first time period, the interior of the target video data and the to be switched video data is obtained
Hold the time difference, the content time difference is between the complete video content to be played and part video content to be played
Interior tolerance duration
The video data download module 202 is specifically configured to download the moment from the starting of the target video data
Start, the period of a length of interior tolerance duration is the first time period of the target video data when determining.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
The embodiment of the present application also provides a kind of electronic equipment, as shown in figure 3, include processor 301, communication interface 302,
Memory 303 and communication bus 304, wherein processor 301, communication interface 302, memory 303 are complete by communication bus 304
At mutual communication,
Memory 303, for storing computer program;
Processor 301 when for executing the program stored on memory 303, realizes following steps:
Determine video to be played target video data and to be switched video data, wherein the target video data
Code rate is less than the code rate of the to be switched video data;
Video data of the target video data in first time period is downloaded, as the first video data;
Statistics is completed to download the average download rate of first video data, and determines that downloading completes described in the moment the
The duration to be played of video data in one video data in state to be played;
When the average download rate is greater than the code rate of the to be switched video data, and the duration to be played is greater than the
When one threshold value, since the finish time of the first time period, the to be switched video data is downloaded in switching.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described video code rate when being executed by processor
Switching method the step of.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes the switching method of any video code rate in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (10)
1. a kind of switching method of video code rate characterized by comprising
Determine video to be played target video data and to be switched video data, wherein the code rate of the target video data
Less than the code rate of the to be switched video data;
Video data of the target video data in first time period is downloaded, as the first video data;
Statistics is completed to download the average download rate of first video data, and determines that the first view described in the moment is completed in downloading
The duration to be played of video data of the frequency in state to be played;
When code rate of the average download rate greater than the to be switched video data, and the duration to be played is greater than the first threshold
When value, since the finish time of the first time period, the to be switched video data is downloaded in switching.
2. the switching method of video code rate according to claim 1, which is characterized in that further include:
When the average download rate no more than the code rate of the to be switched video data or the duration to be played no more than the
When one threshold value, continue to download the target video data from the finish time of the first time period.
3. the switching method of video code rate according to claim 1, which is characterized in that the duration of the first time period is small
In the picture group GOP value of the video to be played.
4. the switching method of video code rate according to claim 1, which is characterized in that in determination video to be played
Before target video data and to be switched video data, further includes:
Determine the code rate size of the corresponding each video data of video to be played;
The target video data of the determination video to be played and to be switched video data, comprising:
The smallest video data of code rate in each video data is determined as target video data;
Code rate is greater than to the video data of the code rate of the target video data, is determined as the to be switched video data.
5. the switching method of video code rate according to claim 4, which is characterized in that described to work as the average download rate
Greater than the code rate of the to be switched video data, and when the duration to be played is greater than first threshold, from the first time period
Finish time, switching downloads the to be switched video data, comprising:
In each to be switched video data, determine that code rate is less than the average speed of download and poor with the average speed of download
It is worth the smallest to be switched video data, as target Switch Video data;
If the duration to be played is greater than first threshold, since the finish time of the first time period, switching downloading institute
State target Switch Video data.
6. the switching method of video code rate according to claim 4, which is characterized in that the target video data corresponds to institute
State video to be played completely video content to be played, the to be switched video data correspond to the part of the video to be played to
Play video content;
Before video data of the downloading target video data in first time period, further includes:
The content time for obtaining the target video data and the to be switched video data is poor, and the content time difference is complete
The video content to be played and the part video content to be played between interior tolerance duration;
Since the moment is downloaded in the starting of the target video data, the period of a length of interior tolerance duration is institute when determining
State the first time period of target video data.
7. a kind of switching device of video code rate characterized by comprising
Video data determining module, be configured to determine that video to be played target video data and to be switched video data,
In, the code rate of the target video data is less than the code rate of the to be switched video data;
Video data download module is configured as downloading video data of the target video data in first time period, makees
For the first video data;
Statistical module is configured as statistics and completes to download the average download rate of first video data, and determines downloading
Complete the duration to be played of the video data in the first video data described in the moment in state to be played;
Video data switching module is configured as being greater than the code rate of the to be switched video data when the average download rate,
And the duration to be played is when being greater than first threshold, since the finish time of the first time period, switching downloading it is described to
Switch Video data.
8. the switching device of video code rate according to claim 7, which is characterized in that the video data download module,
Be additionally configured to when the average download rate no more than the to be switched video data code rate or the duration to be played not
When greater than first threshold, continue to download the target video data from the finish time of the first time period.
9. a kind of electronic equipment characterized by comprising
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to executing described instruction, to realize such as view described in any one of claims 1 to 6
The switching method of frequency code rate.
10. a kind of storage medium, when the instruction in the storage medium is executed by the processor of electronic equipment, so that the electricity
Sub- equipment is able to carry out the switching method such as video code rate described in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910717024.1A CN110460875A (en) | 2019-08-05 | 2019-08-05 | A kind of switching method of video code rate, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910717024.1A CN110460875A (en) | 2019-08-05 | 2019-08-05 | A kind of switching method of video code rate, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110460875A true CN110460875A (en) | 2019-11-15 |
Family
ID=68484874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910717024.1A Pending CN110460875A (en) | 2019-08-05 | 2019-08-05 | A kind of switching method of video code rate, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110460875A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971935A (en) * | 2019-11-27 | 2020-04-07 | 福建天泉教育科技有限公司 | Adaptive definition video playing method and storage medium |
CN111417000A (en) * | 2020-03-27 | 2020-07-14 | 北京奇艺世纪科技有限公司 | Method, device, electronic equipment and medium for switching video code rate |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102957672A (en) * | 2011-08-25 | 2013-03-06 | 中国电信股份有限公司 | Method, client side and system for self-adaptive playing of FLV (flash video) media streams |
CN103338393A (en) * | 2013-06-13 | 2013-10-02 | 西安交通大学 | Video code rate selecting method driven by user experience under HSPA system |
CN103905820A (en) * | 2012-12-28 | 2014-07-02 | 中国科学院声学研究所 | Client side video quality self-adaption method and system based on SVC |
WO2016101240A1 (en) * | 2014-12-23 | 2016-06-30 | 深圳Tcl数字技术有限公司 | Media data playing method and terminal |
US20160286267A1 (en) * | 2013-10-30 | 2016-09-29 | Le Shi Zhi Xin Electronic Technology (Tianjin) Lim Ited | Code rate switching method and device for smart television |
WO2017031692A1 (en) * | 2015-08-25 | 2017-03-02 | 华为技术有限公司 | Video downloading method, apparatus, and system |
CN108063955A (en) * | 2017-12-15 | 2018-05-22 | 重庆邮电大学 | The code check switching method of dynamic self-adapting transmission of video based on state machine |
CN108668146A (en) * | 2017-03-27 | 2018-10-16 | 华为技术有限公司 | A kind of method and apparatus of adjustment streaming media bit rate |
CN110022498A (en) * | 2018-01-08 | 2019-07-16 | 深圳市中兴微电子技术有限公司 | A kind of method and device for realizing code rate switching |
CN110087141A (en) * | 2019-04-29 | 2019-08-02 | 北京金山云网络技术有限公司 | Method of transmitting video data, device, client and server |
-
2019
- 2019-08-05 CN CN201910717024.1A patent/CN110460875A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102957672A (en) * | 2011-08-25 | 2013-03-06 | 中国电信股份有限公司 | Method, client side and system for self-adaptive playing of FLV (flash video) media streams |
CN103905820A (en) * | 2012-12-28 | 2014-07-02 | 中国科学院声学研究所 | Client side video quality self-adaption method and system based on SVC |
CN103338393A (en) * | 2013-06-13 | 2013-10-02 | 西安交通大学 | Video code rate selecting method driven by user experience under HSPA system |
US20160286267A1 (en) * | 2013-10-30 | 2016-09-29 | Le Shi Zhi Xin Electronic Technology (Tianjin) Lim Ited | Code rate switching method and device for smart television |
WO2016101240A1 (en) * | 2014-12-23 | 2016-06-30 | 深圳Tcl数字技术有限公司 | Media data playing method and terminal |
WO2017031692A1 (en) * | 2015-08-25 | 2017-03-02 | 华为技术有限公司 | Video downloading method, apparatus, and system |
CN108668146A (en) * | 2017-03-27 | 2018-10-16 | 华为技术有限公司 | A kind of method and apparatus of adjustment streaming media bit rate |
CN108063955A (en) * | 2017-12-15 | 2018-05-22 | 重庆邮电大学 | The code check switching method of dynamic self-adapting transmission of video based on state machine |
CN110022498A (en) * | 2018-01-08 | 2019-07-16 | 深圳市中兴微电子技术有限公司 | A kind of method and device for realizing code rate switching |
CN110087141A (en) * | 2019-04-29 | 2019-08-02 | 北京金山云网络技术有限公司 | Method of transmitting video data, device, client and server |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971935A (en) * | 2019-11-27 | 2020-04-07 | 福建天泉教育科技有限公司 | Adaptive definition video playing method and storage medium |
CN111417000A (en) * | 2020-03-27 | 2020-07-14 | 北京奇艺世纪科技有限公司 | Method, device, electronic equipment and medium for switching video code rate |
CN111417000B (en) * | 2020-03-27 | 2022-04-22 | 北京奇艺世纪科技有限公司 | Method, device, electronic equipment and medium for switching video code rate |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110636346B (en) | Code rate self-adaptive switching method and device, electronic equipment and storage medium | |
US10305947B2 (en) | Pre-buffering audio streams | |
US10271112B2 (en) | System and method for dynamic adaptive video streaming using model predictive control | |
Sun et al. | Flocking-based live streaming of 360-degree video | |
CN103650509B (en) | Adaptive configuration of reference frame buffer based on camera and background motion | |
CN107005727A (en) | Media content stream | |
CN110248247A (en) | Embedded dynamic video control method for playing back and device based on network throughput | |
CN109672893B (en) | Video decoding method, device, equipment and storage medium | |
CN105516791A (en) | Intelligent household streaming media seamless connection realization method and intelligent household streaming media seamless connection realization system | |
CN110267100A (en) | Code rate switching method, device, electronic equipment and the storage medium of FLV video | |
CN104620595A (en) | Proactive video frame dropping | |
US11694316B2 (en) | Method and apparatus for determining experience quality of VR multimedia | |
CN103945240A (en) | Video playing method and device based on video aggregation | |
CN105594182A (en) | Improved request cancellation method for media streaming | |
US8812724B2 (en) | Method and device for transmitting variable rate video data | |
CN105991364B (en) | User perception evaluation method and device | |
CN111314772B (en) | Method, device, terminal and storage medium for determining video downloading code rate | |
CN109688407A (en) | Reference block selection method, device, electronic equipment and the storage medium of coding unit | |
CN107210999A (en) | Link-aware streaming is adaptive | |
CN110460875A (en) | A kind of switching method of video code rate, device, electronic equipment and storage medium | |
CN109257618A (en) | Company wheat interflow method, apparatus and server in a kind of live streaming | |
US20110305278A1 (en) | Method of accessing a spatio-temporal part of a video sequence of images | |
CN114245196B (en) | Screen recording and stream pushing method and device, electronic equipment and storage medium | |
US10708667B1 (en) | Combining fragments with different encodings | |
CN114286128A (en) | Live video parameter adjusting method, system, device, equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191115 |