CN109819278A - The optimization method of live video - Google Patents

The optimization method of live video Download PDF

Info

Publication number
CN109819278A
CN109819278A CN201910008297.9A CN201910008297A CN109819278A CN 109819278 A CN109819278 A CN 109819278A CN 201910008297 A CN201910008297 A CN 201910008297A CN 109819278 A CN109819278 A CN 109819278A
Authority
CN
China
Prior art keywords
video
information
capture device
video capture
optimization method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910008297.9A
Other languages
Chinese (zh)
Other versions
CN109819278B (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.)
CHENGDU IDEAL TECHNOLOGY DEVELOPMENT CO.,LTD.
Original Assignee
Chengdu Suian Security 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 Chengdu Suian Security Network Technology Co Ltd filed Critical Chengdu Suian Security Network Technology Co Ltd
Priority to CN201910008297.9A priority Critical patent/CN109819278B/en
Publication of CN109819278A publication Critical patent/CN109819278A/en
Application granted granted Critical
Publication of CN109819278B publication Critical patent/CN109819278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of optimization methods of live video, applied to video playing server, the Play Server is connect with video capture device and video playback apparatus, and the optimization method includes: to judge whether to get the video playing request from video playback apparatus;In the case where getting video playing request, the first video information is obtained from video capture device;First video information is handled to obtain the first video file, cache the first video file and the first video file is transmitted to video playback apparatus;Judge whether the first video information finishes playing, and obtain the second video information from video capture device when the first video information finishes playing, wherein the second video information is and the consecutive video information of the first video information;Second video information is handled to obtain the second video file, cache the second video file and the second video file is transmitted to video playback apparatus.

Description

