CN112019873A - Video code rate adjusting method and device and electronic equipment - Google Patents

Video code rate adjusting method and device and electronic equipment Download PDF

Info

Publication number
CN112019873A
CN112019873A CN202010938355.0A CN202010938355A CN112019873A CN 112019873 A CN112019873 A CN 112019873A CN 202010938355 A CN202010938355 A CN 202010938355A CN 112019873 A CN112019873 A CN 112019873A
Authority
CN
China
Prior art keywords
video
target video
code rate
pause
state data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010938355.0A
Other languages
Chinese (zh)
Inventor
郭文艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010938355.0A priority Critical patent/CN112019873A/en
Publication of CN112019873A publication Critical patent/CN112019873A/en
Priority to PCT/CN2021/102148 priority patent/WO2022052566A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities

Landscapes

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

Abstract

The invention provides a video code rate adjusting method, a device and electronic equipment, wherein the method comprises the following steps: acquiring pause state data of a target video when the target video is played on a receiving device of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and if the pause state data meet the specified conditions, reducing the video code rate of the target video. The method can monitor the pause state of the target video when the target video is played on the receiving equipment, and when the pause state data meets the specified conditions, the video code rate of the target video is reduced, so that the video code rate of the target video is adjusted to be suitable for the video code rate played by the receiving equipment, the pause phenomenon of video playing is effectively reduced, and the watching effect of the video is improved.

Description

