CN106454413B - Code switching method, device and equipment is broadcast live - Google Patents

Code switching method, device and equipment is broadcast live Download PDF

Info

Publication number
CN106454413B
CN106454413B CN201610835575.4A CN201610835575A CN106454413B CN 106454413 B CN106454413 B CN 106454413B CN 201610835575 A CN201610835575 A CN 201610835575A CN 106454413 B CN106454413 B CN 106454413B
Authority
CN
China
Prior art keywords
coding
live video
soft
hard coded
utilization rate
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.)
Active
Application number
CN201610835575.4A
Other languages
Chinese (zh)
Other versions
CN106454413A (en
Inventor
史大龙
赵子龙
刘玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610835575.4A priority Critical patent/CN106454413B/en
Publication of CN106454413A publication Critical patent/CN106454413A/en
Application granted granted Critical
Publication of CN106454413B publication Critical patent/CN106454413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2405Monitoring of the internal components or processes of the server, e.g. server load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2383Channel coding or modulation of digital bit-stream, e.g. QPSK modulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure is directed to a kind of live streaming code switching method, device and equipment.This method comprises: main broadcaster's client monitors central processor CPU utilization rate or graphics processor GPU utilization rate during the live video after sending coding to direct broadcast server;In response to monitoring that the cpu busy percentage and/or the GPU utilization rate are more than given threshold, switch the coding mode of live video.The scheme of the disclosure can keep the fluency of live streaming and ensure that the terminal device being broadcast live will not overheat operation, the live streaming effect for being optimal.

Description

Code switching method, device and equipment is broadcast live
Technical field
This disclosure relates to direct seeding technique field, more particularly to live streaming code switching method, device and equipment.
Background technique
Now with the development of mobile Internet, software is broadcast live and is becoming increasingly popular, more and more main broadcasters utilize live streaming Platform plays various contents to spectators.In mobile live streaming, main broadcaster's client (abbreviation main broadcaster end) of main broadcaster can pass through live streaming Software is broadcast live to spectators.
Wherein, during application work is broadcast live, main broadcaster's client of main broadcaster side would generally use soft coding or Hard coded mode is sent after encoding to video data.Soft coding is using CPU (Central Processing Unit, central processing unit) it is encoded, implementation is simple, and parameter is easy to adjust, and upgrading is easy, but cpu load weight, performance Lower than hard coded, quality is usually got well than hard coded under low bit- rate;Hard coded is using GPU (Graphics Processing Unit, graphics processor) it is encoded, performance is higher than soft coding, and quality is usually less than soft coding under low bit- rate.
In the related technology, main broadcaster's client general whole process during entire live streaming uses soft coding or hard coded mode Carry out coding live streaming.Since in the application of terminal device, CPU and GPU are shared resources.Assuming that one is only supported soft volume Applying when executing for code, encounters other application and seizes cpu resource, will lead to net cast Caton, result of broadcast is poor; And the application for only using hard coded then all can not carry out preferable heat dissipation design to GPU due to general terminal device, most Cause temperature excessively high eventually, influences the normal operation entirely applied.
Summary of the invention
To overcome the problems in correlation technique, present disclose provides live streaming code switching method, device and equipment.
According to the first aspect of the embodiments of the present disclosure, a kind of live streaming code switching method is provided, comprising:
Main broadcaster's client monitors central processing unit during the live video after sending coding to direct broadcast server Cpu busy percentage or graphics processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate more than given threshold, switch live video Coding mode.
Optionally, described in response to monitoring that the cpu busy percentage is more than given threshold, switch the coding staff of live video Formula, comprising:
In response to monitoring that the cpu busy percentage is more than the first given threshold, by the coding mode of live video from soft volume Code is switched to hard coded;
It is described in response to monitor the GPU utilization rate be more than given threshold, switch the coding mode of live video, wrap It includes:
In response to monitoring that the GPU utilization rate is more than the second given threshold, the coding mode of live video is compiled from hard Code is switched to soft coding;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
Optionally, described in response to monitoring the cpu busy percentage and the GPU utilization rate more than given threshold, switching The coding mode of live video, comprising:
In response to monitoring that the cpu busy percentage is more than the first given threshold and the GPU utilization rate is more than the second setting Threshold value,
If the coding mode of current live video is hard coded, present encoding mode is kept;
If the coding mode of current live video is soft coding, the coding mode of live video is switched to from soft coding Hard coded;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
Optionally, the coding mode by live video is switched to hard coded from soft coding, comprising:
By the soft coding and after hard coded runs setting time parallel, then by the coding mode of live video from soft coding It is switched to hard coded;Or,
The coding mode by live video is switched to soft coding from hard coded, comprising:
By the soft coding and after hard coded runs setting time parallel, then by the coding mode of live video from hard coded It is switched to soft coding.
According to the second aspect of an embodiment of the present disclosure, a kind of live streaming coding switching device is provided, comprising:
Monitoring modular, for main broadcaster's client during the live video after sending coding to direct broadcast server, prison Survey central processor CPU utilization rate or graphics processor GPU utilization rate;
Hand-off process module, in response to the monitoring module monitors to the cpu busy percentage and/or GPU benefit It is more than given threshold with rate, switches the coding mode of live video.
Optionally, the hand-off process module includes:
First switching submodule, for being more than the first setting in response to the monitoring module monitors to the cpu busy percentage The coding mode of live video is switched to hard coded from soft coding by threshold value;Or,
Second switching submodule, for being more than the second setting in response to the monitoring module monitors to the GPU utilization rate The coding mode of live video is switched to soft coding from hard coded by threshold value;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
Optionally, the hand-off process module includes:
Third switching submodule, for being more than the first setting in response to the monitoring module monitors to the cpu busy percentage Threshold value and the GPU utilization rate are more than the second given threshold, if the coding mode of current live video is hard coded, keep working as Preceding coding mode;If the coding mode of current live video is soft coding, the coding mode of live video is cut from soft coding It is changed to hard coded;Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
Optionally, first switching submodule or the third switching submodule are parallel by the soft coding and hard coded Run setting time after, then by the coding mode of live video from it is soft coding be switched to hard coded;Or,
Second switching submodule is by the soft coding and after hard coded runs setting time parallel, then by live video Coding mode be switched to soft coding from hard coded.
According to the third aspect of an embodiment of the present disclosure, a kind of live streaming terminal device is provided, comprising:
Processor and memory for storage processor executable instruction;
Wherein, the processor is configured to:
To direct broadcast server send coding after live video during, monitor central processor CPU utilization rate or Graphics processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate more than given threshold, switch live video Coding mode.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Disclosure main broadcaster client monitors centre during the live video after sending coding to direct broadcast server Device cpu busy percentage or graphics processor GPU utilization rate are managed, if it find that the cpu busy percentage and/or the GPU utilization rate are super Cross given threshold, then switch the coding mode of live video, in this way can or GPU overload overweight in cpu load the case where Under avoid continuing to reuse CPU or GPU, and another coding mode is used, to keep the fluency of live streaming and ensure straight The terminal device broadcast will not overheat operation, the live streaming effect for being optimal.
The disclosure can when the cpu busy percentage is more than the first given threshold by the coding mode of live video from soft volume Code is switched to hard coded;Or, the coding mode of live video is compiled from hard when the GPU utilization rate is more than the second given threshold Code is switched to soft coding, to keep optimizing live streaming effect.
It, can be in the cpu busy percentage and described the present disclosure contemplates that in contrast CPU is to be easier to be preempted resource When GPU utilization rate is above given threshold, preferably select using the corresponding hard coded of GPU.
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.
Fig. 1 is a kind of disclosure flow chart that code switching method is broadcast live shown according to an exemplary embodiment.
Fig. 2 is a kind of disclosure another flow chart that code switching method is broadcast live shown according to an exemplary embodiment.
Fig. 3 is a kind of disclosure block diagram of live streaming coding switching device shown according to an exemplary embodiment.
Fig. 4 is a kind of disclosure another block diagram of live streaming coding switching device shown according to an exemplary embodiment.
Fig. 5 is a kind of disclosure structural block diagram that terminal device is broadcast live shown according to an exemplary embodiment.
Fig. 6 is an a kind of disclosure structural block diagram of equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is only to be not intended to be limiting the disclosure merely for for the purpose of describing particular embodiments in the term that the disclosure uses. The "an" of the singular used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where disclosure range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Present disclose provides a kind of live streaming code switching methods, can achieve the live streaming effect of optimization.
Fig. 1 is a kind of disclosure flow chart that code switching method is broadcast live shown according to an exemplary embodiment.
As shown in Figure 1, this method can be applied in main broadcaster's client, wherein main broadcaster's client can be located at terminal In equipment, method includes the following steps:
In a step 101, main broadcaster's client is during the live video after sending coding to direct broadcast server, monitoring Central processor CPU utilization rate or graphics processor GPU utilization rate.
Wherein, the cpu busy percentage or the GPU utilization rate can be obtained from the system operating statistic value of terminal device It takes.
The process that general main broadcaster direction spectators carry out net cast includes: main broadcaster's client of main broadcaster side, is compiled by setting For example soft coding of code mode or hard coded mode encode the video data of recording, then send out the live video after coding Direct broadcast server is given, is handed down to spectator client viewing again by direct broadcast server.Wherein, the hard coded be using GPU into Row coding;Soft be encoded to is encoded using CPU.
In a step 102, in response to monitoring that the cpu busy percentage and/or the GPU utilization rate are more than given threshold, Switch the coding mode of live video.
From the embodiment as it can be seen that the mistake of live video of the disclosure main broadcaster client after sending coding to direct broadcast server Cheng Zhong monitors central processor CPU utilization rate or graphics processor GPU utilization rate, if it find that the cpu busy percentage and/or The GPU utilization rate is more than given threshold, then switches the coding mode of live video, in this way can or GPU overweight in cpu load It avoids continuing to reuse CPU or GPU in the case where overload, and uses another coding mode, to keep live streaming Fluency and the terminal device for ensuring live streaming will not overheat operation, the live streaming effect for being optimal.
Fig. 2 is a kind of disclosure another flow chart that code switching method is broadcast live shown according to an exemplary embodiment.
As shown in Fig. 2, this method can be applied in main broadcaster's client, comprising the following steps:
In step 201, main broadcaster's client is during the live video after sending coding to direct broadcast server, monitoring Central processor CPU utilization rate or graphics processor GPU utilization rate.
In the disclosure, the prison that real-time monitoring is carried out to CPU and GPU is set in the live streaming application program of main broadcaster's client Module is surveyed, for main broadcaster's client during the live video after sending coding to direct broadcast server, real time monitoring is current The behaviour in service of the CPU and GPU of terminal device, including cpu busy percentage or GPU utilization rate etc. is broadcast live, can also include GPU frame Rate etc., for supporting the switching at runtime to coding mode.Wherein, the cpu busy percentage or the GPU utilization rate can be from terminals It is directly acquired in the system operating statistic value of equipment.Because cpu busy percentage and GPU utilization rate are all the operating statistic values of system, The disclosure can directly acquire and use these values as reference.In general, the CPU benefit when operand of system is big Will be higher with rate, and UI (User Interface, user interface) draw it is more when, then GPU utilization rate will be got higher.
In step 202, in response to monitoring that the cpu busy percentage is more than the first given threshold, by the volume of live video Code mode is switched to hard coded from soft coding.
When using soft coding to live video, if detecting that the cpu busy percentage of present terminal equipment is more than the One given threshold for example more than 70% when, trigger handover operation, by the coding mode of live video from it is soft coding be switched to Hard coded, to reduce the use to CPU.Wherein, the hard coded is to be encoded using GPU;It is described soft to be encoded to use CPU is encoded.In addition, can be monitored simultaneously to CPU and GPU utilization rate during switching, for verifying switching Effect and the trigger timing for adjusting switching.
It should be noted that first given threshold can be empirical value when initial, in the specific implementation process may be used To carry out dynamic adaptive adjustment.
In step 203, in response to monitoring that the GPU utilization rate is more than the second given threshold, by the volume of live video Code mode is switched to soft coding from hard coded.
When using hard coded to live video, if detecting that the GPU utilization rate of present terminal equipment is more than the Two given thresholds for example more than 70% when, trigger handover operation, the coding mode of live video is switched to from hard coded Soft coding, to reduce the use to GPU.In addition, can be supervised simultaneously to CPU and GPU utilization rate during switching It surveys, for verifying transition effect and adjusting the trigger timing of switching.
It should be noted that second given threshold can be empirical value when initial, in the specific implementation process may be used To carry out dynamic adaptive adjustment.
In step 204, in response to monitoring that the cpu busy percentage is more than the first given threshold and the GPU utilization rate Present encoding mode is kept if the coding mode of current live video is hard coded more than the second given threshold;If current The coding mode of live video is soft coding, and the coding mode of live video is switched to hard coded from soft coding.
In the disclosure, if monitor that GPU utilization rate and cpu busy percentage are above respective given threshold, examine CPU is considered with respect to being to be easier to be preempted for GPU, and resource is more nervous, and hard coded is to be encoded using GPU, soft coding To use CPU to be encoded, therefore GPU is preferentially selected, i.e., live video is encoded using hard coded, until according to GPU The variation of utilization rate and cpu busy percentage makes a policy again.
It should be noted that above-mentioned steps 202-204 uninevitable ordinal relation.
It should be noted that in above-mentioned steps, after the soft coding and hard coded being run setting time parallel, then The coding mode of live video is switched to hard coded from soft coding;Or, the soft coding and hard coded are run setting parallel After time, then the coding mode of live video is switched to soft coding from hard coded.That is, in order to guarantee in handoff procedure One time run parallel can be set in smoothness, to accomplish that data are synchronous, that is encoded before this when still shows As a result, until switching is completed.
From the embodiment it can be found that the live streaming application program of the disclosure passes through according to cpu busy percentage and GPU utilization rate Variation, the fluency of live streaming can be effectively ensured in two kinds of coding modes of switching at runtime, thus being optimal live streaming effect Purpose, while also ensuring that terminal device will not overheat operation.
Corresponding with aforementioned applications function realizing method embodiment, the disclosure additionally provides a kind of live streaming coding switching device And corresponding embodiment.
Fig. 3 is a kind of disclosure block diagram of live streaming coding switching device shown according to an exemplary embodiment.
The device can be in main broadcaster's client.Referring to Fig. 3, can wrap in a kind of live streaming coding switching device It includes: monitoring modular 31, hand-off process module 32.
Monitoring modular 31, for main broadcaster's client during the live video after sending coding to direct broadcast server, Monitor central processor CPU utilization rate or graphics processor GPU utilization rate.
Wherein, the cpu busy percentage or the GPU utilization rate can be obtained from the system operating statistic value of terminal device It takes.
Hand-off process module 32, for monitoring the cpu busy percentage and/or described in response to the monitoring modular 32 GPU utilization rate is more than given threshold, switches the coding mode of live video.
From the embodiment as it can be seen that the mistake of live video of the disclosure main broadcaster client after sending coding to direct broadcast server Cheng Zhong monitors central processor CPU utilization rate or graphics processor GPU utilization rate, if it find that the cpu busy percentage or described GPU utilization rate is more than given threshold, then switches the coding mode of live video, in this way can or GPU overweight in cpu load load It avoids continuing to reuse CPU or GPU in the case where overweight, and uses another coding mode, to keep the smoothness of live streaming It spends and ensures that the terminal device being broadcast live will not overheat operation, the live streaming effect for being optimal.
Fig. 4 is a kind of disclosure another block diagram of live streaming coding switching device shown according to an exemplary embodiment.
It may include: monitoring modular 31, hand-off process module 32 in a kind of live streaming coding switching device referring to Fig. 4.
Monitoring modular 31, hand-off process module 32 function may refer to Fig. 3 description.
Wherein, the hand-off process module 32 may include: the first switching submodule 321 or the second switching submodule 322.
First switching submodule 321, for monitoring that the cpu busy percentage is more than first in response to the monitoring modular 31 The coding mode of live video is switched to hard coded from soft coding by given threshold.
Second switching submodule 322, for monitoring that the GPU utilization rate is more than second in response to the monitoring modular 31 The coding mode of live video is switched to soft coding from hard coded by given threshold.
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
The hand-off process module 32 can also include: third switching submodule 333.
Third switching submodule 333, for monitoring that the cpu busy percentage is more than first in response to the monitoring modular 31 Given threshold and the GPU utilization rate are more than the second given threshold, if the coding mode of current live video is hard coded, are protected Hold present encoding mode;If the coding mode of current live video is soft coding, by the coding mode of live video from soft volume Code is switched to hard coded;Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
Wherein, first switching submodule 321 or the third switching submodule 323 are by the soft coding and hard coded After parallel operation setting time, then the coding mode of live video is switched to hard coded from soft coding;Or, second switching Submodule 322 is compiled by the soft coding and after hard coded runs setting time parallel, then by the coding mode of live video from hard Code is switched to soft coding.
From the embodiment it can be found that the live streaming coding switching device of the disclosure is according to cpu busy percentage and GPU utilization rate Variation, the fluency of live streaming can be effectively ensured in two kinds of coding modes of switching at runtime, thus being optimal live streaming effect Purpose, while also ensuring that terminal device will not overheat operation.
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.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein being used as separate part description Module may or may not be physically separated, the component shown as module may or may not be Physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to the actual needs Some or all of the modules therein is selected to realize the purpose of disclosure scheme.Those of ordinary skill in the art are not paying wound In the case that the property made is worked, it can understand and implement.
Fig. 5 is a kind of disclosure structural block diagram that terminal device is broadcast live shown according to an exemplary embodiment.
Referring to Fig. 5, it may include: processor 501 in live streaming terminal device and finger can be performed for storage processor 501 The memory 502 of order;
Wherein, processor 501 is configured as:
To direct broadcast server send coding after live video during, monitor central processor CPU utilization rate or Graphics processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate more than given threshold, switch live video Coding mode.
It should be noted that other programs that memory 502 stores, referring specifically to the description in previous methods process, this Place repeats no more, and processor 501 is also used to execute other programs of the storage of memory 502.
Fig. 6 is an a kind of disclosure structural block diagram of equipment shown according to an exemplary embodiment.
Referring to Fig. 6, for example, equipment 600 can be the mobile phone with routing function, computer, digital broadcast terminal, Messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Equipment 600 includes one or more of the following components: processing component 602, memory 604, power supply module 606, more matchmakers Body component 608, audio component 610, the interface 612 of input/output (I/O), sensor module 614 and communication component 616.
Processing component 602 usually control equipment 600 integrated operation, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 602 may include that one or more processors 620 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in equipment 600.These data are shown Example includes the instruction of any application or method for operating in equipment 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 606 provides electric power for the various assemblies of equipment 600.Power supply module 606 may include power management system System, one or more power supplys and other with for equipment 600 generate, manage, and distribute the associated component of electric power.
Multimedia component 608 includes the screen of one output interface of offer between equipment 600 and user.In some realities It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detect duration and pressure relevant to touch or slide.In some embodiments, multimedia component 608 includes One front camera and/or rear camera.It is such as in a shooting mode or a video mode, preceding when equipment 600 is in operation mode It sets camera and/or rear camera can receive external multi-medium data.Each front camera and rear camera can Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when equipment 600 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loudspeaker, is used for output audio signal.
I/O interface 612 provides interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for equipment 600 is commented Estimate.For example, sensor module 614 can detecte the state that opens/closes of equipment 600, the relative positioning of component, such as component For the display and keypad of equipment 600, sensor module 614 can be with the position of 600 1 components of detection device 600 or equipment Set change, the existence or non-existence that user contacts with equipment 600, the temperature in 600 orientation of equipment or acceleration/deceleration and equipment 600 Variation.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, for answering in imaging With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between equipment 600 and other equipment.Equipment 600 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 616 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, communication component 616 further includes near-field communication (NFC) module, to promote short range communication.For example, Radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, bluetooth can be based in NFC module (BT) technology and other technologies are realized.
In the exemplary embodiment, equipment 600 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 620 of equipment 600 to complete the above method.For example, Non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light Data storage device etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is executed by the processor of equipment When, it enables a device to execute a kind of live streaming code switching method, method includes:
Main broadcaster's client monitors central processing unit during the live video after sending coding to direct broadcast server Cpu busy percentage or graphics processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate more than given threshold, switch live video Coding mode.
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.The disclosure 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 (7)

1. a kind of live streaming code switching method characterized by comprising
Main broadcaster's client is during the live video after sending coding to direct broadcast server, monitoring central processor CPU benefit With rate or graphics processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate are more than given threshold, switch the volume of live video Code mode;It is empirical value when the given threshold is initial, is in an implementation adaptive dynamic value adjusted;
It is described in response to monitoring that the cpu busy percentage and the GPU utilization rate are more than given threshold, switch the volume of live video Code mode, comprising:
In response to monitoring that the cpu busy percentage is more than the first given threshold and the GPU utilization rate is more than the second given threshold,
If the coding mode of current live video is hard coded, present encoding mode is kept;
If the coding mode of current live video is soft coding, the coding mode of live video is switched to hard volume from soft coding Code;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
2. according to the method described in claim 1, it is characterized by:
It is described in response to monitoring the cpu busy percentage, switch the coding mode of live video, comprising:
In response to monitoring that the cpu busy percentage is more than the first given threshold, the coding mode of live video is cut from soft coding It is changed to hard coded;
It is described in response to monitor the GPU utilization rate be more than given threshold, switch the coding mode of live video, comprising:
In response to monitoring that the GPU utilization rate is more than the second given threshold, the coding mode of live video is cut from hard coded It is changed to soft coding;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
3. according to the method described in claim 2, it is characterized by:
The coding mode by live video is switched to hard coded from soft coding, comprising:
By the soft coding and after hard coded runs setting time parallel, then the coding mode of live video switched from soft coding For hard coded;Or,
The coding mode by live video is switched to soft coding from hard coded, comprising:
By the soft coding and after hard coded runs setting time parallel, then the coding mode of live video switched from hard coded For soft coding.
4. a kind of live streaming encodes switching device characterized by comprising
Monitoring modular, for main broadcaster's client during the live video after sending coding to direct broadcast server, in monitoring Central processor cpu busy percentage or graphics processor GPU utilization rate;
Hand-off process module, in response to the monitoring module monitors to the cpu busy percentage and/or the GPU utilization rate More than given threshold, switch the coding mode of live video;Be empirical value when the given threshold is initial, in an implementation for Adaptive dynamic value adjusted;
The hand-off process module includes:
Third switching submodule, for being more than the first given threshold in response to the monitoring module monitors to the cpu busy percentage It is more than the second given threshold with the GPU utilization rate, if the coding mode of current live video is hard coded, keeps current and compile Code mode;If the coding mode of current live video is soft coding, the coding mode of live video is switched to from soft coding Hard coded;Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
5. device according to claim 4, which is characterized in that the hand-off process module includes:
First switching submodule, for being more than the first given threshold in response to the monitoring module monitors to the cpu busy percentage, The coding mode of live video is switched to hard coded from soft coding;Or,
Second switching submodule, for being more than the second given threshold in response to the monitoring module monitors to the GPU utilization rate, The coding mode of live video is switched to soft coding from hard coded;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
6. device according to claim 5, it is characterised in that:
When the soft coding and hard coded are run setting by first switching submodule or the third switching submodule parallel Between after, then by the coding mode of live video from it is soft coding be switched to hard coded;Or,
Second switching submodule is by the soft coding and after hard coded runs setting time parallel, then by the volume of live video Code mode is switched to soft coding from hard coded.
7. a kind of live streaming terminal device characterized by comprising
Processor and memory for storage processor executable instruction;
Wherein, the processor is configured to:
During the live video after sending coding to direct broadcast server, central processor CPU utilization rate or figure are monitored Processor GPU utilization rate;
In response to monitoring that the cpu busy percentage and/or the GPU utilization rate are more than given threshold, switch the volume of live video Code mode;It is empirical value when the given threshold is initial, is in an implementation adaptive dynamic value adjusted;
It is described in response to monitoring that the cpu busy percentage and the GPU utilization rate are more than given threshold, switch the volume of live video Code mode, comprising:
In response to monitoring that the cpu busy percentage is more than the first given threshold and the GPU utilization rate is more than the second given threshold,
If the coding mode of current live video is hard coded, present encoding mode is kept;
If the coding mode of current live video is soft coding, the coding mode of live video is switched to hard volume from soft coding Code;
Wherein, the hard coded is to be encoded using GPU;Soft be encoded to is encoded using CPU.
CN201610835575.4A 2016-09-20 2016-09-20 Code switching method, device and equipment is broadcast live Active CN106454413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610835575.4A CN106454413B (en) 2016-09-20 2016-09-20 Code switching method, device and equipment is broadcast live

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610835575.4A CN106454413B (en) 2016-09-20 2016-09-20 Code switching method, device and equipment is broadcast live

Publications (2)

Publication Number Publication Date
CN106454413A CN106454413A (en) 2017-02-22
CN106454413B true CN106454413B (en) 2019-10-08

Family

ID=58166756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610835575.4A Active CN106454413B (en) 2016-09-20 2016-09-20 Code switching method, device and equipment is broadcast live

Country Status (1)

Country Link
CN (1) CN106454413B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936744B (en) * 2017-12-19 2020-08-18 腾讯科技(深圳)有限公司 Video coding processing method and device and application with video coding function
CN108040261B (en) * 2017-12-22 2020-06-30 广州酷狗计算机科技有限公司 Network live broadcast management method and device and storage medium
CN108156414B (en) * 2017-12-27 2020-10-02 惠州Tcl家电集团有限公司 WebRTC data encoding method, equipment and computer readable storage medium
CN108156475A (en) * 2017-12-29 2018-06-12 北京奇虎科技有限公司 The monitoring method and device of a kind of net cast
CN108966008B (en) * 2018-08-02 2020-08-11 腾讯科技(深圳)有限公司 Live video playback method and device
CN109640094B (en) * 2018-11-27 2021-06-15 Oppo广东移动通信有限公司 Video decoding method and device and electronic equipment
WO2020118601A1 (en) * 2018-12-13 2020-06-18 深圳市欢太科技有限公司 Method, apparatus, electronic device, and storage medium for video encoding
CN111447447B (en) * 2020-04-03 2022-07-15 北京世纪好未来教育科技有限公司 Live broadcast encoding method and device and electronic equipment
CN114157850A (en) * 2021-11-26 2022-03-08 珠海视熙科技有限公司 Data transmission method and device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289782A (en) * 2010-06-18 2011-12-21 索尼公司 Information processing apparatus, and method and program for controlling information processing apparatus
CN103207775A (en) * 2013-03-11 2013-07-17 中国科学技术大学苏州研究院 Processing method for adopting graphic processing unit (GPU) to accelerate real-time network flow application program
CN104866381A (en) * 2014-02-20 2015-08-26 联想(北京)有限公司 Information processing method and first electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289782A (en) * 2010-06-18 2011-12-21 索尼公司 Information processing apparatus, and method and program for controlling information processing apparatus
CN103207775A (en) * 2013-03-11 2013-07-17 中国科学技术大学苏州研究院 Processing method for adopting graphic processing unit (GPU) to accelerate real-time network flow application program
CN104866381A (en) * 2014-02-20 2015-08-26 联想(北京)有限公司 Information processing method and first electronic equipment

Also Published As

Publication number Publication date
CN106454413A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106454413B (en) Code switching method, device and equipment is broadcast live
CN111316598B (en) Multi-screen interaction method and equipment
EP3220651B1 (en) Live video broadcasting method and device
CN110890945B (en) Data transmission method, device, terminal and storage medium
CN106488335B (en) Live-broadcast control method and device
JP6143966B2 (en) Imaging control method, apparatus, program, and recording medium
CN105163366B (en) Wireless network connecting method and device
CN108966008B (en) Live video playback method and device
CN110650370B (en) Video coding parameter determination method and device, electronic equipment and storage medium
RU2656693C2 (en) Event prompting method and device
JP6195674B2 (en) Image quality adjustment method, apparatus, program, and recording medium based on network environment
CN107197320B (en) Video live broadcast method, device and system
RU2673560C1 (en) Method and system for displaying multimedia information, standardized server and direct broadcast terminal
CN106131615A (en) Video broadcasting method and device
CN110996117B (en) Video transcoding method and device, electronic equipment and storage medium
CN108769826A (en) Live media stream acquisition methods, device, terminal and storage medium
CN110121084A (en) The methods, devices and systems of port switching
CN109451341A (en) Video broadcasting method, video play device, electronic equipment and storage medium
CN113141541B (en) Code rate switching method, device, equipment and storage medium
CN109120929A (en) A kind of Video coding, coding/decoding method, device, electronic equipment and system
CN112911337A (en) Method and device for configuring video cover pictures of terminal equipment
CN109005455A (en) Video data handling procedure and device
CN109391824A (en) Xian Shang video group director method, device and terminal device
CN105959798B (en) The frame alignment method, apparatus and equipment of video flowing
KR102257250B1 (en) System information transmission method and device, system information receiving method and device, program

Legal Events

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