The optimization method of live video
Technical field
The present invention relates to network communication fields, more particularly to a kind of optimization method of live video.
Background technique
With the continuous development of the communication technology and continuous universal, skill of the net cast as popularity of intelligent terminal Art, while remote watching real-time video is carried out by mobile phone and also produces biggish demand in different field.Such as shop boss Oneself shop real scene video is seen by mobile phone, and parent remotely sees that child is in situation etc..Under normal circumstances, user is taken the photograph by installation As head, and according to the specification of equipment in mobile phone corresponding application software downloaded and installed, by registration, verifying and binding The operation of remote watching video can be carried out after the operation such as equipment by the application software.
With popularizing for the real-time phonetics application software such as wechat, user can be directly bound camera by softwares such as wechats And long-distance video is watched, the cumbersome degree of user is greatly reduced in this way, improves user experience, and in order to adapt to pacify simultaneously Tall and erect and two mainstream operation systems of apple, current real scene video/long-distance video all use HLS (HTTP Live Streaming) scheme.
In traditional HLS scheme, video capture device is uploaded to video for real time video image data are continual Play Server, video playing server are ready to transmission of video images to video playing terminal, such as intelligent terminal.So And in actual application, in non-high concurrent occasion, video image collected is only open to a small number of authorized users, such as Administrator, leader good friend etc., such user is shorter using the time, therefore real time data is used in traditional net cast scheme It sends and the technical solution of data buffer storage causes the waste of great network bandwidth, while video playing server is also to receiving Video data handled, therefore also create the waste of great server resource, improve the operation cost of enterprise, drop Low user experience.
Summary of the invention
In order to overcome net cast technical network bandwidth occupancy traditional in the prior art high, server resource wastes degree High technical problem, the embodiment of the present invention provide a kind of optimization method of live video, by being believed according to the actual request of user Breath obtains real-time video image information, thus greatly reduces the occupancy to network bandwidth, reduces server resource Consumption, effectively prevents the waste to server resource, reduces the operation cost of enterprise, improve user experience.
To achieve the goals above, the embodiment of the present invention provides a kind of optimization method of live video, broadcasts applied to video Server is put, the Play Server is connect with video capture device and video playback apparatus, and the optimization method includes: judgement Whether video playing request from the video playback apparatus is got;The case where getting video playing request Under, the first video information is obtained from the video capture device;First video information is handled to obtain the first view Frequency file caches first video file and first video file is transmitted to the video playback apparatus;Judge institute It states whether the first video information finishes playing, and is obtained when first video information finishes playing from the video capture device The second video information is taken, wherein second video information is and the consecutive video information of the first video information;To institute It states the second video information to be handled to obtain the second video file, caches second video file and by second video File is transmitted to the video playback apparatus.
Preferably, the video capture device includes multiple channels, is judging whether to get from the video playing Before the video playing request of equipment, the optimization method further include: obtain the identity information of the video capture device;It obtains The dedicated tunnel information that account information, encrypted message and the user of user setting specify from the multiple channel;Base Initial link information is generated in the identity information, the dedicated tunnel information, the account information and the encrypted message; The initial link information is encrypted to generate encrypted link information, the encrypted link information is sent to the video Playback equipment.
Preferably, it is described from the video capture device obtain the first video information before, the optimization method include: with The video capture device establishes connection;The login authentication information of the video capture device is obtained, and is recognized based on the login Demonstrate,prove information acquisition authentication result;If the authentication result is effective equipment, the first video is obtained from the video capture device Information.
Preferably, after establishing connection with the video capture device, the optimization method further include: pass through the video It acquires equipment and sends message information to the video playing server according to default sending cycle;The video capture device judgement The response message that the video playing server is fed back based on the message information whether is got, and obtains judging result;Institute It states video capture device and is based on the corresponding traffic operation of judging result execution.
Preferably, the video capture device is based on the judging result and executes corresponding traffic operation, comprising: if described Judging result is the response message for getting the Play Server and being fed back based on the message information, then continues to send the report Literary information;If the judging result is the response message that the Play Server has not been obtained and is fed back based on the message information, Whether the abnormal time that then response message has not been obtained in judgement reaches default abnormal time threshold value;If the abnormal time reaches To the default abnormal time threshold value, then disconnect the connection with the video playing server, and again with the video playing Server establishes connection, and send the message information re-establishing the subsequent supervention of connection.
Preferably, the login authentication information for obtaining the video capture device, and it is based on the login authentication information Obtain authentication result, comprising: the logon message that the video capture device uploads is obtained, wherein the logon message includes described The identity information and version information of video capture device;Judge whether the video capture device is to have based on the logon message Imitate equipment;If the video capture device is effective equipment, to the video capture device feedback acknowledgment information and generation has Imitate the authentication result of equipment;If the video capture device is invalid equipment, new body is configured for the video capture device Part information, is sent to the video capture device for the new identity information and generates the authentication result of invalid equipment.
Preferably, the optimization method further include: by the video capture device obtain in real time original video information and Original audio information;The original video information is based on by the video capture device and original audio information generates multiple letters Cease block;The multiple block of information is stored according to preset order and preset quantity by the video capture device;It is described from described Video capture device obtains the first video information, comprising: by the video capture device by the corresponding block of information of current time The video playing server is uploaded to as the first video information.
Preferably, described that original video information and original audio information are obtained by the video capture device in real time, packet It includes: obtaining the initial configuration parameters of the video capture device;User is obtained to operate the optimization of the initial configuration parameters, and Allocation optimum parameter after being optimized;Original video information and original audio letter are obtained in real time based on the allocation optimum parameter Breath.
Preferably, described that first video information is handled to obtain the first video file, comprising: described in caching Block of information, and first video file is generated based on the block of information.
Preferably, the optimization method further include: in the case where video playing request has not been obtained, judgement is not received Whether the waiting time requested to the video playing, which reaches, is preset the vacant time;If the waiting time reaches the default sky It sets the time, then deletes the video file of current cache.
The technical solution provided through the invention, the present invention at least have the following technical effect that
By the way that during actual net cast, video playing server is real according to the actual request acquisition of information of user When video image information, rather than in real time obtain video capture device acquisition video image information, thus greatly reduce To the occupancy of network bandwidth, while the consumption of server resource is reduced, effectively prevents the waste to server resource, greatly The operation cost for reducing enterprise greatly, improves user experience.
The other feature and advantage of the embodiment of the present invention will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is to further understand for providing to the embodiment of the present invention, and constitute part of specification, under The specific embodiment in face is used to explain the present invention embodiment together, but does not constitute the limitation to the embodiment of the present invention.Attached In figure:
Fig. 1 is the specific implementation flow chart of the optimization method of live video provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow chart provided in an embodiment of the present invention that net cast is carried out by smart phone;
Fig. 3 is the schematic diagram that video playing server provided in an embodiment of the present invention generates encrypted link information;
Fig. 4 is the schematic diagram that video playing server provided in an embodiment of the present invention obtains video information.
Specific embodiment
In order to overcome net cast technical network bandwidth occupancy traditional in the prior art high, server resource wastes degree High technical problem, the embodiment of the present invention provide a kind of optimization method of live video, by being believed according to the actual request of user Breath obtains real-time video image information, thus greatly reduces the occupancy to network bandwidth, reduces server resource Consumption, effectively prevents the waste to server resource, reduces the operation cost of enterprise, improve user experience.
It is described in detail below in conjunction with specific embodiment of the attached drawing to the embodiment of the present invention.It should be understood that this Locate described specific embodiment and be merely to illustrate and explain the present invention embodiment, is not intended to restrict the invention embodiment.
Term " system " and " network " in the embodiment of the present invention can be used interchangeably." multiple " refer to two or two with On, in consideration of it, " multiple " can also be interpreted as " at least two " in the embodiment of the present invention."and/or" describes affiliated partner Incidence relation indicates may exist three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, single Solely there are these three situations of B.In addition, character "/", unless otherwise specified, typicallying represent forward-backward correlation object is a kind of "or" Relationship.In addition, it is necessary to understand, in the description of the embodiment of the present invention, the vocabulary such as " first ", " second " are only used for distinguishing The purpose of description, is not understood to indicate or imply relative importance, can not be interpreted as indication or suggestion sequence.
Referring to Figure 1, the embodiment of the present invention provides a kind of optimization method of live video, is applied to video playing service Device, the Play Server are connect with video capture device and video playback apparatus, and the optimization method includes:
S10) judge whether to get the video playing request from the video playback apparatus;
S20) in the case where getting video playing request, the first video letter is obtained from the video capture device Breath;
S30) first video information is handled to obtain the first video file, caches first video file And first video file is transmitted to the video playback apparatus;
S40) judge whether first video information finishes playing, and when first video information finishes playing from The video capture device obtains the second video information, wherein second video information is to be connected with first video information Continuous video information;
S50) second video information is handled to obtain the second video file, caches second video file And second video file is transmitted to the video playback apparatus.
In order to avoid occupying excessive network bandwidth, video playing server is in the video playing that user's sending has not been obtained When request, the video image information of video capture device acquisition is not obtained, to save network bandwidth, therefore in order at any time can be right The net cast demand of user responds, and video playing server is monitored the net cast request behavior of user.
In a kind of possible embodiment, net cast is carried out using HLS scheme, video playing server first determines whether Whether get user to request by the video playing that video playback apparatus is sent, in the video playing request for getting user Afterwards, video playing server obtains the first video information, in embodiments of the present invention, first video from video capture device Information is media slicing file, it is preferable that the media slicing file is the data block that file suffixes is ts, then video playing Server handles to obtain the first video file, such as in embodiments of the present invention first video information, Mei Gesuo The ts data block of a length of 2s when media slicing file is is stated, video playing server gets the ts data block (example of preset quantity If preset quantity is 10, that is, get the ts data block that total duration is 20s) after all ts data blocks are stored, and root Corresponding m3u8 file is generated according to above-mentioned 10 ts data blocks.
In embodiments of the present invention, after generating corresponding m3u8 file, video playing server also records each ts number It is automatic according to the life span of block and m3u8 file, and after the life span that the storage time of ts data block reaches the ts data block The ts data block is deleted;M3u8 file when generating ts data block every time, such as video playing server is according to the view of user Frequency playing request reads corresponding m3u8 file, and according to the corresponding ts data block of the m3u8 file generated, at this time video playing Server automatically updates the expired time for the new record m3u8 file of laying equal stress on, when to reach its expired for the storage time of the m3u8 file When the time, then video playing server automatically deletes the m3u8 file.
The first video file is transmitted to video playback apparatus by video playing server at this time, such as the m3u8 of generation is literary Part is transmitted to the smart phone of user, and smart phone transfers corresponding ts data block according to the m3u8 file to obtain corresponding view Frequency image information simultaneously carries out net cast, and during live streaming, whether video playing server also monitors the first video file It finishes playing, if first video file finishes playing, the second video information is obtained from video capture device immediately, in this hair In bright embodiment, second video information be in time with the consecutive video information of the first video information, for example, with Consecutive ts data block, video playing server regard ts data block corresponding to first video information according to second in time Frequency information generates corresponding second video file, m3u8 file for example, corresponding with the second video information, then video playing The server buffer m3u8 file simultaneously forwards it to the smart phone of user to carry out continuous video playing.
Fig. 2 is referred to, in a kind of possible embodiment, user carries out video by the wechat platform on smart phone Live streaming, user pass through wechat platform first and get live streaming link information, then obtain current video pair according to the link information The m3u8 file answered extracts the ts data block list of current video according to the m3u8 file at this time, according to the list according to when Between sequencing obtain ts data block, and carry out video playing immediately after getting ts data block, playing previous ts number Continue to obtain next ts data block according to smart phone while block, to play immediately after playing first ts data block Second ts data block, after having read the ts data block in current m3u8 file, smart phone reads again video automatically and broadcasts The m3u8 file in server is put, after the m3u8 file in video playing server updates, after smart phone is according to the update M3u8 file ts data block is obtained from new data address, to carry out subsequent video playing.
Further, in embodiments of the present invention, if reading again the m3u8 in video playing server in smart phone During file, new m3u8 file is not present in video playing server, then video playing server is adopted from trend video Collect equipment and send video data request, video capture device is after getting video data request immediately again to video playing Server sends ts data block, and the m3u8 file of generation is sent to by video playing server immediately after getting ts data block Smart phone, to provide net cast in time for user;If video puts server and is sending video data to video capture device The response result of request is that equipment is not online or equipment is not present, then the feedback letter being not present to smart phone feedback played data Breath.
In embodiments of the present invention, video playback apparatus includes but is not limited to smart phone, tablet computer, PC etc. Intelligent terminal;Video capture device includes intelligent video acquisition equipment, intelligent audio acquisition equipment and main control chip.
In embodiments of the present invention, by improving to traditional HLS video scheme, video playing server is only being obtained In the case where the video playing request for getting user, the video image information of video capture device acquisition is just obtained, rather than it is real When obtain the video image information that acquires from video capture device, thus greatly reduce the occupancy to network bandwidth, especially The network bandwidth for greatly reducing non-concurrent occasion occupies, and reduces the waste to network bandwidth, while also greatly reducing view The invalidation behavior of frequency Play Server, greatly reduces the waste to server resource, reduces operation cost of enterprises, mention High user experience.
Fig. 3 is referred to, in embodiments of the present invention, the video capture device includes multiple channels, is judging whether to obtain Before getting the video playing request from the video playback apparatus, the optimization method further include: obtain the video and adopt Collect the identity information of equipment;Account information, encrypted message and the user of user setting are obtained from the multiple channel Specified dedicated tunnel information;Based on the identity information, the dedicated tunnel information, the account information and the password Information generates initial link information;The initial link information is encrypted to generate encrypted link information, by the encryption Link information is sent to the video playback apparatus.
In embodiments of the present invention, the video playing server includes management server and video transfer server.
In a kind of possible embodiment, before carrying out net cast by the intelligent terminal of user, need first Obtain the link information for carrying out net cast.User obtains the identity information of video capture device, example by intelligent terminal first Log in wechat platform as user passes through smart phone first, then by video capture device in wechat platform add interface into The addition operation of row equipment, during executing equipment addition operation, smart phone transfers the camera on smart phone automatically Scan video acquires the bar code in equipment to obtain the identity information of the video capture device, and then it is defeated to obtain user for smart phone The information such as the account, the password that enter, and by the identity information, account information and encrypted message and user from video capture device Multiple channels in specify dedicated tunnel information be sent to video playing server, video playing server is according to above- mentioned information Corresponding initial link information is generated, further, in order to guarantee the safety of link, therefore video playing server is also to this Preliminary link information is encrypted, and to generate encrypted link information, and the encrypted link information is sent to smart phone, intelligence Mobile phone stores the encrypted link information after receiving the encrypted link information, such as passes through wechat management of webpage platform Or wechat small routine management platform stores the encrypted link information, thus by the video capture device and the encrypted link Binding.
In embodiments of the present invention, pass through the account and close according to the identity information of video capture device and user's input Code information generates initial link information and avoids the video so that the account of the video capture device and user effectively be bound Acquisition equipment is stolen or mixes with the video capture device of other users, further, passes through video playing server pair Initial link information is encrypted to generate encrypted link information, to substantially increase the safety of net cast, is protected The privacy of user avoids the privacy information of user from being stolen or spied upon by other illegal users, substantially increases user experience.
In embodiments of the present invention, before first video information of acquisition from the video capture device, the optimization Method includes: to establish connection with the video capture device;The login authentication information of the video capture device is obtained, and is based on The login authentication information acquisition authentication result;If the authentication result is effective equipment, obtained from the video capture device Take the first video information.
In a kind of possible embodiment, before obtaining the video information that video capture device uploads, video playing Server needs establish connection with the video capture device first, in embodiments of the present invention, video capture device active and view Management server in frequency Play Server establishes connection, and passes through transmission control protocol (TCP, Transmission Control Protocol) communication mode keep prolonged connection, while video capture device and video playing server Between communication message pass through Advanced Encryption Standard (AES, Advanced Encryption Standard) encryption method carry out Encryption.After establishing connection with video capture device, video playing server obtains the login authentication letter of the video capture device Breath, and the video capture device is authenticated to obtain authentication result according to the login authentication information got, if the certification As a result being expressed as the video capture device is effective equipment, then obtains the first video information from the video capture device.
In embodiments of the present invention, recognized by log in video capture device during carrying out net cast Card, to guarantee that carrying out the content that net cast is shown is acquired by legitimate device, and the non-of illegality equipment is effectively prevented Method runs or avoids the incongruent situation of expectation for carrying out the content and user of net cast, to ensure that net cast Safety improves user experience.
In embodiments of the present invention, after establishing connection with the video capture device, the optimization method further include: logical It crosses the video capture device and sends message information to the video playing server according to default sending cycle;The video is adopted Collection equipment judges whether to get the response message that the video playing server is fed back based on the message information, and is sentenced Disconnected result;The video capture device is based on the judging result and executes corresponding traffic operation.
Further, in embodiments of the present invention, it is corresponding to be based on judging result execution for the video capture device Traffic operation, comprising: if the judging result is the response for getting the Play Server and being fed back based on the message information Information then continues to send the message information;If the judging result is that the Play Server has not been obtained to be based on the report Whether the response message of literary information feedback, the then abnormal time that the response message has not been obtained in judgement reach default abnormal time Threshold value;If the abnormal time reaches the default abnormal time threshold value, the connection with the video playing server is disconnected, And connection is established with the video playing server again, and send the message information re-establishing the subsequent supervention of connection.
After video playing server and video capture device establish connection, video capture device actively takes video playing Whether the communication of the communication link between business device and video capture device is normally carried out detection.In a kind of possible embodiment In, video capture device is sent according to default sending cycle (such as default sending cycle is 100ms) to video playing server Message information, video playing server feed back corresponding response message immediately after receiving the message information, and video acquisition is set It is standby to judge whether to get the response message of video playing server after issuing the message information, if video capture device determines Receive response message, it is determined that the communication of current communications link is normal, continues to send the message information;If video capture device The response message is not received, then lasting monitoring does not receive the abnormal time of the response message, and whether judges the abnormal time Reach default abnormal time threshold value (such as default abnormal time threshold value is 5s), if abnormal time reaches the default abnormal time threshold Value, it is determined that the communication of current communications link is abnormal, and video capture device actively disconnects the connection with video playing server, And connection is established with video playing server again, video capture device is again by login authentication information in video playing service After device is authenticated or registered, continue to send the message information to continue between video playing server and video capture device The communication of communication link whether be normally carried out detection.
In embodiments of the present invention, after video capture device and video playing server are established connection and authenticated successfully, By periodically sending heartbeat message to video playing server, to effectively have detected video capture device and video playing Whether the communication of the communication link between server is normal, ensure that being normally carried out for net cast, and in current communications link Communication it is abnormal when can find and take corresponding operation in time, greatly reduce communication link disconnection time, avoid The normal use of user is impacted, user experience is substantially increased.
In embodiments of the present invention, the login authentication information for obtaining the video capture device, and stepped on based on described It records authentication information and obtains authentication result, comprising: the logon message that the video capture device uploads is obtained, wherein the registration is reported Text includes the identity information and version information of the video capture device;Judge that the video acquisition is set based on the logon message Whether standby be effective equipment;If the video capture device is effective equipment, believe to the video capture device feedback acknowledgment Cease and generate the authentication result of effective equipment;If the video capture device is invalid equipment, for the video capture device New identity information is configured, the new identity information is sent to the video capture device and generates the certification of invalid equipment As a result.
In a kind of possible embodiment, video playing server carries out login authentication to video capture device, first The logon message that video capture device uploads is obtained, wherein the logon message includes the identity information of the video capture device The information such as (such as id information etc.) and version information, video playing server is after getting the logon message, automatically to this Logon message is verified, such as automatically extracts the identity information and version information in the logon message, and look into the database Corresponding information is ask, to judge whether it is effective information, if the message information is effective information, it is determined that the video capture device For effective equipment and generate the authentication result of effective equipment, while to video capture device feedback acknowledgment information;If the message is Invalid information, such as the identity information are invalid identity information, then video playing server is that video capture device configuration is new Identity information and generate the authentication result of invalid equipment, while the new identity information is sent to the video capture device.
After getting the new identity information log is written in the new identity information by video capture device, and this is new Identity information be written in the configuration file of the video capture device, then video capture device resets automatically so that this is new Identity information come into force, at this time video capture device again to video playing server initiate certification with complete video playing take The certification being engaged in device.
In embodiments of the present invention, the optimization method further include: obtained in real time by the video capture device original Video information and original audio information;The original video information and original audio information are based on by the video capture device Generate multiple block of informations;The multiple block of information is stored according to preset order and preset quantity by the video capture device; It is described to obtain the first video information from the video capture device, comprising: by the video capture device by current time pair The block of information answered is uploaded to the video playing server as the first video information.
Further, in embodiments of the present invention, described that original video letter is obtained by the video capture device in real time Breath and original audio information, comprising: obtain the initial configuration parameters of the video capture device;User is obtained initially to match to described Set the optimization operation of parameter, and the allocation optimum parameter after being optimized;It is obtained in real time based on the allocation optimum parameter original Video information and original audio information.
In a kind of possible embodiment, video capture device is got automatically first after completing opening initialization The initial configuration parameters of video capture device, video capture device further obtains user and is based on current application scene to this at this time The optimization of initial configuration parameters operates, such as user can be connect by the debugging tool that producer provides with video capture device, And the initial configuration parameters of video capture device are adjusted, such as the initial configuration parameters include white balance, brightness, comparison The parameters such as degree, time for exposure, to allocation optimum parameter after being optimized and be stored in the video capture device, video is adopted Collect equipment after determining that (such as automatically completing brightness, contrast adaptation) is stablized in booting, it is automatic to obtain current application field in real time Original video information and original audio information in scape, such as according to default video configuration parameter (such as default video configuration ginseng Number is video I frame period 2 seconds, frame per second 15fps) video H264 coding is carried out to generate H264 compressed data to original video data Packet, and according to preset audio configuration parameter (such as preset audio configuration parameter be length of a film 128ms) to original audio data into Row slice, and the data after slice are handled to generate corresponding AAC packet, it is generated at this time according to the H264 packet and AAC packet Corresponding block of information, such as generate corresponding ts data block, it is preferable that the time span of each ts data block is 2s or so, this When video capture device by multiple block of informations of generation according to default storage order (such as according to temporal sequencing) with And default storage quantity (such as default storage quantity is 5 ts data blocks) is stored, and has been expired together when in memory space When receiving new ts data block again, video capture device deletes the longest ts data block of storage time and to new ts number It is stored, is stored in video capture device in embodiments of the present invention according to block, after generating multiple ts data blocks, video acquisition Equipment also configures current time information in each ts data block.After video playing server gets video playing request, Video playing server requests video data to video capture device, and video capture device will acquire video data solicited message Time corresponding ts data block be sent to video playing server, refer to Fig. 4.
In embodiments of the present invention, by generating corresponding data block based on original video information and original audio information, And data block is stored according to preset storage mode, rather than all data blocks are all stored, thus protecting Card is stored on the basis of enough data blocks, additionally it is possible to be substantially reduced the demand to memory space, be greatly reduced enterprise Operation cost, not only ensure that optimal user experience, also improve the performance of enterprises.
In embodiments of the present invention, described first video information to be handled to obtain the first video file, packet It includes: caching the block of information, and first video file is generated based on the block of information.
In a kind of possible embodiment, first video information is ts data block, and video playing server is obtaining After getting ts data block, which is cached, and after having received all ts data blocks, to all ts numbers of caching It is handled according to block to generate corresponding first video file, in embodiments of the present invention, first video file is m3u8 File.
Further, in embodiments of the present invention, the optimization method further include: asked the video playing has not been obtained In the case where asking, whether the waiting time that judgement does not receive the video playing request, which reaches, is preset the vacant time;If described etc. Reach described to the time and preset the vacant time, then deletes the video file of current cache.
In a kind of possible embodiment, user is after having checked the net cast after a period of time, by smart phone Changing interface to other interfaces, i.e. the interface of net cast at this time switchs to running background, and smart phone stops to video at this time Play Server sends video playing request.Video playing server monitoring is sent by video playback apparatus to having not been obtained at this time Video playing request, therefore the waiting time for not receiving video playing request is monitored, is reached when waiting time To after presetting the vacant time (such as preset vacant time be 30s), it is determined that active user's not no demand of net cast, Therefore the video file cached in current server is deleted.
Further, in embodiments of the present invention, it also stores in video capture device and is got in video playing server Video playing request time, determine waiting time reach preset the vacant time in the case where, video capture device stop Ts data block is uploaded to video playing server.
In embodiments of the present invention, it is monitored in real time by the net cast watching behavior to user, thus when using Family does not need to carry out net cast or the not biography that can be found in time when needing and stop carrying out related data of net cast Defeated and processing reduces the data processing amount of video playing server, reduction pair to further decrease the occupancy to network bandwidth The waste of server resource reduces the operation cost of enterprise, substantially increases user experience.
The optional embodiment of the embodiment of the present invention is described in detail in conjunction with attached drawing above, still, the embodiment of the present invention is simultaneously The detail being not limited in above embodiment can be to of the invention real in the range of the technology design of the embodiment of the present invention The technical solution for applying example carries out a variety of simple variants, these simple variants belong to the protection scope of the embodiment of the present invention.
It is further to note that specific technical features described in the above specific embodiments, in not lance In the case where shield, it can be combined in any appropriate way.In order to avoid unnecessary repetition, the embodiment of the present invention pair No further explanation will be given for various combinations of possible ways.
It will be appreciated by those skilled in the art that implementing the method for the above embodiments is that can pass through Program is completed to instruct relevant hardware, which is stored in a storage medium, including some instructions are used so that single Piece machine, chip or processor (processor) execute all or part of the steps of each embodiment the method for the application.And it is preceding The storage medium stated includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), magnetic or disk.
In addition, any combination can also be carried out between a variety of different embodiments of the embodiment of the present invention, as long as it is not The thought of the embodiment of the present invention is violated, equally should be considered as disclosure of that of the embodiment of the present invention.