Video code rate adjusting method and device and electronic equipment
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a method and an apparatus for adjusting a video bitrate, and an electronic device.
Background
With the development of internet technology, more and more users watch live videos through the internet. In the related art, a user usually watches live video at a client according to a fixed video code rate set in a background, but when the network speed of the client is poor, the watching effect of the video is affected due to the phenomenon of pause.
Disclosure of Invention
The invention aims to provide a video code rate adjusting method, a video code rate adjusting device and electronic equipment, so as to reduce the watching pause phenomenon and improve the video watching effect.
In a first aspect, an embodiment of the present invention provides a method for adjusting a video bitrate, where the method includes: acquiring pause state data of a target video when the target video is played on a receiving device of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and if the pause state data meet the specified conditions, reducing the video code rate of the target video.
In an alternative embodiment, the stuck state data includes a stuck time; the specified conditions include: the card pause time in the card pause state data is multiple, and the interval of two adjacent card pause times in the multiple card pause times is specified as specified duration; the step of reducing the video bitrate of the target video if the pause state data meets the specified condition includes: if the number of the stuck time in the stuck state data of the receiving equipment is multiple, and the interval of two adjacent stuck times in the multiple stuck time is specified as a specified duration, determining that the code rate of the receiving equipment needs to be reduced; and reducing the video code rate of the target video.
In an optional implementation, the number of the receiving devices is multiple, and the specifying condition further includes: the number of the receiving devices needing to reduce the code rate is larger than a preset number threshold, or the quotient of the number of the receiving devices needing to reduce the code rate and the total number of the receiving devices is larger than a preset ratio threshold; the step of reducing the video rate of the target video includes: counting the number of devices needing to reduce code rate in a plurality of receiving devices; and if the number of the devices is greater than a preset number threshold value, or the quotient of the number of the devices and the total number of the receiving devices is greater than a preset proportion threshold value, reducing the video code rate of the target video.
In an optional implementation manner, the step of reducing the video bitrate of the target video includes: acquiring the current network speed of receiving equipment; and adjusting the video code rate of the target video to a code rate lower than the current network speed of the receiving equipment.
In an optional embodiment, the adjustment range of the video bitrate is a plurality of preset transcoding bitrates; the step of adjusting the video bitrate of the target video to a bitrate lower than the current network speed of the receiving device includes: selecting a transcoding code rate which is smaller than the current network speed of the receiving equipment from a plurality of transcoding code rates; determining a target code rate according to the selected transcoding code rate with the minimum difference value with the current network speed; and adjusting the video code rate of the target video to the target code rate.
In an optional implementation manner, the step of obtaining the pause state data of the target video when the target video is played on the receiving device of the target video includes: periodically judging whether the receiving equipment is blocked when playing the target video according to the specified duration; if the video is blocked, recording the blocking time when the receiving equipment plays the target video; the stuck time is determined as stuck state data of the receiving device.
In an alternative embodiment, it is determined that a stuck occurs when the receiving device plays the target video by one or more of the following: judging whether the current network speed of the receiving equipment is less than the video code rate of the target video; if the current time is less than the preset time, determining that the jamming occurs; if the preset pause judging program indicates that the playing is paused, determining that the pause is paused; judging whether the number of video frames accumulated when the receiving equipment plays the target video is greater than or equal to a preset threshold value or not; if greater than or equal to, it is determined that a stuck occurs.
In a second aspect, an embodiment of the present invention provides an apparatus for adjusting a video bitrate, where the apparatus includes: the data acquisition module is used for acquiring the pause state data of the target video when the target video is played on the receiving equipment of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and the code rate adjusting module is used for reducing the video code rate of the target video if the pause state data meets the specified conditions.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the video bitrate adjustment method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium storing machine-executable instructions, which when invoked and executed by a processor, cause the processor to implement the video bitrate adjustment method according to any one of the foregoing embodiments.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a video code rate adjusting method, a video code rate adjusting device and electronic equipment, wherein the method comprises the steps of firstly, acquiring pause state data of a target video when the target video is played on receiving equipment of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and if the pause state data meet the specified conditions, reducing the video code rate of the target video. The method can monitor the pause state of the target video when the target video is played on the receiving equipment, and when the pause state data meets the specified conditions, the video code rate of the target video is reduced, so that the video code rate of the target video is adjusted to be suitable for the video code rate played by the receiving equipment, the pause phenomenon of video playing is effectively reduced, and the watching effect of the video is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention as set forth above.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a video bitrate adjustment method according to an embodiment of the present invention;
fig. 2 is a flowchart of another video bitrate adjustment method according to an embodiment of the present invention;
fig. 3 is a flowchart of another video bitrate adjustment method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video bitrate adjustment apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the related art, when a user watches live video at a client, a background usually sets a fixed video code rate to provide video stream for a viewer, but when the network speed of the client is poor, the phenomenon of watching video is blocked, and the watching effect of the video is affected.
Based on this, the embodiment of the invention provides a video code rate adjustment method, a video code rate adjustment device and electronic equipment, and the technology can be applied to various video playing scenes, especially the playing scene of live video. To facilitate understanding of the present embodiment, first, a detailed description is given of a video bitrate adjustment method disclosed in the embodiment of the present invention, where the method is applied to a server, and the server may be a live server, as shown in fig. 1, and the method includes the following steps:
step S102, acquiring pause state data of a target video when the target video is played on a receiving device of the target video; the stuck state data is used to indicate the degree of sticking of the target video played by the receiving device.
The target video can be a live video, a rebroadcast video and the like. The target video receiving device may be a device used by a user to watch a target video, that is, a device for playing the target video, and may be a mobile phone, a tablet computer, a notebook computer, a computer, an intelligent television, or the like. The stuck state data includes: and the receiving equipment plays the target video and generates data of the pause phenomenon, wherein the data can be pause time, pause times, pause time length and the like. Generally, the more pause time, the more serious the pause degree of the target video played by the receiving device; the more the number of times of pause is, the more serious the pause degree of the target video played by the receiving device is, the longer the pause time is, the more serious the pause degree of the target video played by the receiving device is.
And step S104, if the pause state data meets the specified conditions, reducing the video code rate of the target video.
The video code rate generally refers to the number of data bits transmitted in unit time during video data transmission, and can also be understood as the size of a storage space occupied by video data, and generally the larger the occupied space is, the higher the video code rate is, the clearer the video data is; the smaller the occupied space is, the lower the video code rate is, and the less clear the video data is. The stuck phenomenon when the receiving device plays the target video is usually caused by the fact that the network speed when the receiving device plays the target video is not matched with the video code rate of the target video, for example, when the network speed of the receiving device is smaller than the video code rate of the target video, the stuck phenomenon when the receiving device plays can be generated, and therefore the stuck phenomenon when the receiving device plays can be avoided by reducing the video code rate of the target video.
In specific implementation, if the video bitrate of the target video is reduced to the designated bitrate, a video stream with the designated video bitrate needs to be pulled from the providing equipment of the target video to implement bitrate conversion, so that bitrate conversion cost is increased. Therefore, in order to reduce the bitrate conversion cost and improve the viewing effect of the target video, the video bitrate of the target video needs to be reduced when the pause state data of the receiving device meets the specified condition. The specified condition may be that there are consecutive, more than two stuck times in the stuck state data; the stuck state data can indicate that the stuck times exceed a preset threshold; it may be that the katon time in the katon state data exceeds a preset time threshold, etc.
The embodiment of the invention provides a video code rate adjusting method, which comprises the steps of firstly obtaining pause state data of a target video when the target video is played on a receiving device of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and if the pause state data meet the specified conditions, reducing the video code rate of the target video. The method can monitor the pause state of the target video when the target video is played on the receiving equipment, and when the pause state data meets the specified conditions, the video code rate of the target video is reduced, so that the video code rate of the target video is adjusted to be suitable for the video code rate played by the receiving equipment, the pause phenomenon of video playing is effectively reduced, and the watching effect of the video is improved.
The embodiment of the invention also provides another video code rate adjusting method which is realized on the basis of the method of the embodiment; the method mainly describes a specific process of acquiring the pause state data of the target video when the target video is played on the receiving device of the target video (realized by the following steps S202-S204), and if the pause state data meets the specified conditions, the video code rate of the target video is reduced (realized by the following steps S206-S212); as shown in fig. 2, the method comprises the following specific steps:
step S202, periodically judging whether the receiving equipment is blocked when playing the target video according to the specified duration.
The specified time period may be set by the developer according to the requirement, and may be, for example, 30 seconds, 1 minute, 2 minutes, or the like. In specific implementation, every specified time, the server can judge whether the target video played by the receiving equipment is blocked or not, so that the state of the target video played by the receiving equipment is monitored in real time.
Step S204, if the video is blocked, the blocking time when the receiving equipment plays the target video is recorded; the stuck time is determined as stuck state data of the receiving device.
In a specific implementation, it may be determined that the target video is jammed when the receiving device plays the target video by one or more of the following manners:
the method comprises the steps of calculating the current network speed of the receiving equipment when playing a target video in real time, and judging whether the current network speed of the receiving equipment is smaller than the video code rate of the target video; if so, determining that the jam is occurred. When the current network speed (1000kbps) of the receiving device is smaller than the video code rate (1200kbps) of the target video, the pause phenomenon occurs when the receiving device plays due to the mismatch between the current network speed and the video code rate of the target video.
In a second mode, if a preset pause judging program in the server indicates that the playing is paused, the pause is determined to occur, the program can judge whether the playing target video of the receiving device is paused in real time, the pause judging program can usually judge whether the CPU occupancy rate of the receiving device exceeds a preset threshold value, and if so, the pause is determined to occur.
Judging whether the number of video frames accumulated when the receiving equipment plays the target video is greater than or equal to a preset threshold value or not; if greater than or equal to, it is determined that a stuck occurs. In a specific implementation, if a receiving device is stuck when playing a target video, a frame loss phenomenon may occur, for example, when a live broadcast service sends a video to the receiving device, the sending is slow, video frames are stacked, the number of stacked video frames exceeds a maximum value (corresponding to the preset threshold) that can be cached, a part of data may be lost, that is, a frame loss phenomenon may occur.
In some embodiments, in order to improve the accuracy of the determination of the pause phenomenon, the above three manners are required to be jointly used to determine whether the target video played by the receiving device is paused, and if the three manners all indicate that the target video is paused, the fact that the target video is paused is determined, and the pause time when the target video is played by the receiving device is recorded.
The pause time is used to indicate the time value of pause occurring when the receiving device plays the target video, and can also be understood as indicating in which period pause occurs. Generally, the more pause time recorded in the pause state data, the more serious the pause degree indicating that the receiving device plays the target video.
Step S206, judging whether the stuck state data comprises a plurality of stuck times; if yes, go to step S208; otherwise, step S202 is performed.
In the process of playing the video by the receiving device, the network at the receiving device end may jitter, that is, the network state is not good instantaneously, so that the video playing is blocked, therefore, the receiving device is blocked once without immediately reducing the video code rate of the target video, and whether the video code rate is reduced can be determined when the receiving device is blocked many times. In specific implementation, the number of the recorded clamping time is the same as the clamping times.
Step S208, judging whether the interval of two adjacent specified pause times in the plurality of pause times is a specified duration; if so, go to step S210, otherwise, go to step S202.
The interval of two adjacent stuck times in the multiple stuck times can be an interval of every two stuck times in 3 stuck times (or 5 stuck times, etc., and the specified number can be set arbitrarily) in the multiple stuck times, and if the interval is consistent with or close to the specified duration, it can be determined that the receiving device needs to reduce the code rate.
The specified duration is also a time interval for periodically determining whether the receiving device is stuck, and the step S208 may also be understood as determining whether there is a stuck time corresponding to a plurality of consecutive periods in the plurality of stuck times, for example, all the consecutive 3 periods have the stuck time recorded, and determining that the receiving device needs to reduce the code rate.
Step S210, determining that the receiving device needs to reduce the code rate.
Step S212, acquiring the current network speed of the receiving equipment; and adjusting the video code rate of the target video to a code rate lower than the current network speed of the receiving equipment.
The current network speed is the network speed when the receiving device plays the target video, and if the receiving device plays the target video more smoothly or is not jammed, the video code rate of the target video played by the receiving device needs to be adjusted to be lower than the current network speed of the receiving device. In a specific implementation, the adjustment range of the video bitrate is a plurality of preset transcoding bitrates, specifically how many transcoding bitrates are set, and how much each transcoding bitrate value is, which may be set according to development requirements, for example, five transcoding bitrates of 500kpbs, 850kbps, 1500kbps, 1600kbps, 2000kbps, and the like may be set. The step S212 can be implemented by the following steps 10-12:
and step 10, selecting a transcoding code rate which is smaller than the current network speed of the receiving equipment from the plurality of transcoding code rates.
And step 11, determining a target code rate according to the selected transcoding code rate with the minimum difference value with the current network speed.
And step 12, adjusting the video code rate of the target video to the target code rate.
In order to ensure that the definition of the target video is high, the video code rate of the target video needs to be adjusted to be smaller than the current network speed when the receiving device plays the target video, and the reduced transcoding code rate is the code rate closest to the current network speed. For example, if five transcoding code rates of 500kbps, 850kbps, 1500kbps, 1600kbps and 2000kbps are provided, the current code rate of the target video is 1200kbps, the current line speed is 1000kbps, and the transcoding code rate smaller than the current line speed is 500kbps and 850kbps, at which time the target code rate should be selected to be 850kbps close to the current line speed.
The video code rate adjusting method comprises the steps of firstly, periodically judging whether the receiving equipment is blocked when playing the target video; if the video is blocked, recording the blocking time when the receiving equipment plays the target video; determining the pause time as pause state data of the receiving device; judging whether the stuck state data comprises a plurality of stuck times or not; if yes, judging whether the interval of two appointed adjacent pause times in the plurality of pause times is an appointed time length; if so, determining that the receiving equipment needs to reduce the code rate, then acquiring the current network speed of the receiving equipment, and adjusting the video code rate of the target video to be the code rate lower than the current network speed of the receiving equipment. According to the method, the target video with the proper code rate suitable for playing can be provided for the receiving equipment according to the network condition of the receiving equipment of the target video, so that a viewer can not be blocked in the process of watching the target video through the receiving equipment, and the video watching effect is improved.
The embodiment of the invention also provides another video code rate adjusting method which is realized on the basis of the method of the embodiment; when a plurality of receiving devices are mainly described, if the pause state data of the receiving devices meet specified conditions, reducing the video code rate of the target video (realized by the following steps S308-S310); as shown in fig. 3, the method comprises the following specific steps:
step S302, acquiring pause state data of the target video when the target video is played on the receiving equipment of the target video; the stuck state data includes a stuck time.
In a specific implementation, the target video receiving device is usually multiple, and it can be understood that one target video usually has multiple people watching on different receiving devices.
Step S304, aiming at each receiving device, judging whether the pause time in the pause state data of the current receiving device is multiple, and the interval of two adjacent pause times in the multiple pause times is appointed as an appointed time length; if yes, go to step S306, otherwise, go to step S302.
The receiving device has a plurality of stuck time in the stuck state data, and the specified time interval of two adjacent stuck time in the plurality of stuck time is equal to one of the specified conditions.
Step S306, determining that the current receiving device needs to reduce the code rate.
Step S308, count the number of devices that need to reduce the code rate among the plurality of receiving devices.
Step S310, if the number of the devices is larger than a preset number threshold, or the quotient of the number of the devices and the total number of the receiving devices is larger than a preset proportion threshold, reducing the video code rate of the target video.
The number of the devices is the number of receiving devices needing to reduce the code rate, and the preset number threshold value can be set by research personnel according to requirements and can be dozens or twenty; the preset proportion threshold may be set by a developer according to requirements, and may be 5% or 10%, and the like. In a specific implementation, the specified conditions include: the number of the receiving devices needing to reduce the code rate is larger than a preset number threshold, or the quotient of the number of the receiving devices needing to reduce the code rate and the total number of the receiving devices is larger than a preset ratio threshold.
Because the video bitrate of the target video is converted, the video stream with the specified video bitrate needs to be pulled from the providing equipment of the target video to realize bitrate conversion, and the video playing conversion cost is increased.
In a specific implementation, the step of reducing the video bitrate of the target video in step S310 includes: and aiming at each device needing to reduce the code rate, adjusting the video code rate of the target video played by the receiving device needing to reduce the code rate according to the current network speed of the receiving device needing to reduce the code rate. Specifically, the video bitrate of the target video played by the receiving device which needs to reduce the bitrate at present is adjusted to be lower than the bitrate of the current internet speed of the receiving device which needs to reduce the bitrate at present.
For example, if the video bitrate of the target video is 1200kbps, and five transcoding bitrates 700kpbs, 850kbps, 1500kbps, 1600kbps and 2000kbps are set, the number of the target video receiving devices is 100, and the number of the receiving devices needing bitrate reduction is 50, wherein the current network speed of 20 receiving devices needing bitrate reduction is 1000kbps, the current network speed of 18 receiving devices needing bitrate reduction is 900kbps, and the current network speed of 12 receiving devices needing bitrate reduction is 800kbps, at this time, the video bitrate of the target video played by 20 receiving devices needing bitrate reduction can be reduced to 850kbps, the video bitrate of the target video played by 18 receiving devices needing bitrate reduction is reduced to 850kbps, and the video bitrate played by 12 receiving devices needing bitrate reduction is reduced to 700 kbps.
The video code rate adjusting method comprises the steps of firstly, acquiring pause state data of a target video when the target video is played on a receiving device of the target video; judging whether the pause time in the pause state data of the current receiving equipment is multiple or not for each receiving equipment, and designating the interval between two adjacent pause times as a designated duration in the multiple pause times; if the current receiving equipment needs to reduce the code rate, then counting the number of equipment needing to reduce the code rate in the plurality of receiving equipment; and if the number of the devices is greater than the preset number threshold value, or the quotient of the number of the devices and the total number of the receiving devices is greater than the preset proportion threshold value, reducing the video code rate of the target video. According to the method, the code rate of the video played by the receiving end equipment can be automatically adjusted to be the proper code rate according to the network condition of the receiving equipment, so that the smoothness of watching the video on the receiving equipment by a user is improved, the phenomenon of pause is effectively avoided, and the watching experience of the user is improved.
Corresponding to the above video bitrate adjustment method, an embodiment of the present invention further provides a video bitrate adjustment device, as shown in fig. 4, where the device includes:
the data acquisition module 40 is configured to acquire pause state data of the target video when the target video is played on the target video receiving device; the stuck state data is used to indicate the degree of sticking of the target video played by the receiving device.
And a rate adjustment module 41, configured to reduce the video rate of the target video if the stuck state data meets a specified condition.
The video code rate adjusting device firstly acquires pause state data of a target video when the target video is played on a receiving device of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment; and if the pause state data meet the specified conditions, reducing the video code rate of the target video. The method can monitor the pause state of the target video when the target video is played on the receiving equipment, and when the pause state data meets the specified conditions, the video code rate of the target video is reduced, so that the video code rate of the target video is adjusted to be suitable for the video code rate played by the receiving equipment, the pause phenomenon of video playing is effectively reduced, and the watching effect of the video is improved.
Further, the stuck state data includes a stuck time; the above-mentioned specified conditions include: the card pause time in the card pause state data is multiple, and the interval of two adjacent card pause times in the multiple card pause times is specified as specified duration; the code rate adjustment module 41 is configured to: if the number of the stuck time in the stuck state data of the receiving equipment is multiple, and the interval of two adjacent stuck times in the multiple stuck time is specified as specified duration, determining that the code rate of the receiving equipment needs to be reduced; and reducing the video code rate of the target video.
In a specific implementation, the number of the receiving devices is multiple, and the specifying conditions further include: the number of the receiving devices needing to reduce the code rate is larger than a preset number threshold, or the quotient of the number of the receiving devices needing to reduce the code rate and the total number of the receiving devices is larger than a preset ratio threshold; the code rate adjustment module 41 is further configured to: counting the number of devices needing to reduce code rate in a plurality of receiving devices; and if the number of the devices is greater than the preset number threshold value, or the quotient of the number of the devices and the total number of the receiving devices is greater than the preset proportion threshold value, reducing the video code rate of the target video.
Further, the code rate adjusting module 41 includes: the network speed acquisition unit is used for acquiring the current network speed of the receiving equipment; and the code rate reducing unit is used for regulating the video code rate of the target video to be lower than the code rate of the current network speed of the receiving equipment.
In specific implementation, the adjustment range of the video code rate is a plurality of preset transcoding code rates; the code rate lowering unit is configured to: selecting a transcoding code rate which is smaller than the current network speed of the receiving equipment from a plurality of transcoding code rates; determining a target code rate according to the selected transcoding code rate with the minimum difference value with the current network speed; and adjusting the video code rate of the target video to the target code rate.
Further, the data obtaining module 40 is configured to: periodically judging whether the receiving equipment is blocked when playing the target video according to the specified duration; if the video is blocked, recording the blocking time when the receiving equipment plays the target video; the stuck time is determined as stuck state data of the receiving device.
Specifically, it is determined that the target video is jammed when the receiving device plays the target video by one or more of the following ways: judging whether the current network speed of the receiving equipment is less than the video code rate of the target video; if the current time is less than the preset time, determining that the jamming occurs; if the preset pause judging program indicates that the playing is paused, determining that the pause is paused; judging whether the number of video frames accumulated when the receiving equipment plays the target video is greater than or equal to a preset threshold value or not; if greater than or equal to, it is determined that a stuck occurs.
The video bitrate adjusting device provided in the embodiment of the present invention has the same implementation principle and technical effect as the foregoing method for determining the eligibility of the labeled data, and for brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the part not mentioned in the embodiment of the device.
An embodiment of the present invention further provides an electronic device, which is shown in fig. 5 and includes a processor 101 and a memory 100, where the memory 100 stores machine executable instructions that can be executed by the processor 101, and the processor executes the machine executable instructions to implement the video bitrate adjustment method.
Further, the electronic device shown in fig. 5 further includes a bus 102 and a communication interface 103, and the processor 101, the communication interface 103, and the memory 100 are connected through the bus 102.
The Memory 100 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The Processor 101 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the video bitrate adjustment method.
The video bitrate adjustment method, apparatus, and computer program product of an electronic device provided in the embodiments of the present invention include a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for adjusting video bitrate, the method comprising:
acquiring pause state data of a target video when the target video is played on receiving equipment of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment;
and if the pause state data meet the specified conditions, reducing the video code rate of the target video.
2. The method of claim 1, wherein the stuck state data comprises a stuck time; the specified conditions include: the card pause time in the card pause state data is multiple, and the interval of two adjacent card pause times in the card pause time is appointed to be appointed time length;
if the pause state data meets the specified condition, the step of reducing the video code rate of the target video comprises the following steps:
if the number of the stuck time in the stuck state data of the receiving equipment is multiple, and the interval of two adjacent stuck times in the multiple stuck time is specified as a specified duration, determining that the code rate of the receiving equipment needs to be reduced;
and reducing the video code rate of the target video.
3. The method according to claim 2, wherein the receiving device is plural, and the specifying conditions further include: the number of the receiving devices needing to reduce the code rate is larger than a preset number threshold, or the quotient of the number of the receiving devices needing to reduce the code rate and the total number of the receiving devices is larger than a preset ratio threshold; the step of reducing the video rate of the target video comprises:
counting the number of devices needing to reduce code rate in a plurality of receiving devices;
and if the equipment number is greater than a preset number threshold value, or the quotient of the equipment number and the total number of the receiving equipment is greater than a preset proportion threshold value, reducing the video code rate of the target video.
4. The method according to any of claims 1-3, wherein the step of reducing the video bitrate of the target video comprises:
acquiring the current network speed of the receiving equipment;
and adjusting the video code rate of the target video to be a code rate lower than the current network speed of the receiving equipment.
5. The method according to claim 4, wherein the adjustment range of the video bitrate is a plurality of preset transcoding bitrates; the step of adjusting the video bitrate of the target video to a bitrate lower than the current network speed of the receiving device includes:
selecting a transcoding code rate smaller than the current network speed of the receiving equipment from a plurality of transcoding code rates;
determining a target code rate according to the selected transcoding code rate with the minimum difference value with the current network speed;
and adjusting the video code rate of the target video to the target code rate.
6. The method of claim 1, wherein the step of obtaining the pause state data of the target video when the target video is played on the receiving device of the target video comprises:
periodically judging whether the receiving equipment is blocked when playing the target video according to the specified duration;
if the video is blocked, recording the blocking time when the receiving equipment plays the target video; and determining the pause time as pause state data of the receiving device.
7. The method of claim 6, wherein determining that the sink device is stuck while playing the target video is performed by one or more of:
judging whether the current network speed of the receiving equipment is less than the video code rate of the target video; if the current time is less than the preset time, determining that the jamming occurs;
if the preset pause judging program indicates that the playing is paused, determining that the pause is paused;
judging whether the number of video frames accumulated when the receiving equipment plays the target video is greater than or equal to a preset threshold value or not; if greater than or equal to, it is determined that a stuck occurs.
8. An apparatus for adjusting video bitrate, the apparatus comprising:
the data acquisition module is used for acquiring the pause state data of the target video when the target video is played on the receiving equipment of the target video; the pause state data is used for indicating the pause degree of the target video played by the receiving equipment;
and the code rate adjusting module is used for reducing the video code rate of the target video if the pause state data meets the specified condition.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the video bitrate adjustment method of any one of claims 1 to 7.
10. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the video bitrate adjustment method of any one of claims 1 to 7.
CN202010938355.0A 2020-09-08 2020-09-08 Video code rate adjusting method and device and electronic equipment Pending CN112019873A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010938355.0A CN112019873A (en) 2020-09-08 2020-09-08 Video code rate adjusting method and device and electronic equipment
PCT/CN2021/102148 WO2022052566A1 (en) 2020-09-08 2021-06-24 Video bitrate adjustment method and apparatus, and electronic device and machine-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010938355.0A CN112019873A (en) 2020-09-08 2020-09-08 Video code rate adjusting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112019873A true CN112019873A (en) 2020-12-01