Claims (10)

1. a kind of optimization method of live video, is applied to video playing server, the Play Server is set with video acquisition It is standby to be connected with video playback apparatus, which is characterized in that the optimization method includes:
Judge whether to get the video playing request from the video playback apparatus;
In the case where getting video playing request, the first video information is obtained from the video capture device;
First video information is handled to obtain the first video file, caching first video file simultaneously will be described First video file is transmitted to the video playback apparatus;
Judge whether first video information finishes playing, and when first video information finishes playing from the video It acquires equipment and obtains the second video information, wherein second video information is and the consecutive video of the first video information Information;
Second video information is handled to obtain the second video file, caching second video file simultaneously will be described Second video file is transmitted to the video playback apparatus.
2. optimization method according to claim 1, which is characterized in that the video capture device includes multiple channels, Before judging whether to get the video playing request from the video playback apparatus, the optimization method further include:
Obtain the identity information of the video capture device;
Obtain the dedicated tunnel that account information, encrypted message and the user of user setting specify from the multiple channel Information;
Initial chain is generated based on the identity information, the dedicated tunnel information, the account information and the encrypted message Connect information;
The initial link information is encrypted to generate encrypted link information, the encrypted link information is sent to described Video playback apparatus.
3. optimization method according to claim 1, which is characterized in that described to obtain the first view from the video capture device Before frequency information, the optimization method includes:
Connection is established with the video capture device;
The login authentication information of the video capture device is obtained, and is based on the login authentication information acquisition authentication result;
If the authentication result is effective equipment, the first video information is obtained from the video capture device.
4. optimization method according to claim 3, which is characterized in that after establishing connection with the video capture device, The optimization method further include:
Message information is sent to the video playing server according to default sending cycle by the video capture device;
The video capture device judges whether that get the video playing server is answered based on what the message information was fed back Information is answered, and obtains judging result;
The video capture device is based on the judging result and executes corresponding traffic operation.
5. optimization method according to claim 4, which is characterized in that the video capture device is based on the judging result Execute corresponding traffic operation, comprising:
If the judging result is the response message for getting the Play Server and being fed back based on the message information, continue Send the message information;
If the judging result is the response message that the Play Server has not been obtained and is fed back based on the message information, sentence Whether the disconnected abnormal time that the response message has not been obtained reaches default abnormal time threshold value;
If the abnormal time reaches the default abnormal time threshold value, the connection with the video playing server is disconnected, And connection is established with the video playing server again, and send the message information re-establishing the subsequent supervention of connection.
6. optimization method according to claim 3, which is characterized in that the login for obtaining the video capture device is recognized Information is demonstrate,proved, and is based on the login authentication information acquisition authentication result, comprising:
The logon message that the video capture device uploads is obtained, wherein the logon message includes the video capture device Identity information and version information;
Judge whether the video capture device is effective equipment based on the logon message;
If the video capture device is effective equipment, to the video capture device feedback acknowledgment information and generation is effectively set Standby authentication result;
If the video capture device is invalid equipment, new identity information is configured for the video capture device, it will be described New identity information is sent to the video capture device and generates the authentication result of invalid equipment.
7. optimization method according to claim 1, which is characterized in that the optimization method further include:
Original video information and original audio information are obtained in real time by the video capture device;
The original video information is based on by the video capture device and original audio information generates multiple block of informations;
The multiple block of information is stored according to preset order and preset quantity by the video capture device;
It is described to obtain the first video information from the video capture device, comprising:
The video is uploaded to using the corresponding block of information of current time as the first video information by the video capture device Play Server.
8. optimization method according to claim 7, which is characterized in that described to be obtained in real time by the video capture device Original video information and original audio information, comprising:
Obtain the initial configuration parameters of the video capture device;
It obtains user to operate the optimization of the initial configuration parameters, and the allocation optimum parameter after being optimized;
Original video information and original audio information are obtained in real time based on the allocation optimum parameter.
9. optimization method according to claim 7, which is characterized in that it is described to first video information handled with Obtain the first video file, comprising:
The block of information is cached, and first video file is generated based on the block of information.
10. optimization method described in any claim in -7 according to claim 1, which is characterized in that the optimization method is also Include:
In the case where video playing request has not been obtained, the waiting time that judgement does not receive the video playing request is It is no reach preset the vacant time;
If the waiting time, which reaches described, presets the vacant time, the video file of current cache is deleted.
CN201910008297.9A 2019-01-04 2019-01-04 Optimization method of live video Active CN109819278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008297.9A CN109819278B (en) 2019-01-04 2019-01-04 Optimization method of live video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008297.9A CN109819278B (en) 2019-01-04 2019-01-04 Optimization method of live video