Family

ID=73521371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010938355.0A Pending CN112019873A (en) 2020-09-08 2020-09-08 Video code rate adjusting method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN112019873A (en)
WO (1) WO2022052566A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113115074A (en) * 2021-04-30 2021-07-13 北京字节跳动网络技术有限公司 Video jamming processing method and device
WO2022052566A1 (en) * 2020-09-08 2022-03-17 北京金山云网络技术有限公司 Video bitrate adjustment method and apparatus, and electronic device and machine-readable storage medium
CN115086779A (en) * 2021-12-17 2022-09-20 浙江大华技术股份有限公司 Video transmission system
CN115396731A (en) * 2022-08-10 2022-11-25 北京势也网络技术有限公司 Panoramic video playing method and device, electronic equipment and readable storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517143A (en) * 2013-08-29 2014-01-15 小米科技有限责任公司 Method, device and terminal device for playing network video
CN105376614A (en) * 2015-10-27 2016-03-02 南京创维信息技术研究院有限公司 Video quality optimizing method and device
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus
CN105898408A (en) * 2016-04-28 2016-08-24 乐视控股(北京)有限公司 Video play method and device
CN107690077A (en) * 2017-09-05 2018-02-13 北京京东尚科信息技术有限公司 The method and apparatus for monitoring net cast interim card
CN108076386A (en) * 2017-12-22 2018-05-25 广州酷狗计算机科技有限公司 Video cardton detection method and device, storage medium
CN108270738A (en) * 2016-12-30 2018-07-10 北京华为数字技术有限公司 A kind of method for processing video frequency and the network equipment
CN108769760A (en) * 2018-05-23 2018-11-06 中国联合网络通信集团有限公司 A kind of code rate adjustment method, UE, MEC and network system
CN108900919A (en) * 2018-06-29 2018-11-27 乐蜜有限公司 Company's wheat method, apparatus, server and terminal in a kind of live streaming
CN109766282A (en) * 2019-01-31 2019-05-17 Oppo广东移动通信有限公司 A kind of Caton detection method, Caton detection device and terminal device
CN110267100A (en) * 2019-07-12 2019-09-20 北京达佳互联信息技术有限公司 Code rate switching method, device, electronic equipment and the storage medium of FLV video
CN110300326A (en) * 2018-03-22 2019-10-01 杭州萤石软件有限公司 A kind of detection method and device of video cardton
CN110418170A (en) * 2019-07-03 2019-11-05 腾讯科技(深圳)有限公司 Detection method and device, storage medium and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10530825B2 (en) * 2016-06-01 2020-01-07 Amazon Technologies, Inc. Catching up to the live playhead in live streaming
CN110290402B (en) * 2019-07-31 2021-11-05 腾讯科技(深圳)有限公司 Video code rate adjusting method, device, server and storage medium
CN111683273A (en) * 2020-06-02 2020-09-18 中国联合网络通信集团有限公司 Method and device for determining video blockage information
CN112019873A (en) * 2020-09-08 2020-12-01 北京金山云网络技术有限公司 Video code rate adjusting method and device and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517143A (en) * 2013-08-29 2014-01-15 小米科技有限责任公司 Method, device and terminal device for playing network video
CN105376614A (en) * 2015-10-27 2016-03-02 南京创维信息技术研究院有限公司 Video quality optimizing method and device
CN105635755A (en) * 2015-12-30 2016-06-01 合一网络技术(北京)有限公司 Direct-broadcast flow transmission method and apparatus
CN105898408A (en) * 2016-04-28 2016-08-24 乐视控股(北京)有限公司 Video play method and device
CN108270738A (en) * 2016-12-30 2018-07-10 北京华为数字技术有限公司 A kind of method for processing video frequency and the network equipment
CN107690077A (en) * 2017-09-05 2018-02-13 北京京东尚科信息技术有限公司 The method and apparatus for monitoring net cast interim card
CN108076386A (en) * 2017-12-22 2018-05-25 广州酷狗计算机科技有限公司 Video cardton detection method and device, storage medium
CN110300326A (en) * 2018-03-22 2019-10-01 杭州萤石软件有限公司 A kind of detection method and device of video cardton
CN108769760A (en) * 2018-05-23 2018-11-06 中国联合网络通信集团有限公司 A kind of code rate adjustment method, UE, MEC and network system
CN108900919A (en) * 2018-06-29 2018-11-27 乐蜜有限公司 Company's wheat method, apparatus, server and terminal in a kind of live streaming
CN109766282A (en) * 2019-01-31 2019-05-17 Oppo广东移动通信有限公司 A kind of Caton detection method, Caton detection device and terminal device
CN110418170A (en) * 2019-07-03 2019-11-05 腾讯科技(深圳)有限公司 Detection method and device, storage medium and electronic device
CN110267100A (en) * 2019-07-12 2019-09-20 北京达佳互联信息技术有限公司 Code rate switching method, device, electronic equipment and the storage medium of FLV video

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022052566A1 (en) * 2020-09-08 2022-03-17 北京金山云网络技术有限公司 Video bitrate adjustment method and apparatus, and electronic device and machine-readable storage medium
CN113115074A (en) * 2021-04-30 2021-07-13 北京字节跳动网络技术有限公司 Video jamming processing method and device
CN113115074B (en) * 2021-04-30 2022-11-22 北京字节跳动网络技术有限公司 Video jamming processing method and device
CN115086779A (en) * 2021-12-17 2022-09-20 浙江大华技术股份有限公司 Video transmission system
CN115086779B (en) * 2021-12-17 2024-04-16 浙江大华技术股份有限公司 Video transmission system
CN115396731A (en) * 2022-08-10 2022-11-25 北京势也网络技术有限公司 Panoramic video playing method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
WO2022052566A1 (en) 2022-03-17

Similar Documents

Publication Publication Date Title
CN112019873A (en) Video code rate adjusting method and device and electronic equipment
Duanmu et al. A quality-of-experience database for adaptive video streaming
US20230308704A1 (en) Optimization of encoding profiles for media streaming
CN107147919B (en) Live broadcast quick starting method and system
US9521179B2 (en) Validation of live media stream based on predetermined standards
CN109587551B (en) Method, device, equipment and storage medium for judging live broadcast blockage of streaming media
US20130314553A1 (en) Video Data Quality Assessment Method and Apparatus
US10567825B2 (en) Cloud DVR storage
CN108476317B (en) Audio/video quality estimation device, audio/video quality estimation method, and program
CN107920041B (en) Method and device for adjusting bit rate of live video data coding
US10541894B2 (en) Method for assessing the perceived quality of adaptive video streaming
US20210160550A1 (en) Optimizing encoding operations when generating a buffer-constrained version of a media title
CN111447447B (en) Live broadcast encoding method and device and electronic equipment
CN108881931B (en) Data buffering method and network equipment
Seufert et al. Impact of intermediate layer on quality of experience of HTTP adaptive streaming
US11563962B2 (en) Seamless content encoding and transmission
US20230156068A1 (en) System and method for managing video streaming quality of experience
US9680904B2 (en) Adaptive buffers for media players
US10200433B2 (en) Client device, a method for receiving a streaming media data and a streaming media data transmission system
CN114189705A (en) Live broadcast card pause processing method and system
CN112565016B (en) Positioning method, system and device for abnormal time delay, electronic equipment and storage medium
Agboma et al. User Centric Assessment of Mobile Contents Delivery.
KR102153801B1 (en) Method and apparatus of video streaming
EP3664456A1 (en) Apparatus and method for playing streamed media
CN111491207A (en) Video data processing method and device in live broadcast and electronic equipment

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: 20201201