Publications (2)

Publication Number Publication Date
CN109819278A true CN109819278A (en) 2019-05-28
CN109819278B CN109819278B (en) 2021-11-23

Family

ID=66604023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008297.9A Active CN109819278B (en) 2019-01-04 2019-01-04 Optimization method of live video

Country Status (1)

Country Link
CN (1) CN109819278B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891044A (en) * 2021-09-29 2022-01-04 天翼物联科技有限公司 Video live broadcast method and device, computer equipment and computer readable storage medium
CN115243059A (en) * 2022-05-31 2022-10-25 广州播丫科技有限公司 Direct broadcast machine for realizing slow direct broadcast through monitoring camera and working method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110013017A1 (en) * 2009-07-16 2011-01-20 Samsung Techwin Co., Ltd. Monitoring camera, method of controlling the same, and recording medium storing program for executing the method
CN105657440A (en) * 2016-01-05 2016-06-08 福建星网智慧科技股份有限公司 Video broadcast method and system
CN105991414A (en) * 2015-02-15 2016-10-05 深圳市棱镜锐视科技有限公司 Method and system for video surveillance live broadcasting through intelligent terminal
CN107911706A (en) * 2017-12-18 2018-04-13 青岛国信发展(集团)有限责任公司 The audio/video player system and method for multi-brand compatibility
CN108259975A (en) * 2018-02-01 2018-07-06 广州市百果园信息技术有限公司 Video broadcasting method, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110013017A1 (en) * 2009-07-16 2011-01-20 Samsung Techwin Co., Ltd. Monitoring camera, method of controlling the same, and recording medium storing program for executing the method
CN105991414A (en) * 2015-02-15 2016-10-05 深圳市棱镜锐视科技有限公司 Method and system for video surveillance live broadcasting through intelligent terminal
CN105657440A (en) * 2016-01-05 2016-06-08 福建星网智慧科技股份有限公司 Video broadcast method and system
CN107911706A (en) * 2017-12-18 2018-04-13 青岛国信发展(集团)有限责任公司 The audio/video player system and method for multi-brand compatibility
CN108259975A (en) * 2018-02-01 2018-07-06 广州市百果园信息技术有限公司 Video broadcasting method, storage medium and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113891044A (en) * 2021-09-29 2022-01-04 天翼物联科技有限公司 Video live broadcast method and device, computer equipment and computer readable storage medium
CN113891044B (en) * 2021-09-29 2023-03-24 天翼物联科技有限公司 Video live broadcast method and device, computer equipment and computer readable storage medium
CN115243059A (en) * 2022-05-31 2022-10-25 广州播丫科技有限公司 Direct broadcast machine for realizing slow direct broadcast through monitoring camera and working method thereof

Also Published As

Publication number Publication date
CN109819278B (en) 2021-11-23

Similar Documents

Publication Publication Date Title
EP3780523B1 (en) Network traffic identification method and related device
CN110213522B (en) Video data processing method and device and related equipment
CN102571726B (en) Method, system and the state judgment server that multi-medium data is shared
CN103414881B (en) A kind of Active Eyes quickly configuration method
CN108513154A (en) Intelligent home furnishing control method, smart television based on smart television and storage medium
CN101860716B (en) Wireless video conference terminal reaccess system and method
JP2009521837A5 (en)
KR20140118014A (en) Method for authenticating client
CN106851427A (en) A kind of transfer control method and device of live video of playing
CN108881931B (en) Data buffering method and network equipment
CN111526428B (en) Method, system and medium for realizing HTML5 video playing in cloud desktop
CN106412498B (en) monitoring data acquisition method and cloud terminal
CN110944217A (en) Live broadcast information processing method and device, server and storage medium
CN101715112A (en) Video monitoring system and method
CN107770773A (en) A kind of monitor video management method and system, terminal and server
CN109819278A (en) The optimization method of live video
CN108924485A (en) Client live video stream interruption processing method and system, monitoring system
CN109936847A (en) Shared method for network access, system and its equipment
CN114928758A (en) Live broadcast abnormity detection processing method and device
CN109525862A (en) A kind of multiple terminals live streaming exchange method and system
CN115883962A (en) Camera control method, system, electronic equipment and storage medium
CN103533443B (en) The method that monitor video is the most live
CN104065913A (en) Instant messaging client
CN113613029B (en) Live broadcast picture display method and device, storage medium and electronic equipment
CN108076381B (en) Video display method, video forwarding equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211221

Address after: 611732 No. 2, pengwen Road, China Sichuan cuisine Industrial Park, Pidu, Chengdu, Sichuan

Patentee after: CHENGDU IDEAL TECHNOLOGY DEVELOPMENT CO.,LTD.

Address before: 611730 room 401-506, unit 1, building 1, Hongji Yaju, No. 131, Chuangye commune, Jingrong Town, Pidu District, Chengdu, Sichuan

Patentee before: CHENGDU SUIANBAO NETWORK TECHNOLOGY CO.,LTD.