CN110248199B - System and method for intelligently adjusting real-time live broadcast code rate of IP camera - Google Patents
System and method for intelligently adjusting real-time live broadcast code rate of IP camera Download PDFInfo
- Publication number
- CN110248199B CN110248199B CN201910485331.1A CN201910485331A CN110248199B CN 110248199 B CN110248199 B CN 110248199B CN 201910485331 A CN201910485331 A CN 201910485331A CN 110248199 B CN110248199 B CN 110248199B
- Authority
- CN
- China
- Prior art keywords
- video data
- data
- cutting
- audio
- data stream
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2408—Monitoring of the upstream path of the transmission network, e.g. client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
Abstract
The embodiment of the invention discloses a system and a method for intelligently adjusting real-time live broadcast code rate of an IP camera, wherein the method comprises the following steps: transmitting original audio data and video data acquired by an IP camera to intelligent terminal equipment, and capturing the uplink network speed of the intelligent terminal equipment; setting clipping limit points synchronous with an uplink network speed time node at the upper and lower positions of the initial end of the original video data; adding a data cropping blank layer on a cropping limit point of original video data; asynchronously classifying and coding the original video data and the original audio data after the data cutting blank layer is cut, monitoring the maximum size of the transmittable data of the audio data stream and the target video data stream after the compressed and coded data is real-time, and adjusting the cutting depth of the data cutting blank layer; and synchronously pushing the audio data stream and the target video data stream to a live broadcast server. According to the scheme, the uplink network speed is monitored in real time, the data uploading code rate is automatically adjusted, the link of the live broadcast end is kept continuous, and the watching experience is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of live broadcast of IP cameras, in particular to a system and a method for intelligently adjusting real-time live broadcast code rate of an IP camera.
Background
The IP camera (network camera) is a new generation product combining the traditional camera and the network video technology, and besides the function of capturing images of the traditional camera, the IP camera also has a built-in digital compression controller and a WEB-based operating system, so that video data is compressed and encrypted and then is sent to a terminal user through a local area network, the Internet or a wireless network. The remote user can use a standard web browser on the PC to access the web camera according to the IP address of the web camera, monitor the condition of the target site in real time, edit and store image data in real time, and control the pan-tilt and the lens of the camera to monitor in all directions.
In recent years, live broadcast technology is rapidly advanced, mobile live broadcast by using an IP camera is changed into national live broadcast, the live broadcast can be carried out at any time and any place without limitation, and the live broadcast can be completed by only one mobile phone. However, this does not cover all the requirements, for example, many cameras have IP functions themselves, but do not have streaming functions, that is, they have network functions but cannot live broadcast the content acquired by the camera, so when moving and broadcasting directly, the IP camera is generally connected with other mobile terminals such as a mobile phone, and the acquired audio and video data is compressed and encoded by software of the mobile terminal, and the streaming is distributed to the live broadcast terminal for viewing.
However, as the stream pushing of the audio and video data is implemented only by depending on the uplink network of the mobile terminal, when the network condition becomes poor, if the code rate of the audio and video data is not adjusted, the situation of audio and video blocking is caused, and the watching experience is seriously influenced.
Disclosure of Invention
Therefore, the embodiment of the invention provides a system and a method for intelligently adjusting real-time live broadcast code rate of an IP camera, which adopt a mode of monitoring network conditions, particularly an uplink network in real time, can automatically reduce the code rate when the network conditions become poor, reduce the data volume of data uploading, keep the link of a live broadcast end continuous, automatically improve the code rate when the network becomes good, and improve the viewing experience, so as to solve the problem that the viewing experience is seriously influenced by the condition of audio and video blocking caused by not changing the uploading code rate in the prior art.
In order to achieve the above object, an embodiment of the present invention provides the following: a method for intelligently adjusting real-time live broadcast code rate of an IP camera comprises the following steps:
step 100, transmitting original audio data and original video data acquired by an IP camera to intelligent terminal equipment in real time, and capturing the uplink network speed of the intelligent terminal equipment in real time;
200, setting clipping limit points synchronous with an uplink network speed time node at the upper and lower positions of the initial end of original video data;
step 300, according to the dynamic data of the uplink network speed, correspondingly converting the dynamic data of the uplink network speed into the size of the maximum transmittable audio and video data file at the moment, and adding a data cutting blank layer for cutting a video picture on a cutting limit point of original video data;
step 400, adjusting the cutting depth of the data cutting blank layer in real time according to the uplink network speed, and cutting original video data; asynchronously classifying, encoding, packaging and packaging the original video data and the original audio data after the blank layer is cut, so as to form a target video data stream and an audio data stream, monitoring the size of the maximum data which can be transmitted after the audio data stream subjected to compression encoding and the target video data stream are added in real time, and ensuring that the size of the maximum data is slightly smaller than the size of the maximum transmittable audio and video data file all the time;
and 500, synchronously pushing the audio data stream and the target video data stream to a live broadcast server, and transcoding and watching the audio data stream and the target video data stream.
As a preferred embodiment of the present invention, in step 100, the uplink network speed of the intelligent terminal device is counted in real time, and a network speed dynamic graph of the network speed may be generated, where an abscissa of the network speed dynamic graph is time, a unit of the time is second, and an ordinate of the network speed dynamic graph is kilobytes for transmitting the constituent data codes.
As a preferred embodiment of the present invention, in step 200, the position of the clipping limit point is variable, so the specific step of setting the clipping limit point is:
step 201, capturing the face position in each frame of image in real time;
step 202, setting the position 1cm-2cm above the top of the head of the human face as an upper limit clipping limit point of the audio-video data stream;
step 203, marking the upper limit cutting limit point of the audio-video data stream by taking each second as a time point;
step 204, setting the position 10cm-20cm below the top of the head of the face as a lower limit clipping limit point of the audio-video data stream;
and step 205, marking the lower limit clipping limit point of the audio-video data stream by taking each second as a time point.
As a preferred scheme of the present invention, in step 400, the step of adjusting the cutting depth of the data trimming blank layer in real time specifically includes:
step 401, converting the uplink network speed into the maximum transmission data byte value transmitted per second;
step 402, calculating the maximum data size which can be transmitted by the audio data stream and the target video data stream after compression coding according to the maximum transmission data byte value;
step 403, adjusting the row height of the data cropping blank layer, calculating the size of the data after the compressed coding of the video file per second after the cropping in real time, and determining the cutting depth of the data cropping blank layer on the video data.
As a preferred embodiment of the present invention, when video data is cut, the lower limit clipping limit point is cut first, and then the upper limit clipping limit point is cut.
As a preferred embodiment of the present invention, in step 403, the real-time calculation of the size of the video data in each second range specifically includes cutting the lower segment of the video data first, and then cutting the upper segment of the video data, where the lower segment cutting specifically includes: firstly, taking the upper left corner of each frame of image as a starting point, and moving downwards along the left edge, the upper edge and the right edge of each frame of image; then selecting a plurality of test points at the lower right corner of each frame of image; and finally, sequentially counting the file size in the image range corresponding to each test point, and taking the test point corresponding to the maximum video data size as a lower cutting point.
As a preferred scheme of the invention, the upper section cutting comprises the following specific steps: firstly, taking the lower right corner of the image after the lower end of each frame of image is cut as a starting point, and moving downwards along the right edge, the lower edge and the left edge of each frame of image; then selecting a plurality of test points at the upper left corner of each frame of image; and finally, sequentially counting the size of the file in the image range corresponding to each test point, taking the test point corresponding to the maximum video data size as an upper cutting point, and representing the maximum video data size by the space occupied by the final image sizes after the upper and lower cutting.
The invention also provides a system for intelligently adjusting the real-time live broadcast code rate of the IP camera, which is characterized by comprising intelligent terminal equipment for receiving the video data of the IP camera and a data transmission unit for pushing the original video data to a live broadcast end; an uplink network monitoring unit, a transmission data conversion unit, a video data cutting unit and a transmission data calculation unit are arranged in the intelligent terminal equipment;
the uplink network monitoring unit captures the uplink network speed of the intelligent terminal equipment in real time;
the transmission data conversion unit is used for calculating the size of the maximum transmittable audio and video data file according to the real-time uplink network speed; the video data cropping unit is used for setting cropping limit points at the upper and lower positions of the initial end of the original video data and adding a data cropping blank layer for cropping a video picture on the cropping limit points; cutting the original video data by cutting the cutting depth of the real-time adjustment data cutting blank layer according to the uplink network speed;
the data transmission computing unit is used for asynchronously classifying, encoding, packaging and packaging the cut original video data and the original audio data to form an audio data stream and a target video data stream, and computing the maximum size of the audio data stream and the target video data stream which are subjected to compression encoding, so as to ensure that the size of the audio data stream and the target video data stream is slightly smaller than the size of the maximum transmittable audio and video data file;
the video data cropping unit may crop a lower portion and an upper portion of the video data; and the upper portion of the video data is first cut and then the lower portion of the video data is cut.
The embodiment of the invention has the following advantages:
(1) by monitoring the uplink network speed in real time, the invention can automatically reduce the code rate when the network condition becomes worse, reduce the data volume of data uploading, keep the link of the live broadcast end continuous, automatically improve the code rate when the network becomes better and improve the viewing experience;
(2) according to the method and the device, the file cutting of the video data is controlled according to the real-time network speed, and the size of the video data file is reduced or increased, so that the code rate of video data transmission is regulated and controlled, the integrity of the video file is experienced as much as possible under the condition that the live broadcast end is not blocked in watching, and the live broadcast watching experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the effects and the achievable by the present invention, should still fall within the range that the technical contents disclosed in the present invention can cover.
Fig. 1 is a schematic flow chart of a live broadcast method according to an embodiment of the present invention;
fig. 2 is a block diagram of a live broadcast system according to an embodiment of the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, the present invention provides a method for intelligently adjusting a real-time live broadcast code rate of an IP camera, in this embodiment, the IP camera is used to collect audio and video data, and since the IP camera itself does not have a function of pushing the audio and video data, the audio and video data of the IP camera needs to be collected in an intelligent device such as an intelligent collection or pad, and then pushed to a live broadcast system by the intelligent device for live broadcast.
When the intelligent device is used for pushing stream of audio and video data, the uplink network speed of the device needs to be considered, when the network condition is poor, if the code rate of the audio and video data is not adjusted, the situation of audio and video blockage is caused, and the watching experience is seriously influenced.
The method specifically comprises the following steps:
and step 100, transmitting the original audio data and the original video data collected by the IP camera to the intelligent terminal equipment in real time, and capturing the uplink network speed of the intelligent terminal equipment in real time.
When the uplink network speed of the intelligent terminal equipment is counted in real time, a network speed dynamic graph of the network speed is generated, the abscissa of the network speed dynamic graph is time, the time unit is second, and the ordinate is kilobytes for transmitting and forming data codes.
In this step, the uplink network speed is the speed of sending data, which refers to the speed of uploading data from the intelligent terminal device, and is the data transmission rate when the mobile terminal sends information to the base station, the uplink network speed is generally b/s, Kb/s or Mb/s, and since the minimum measurement unit for the file in the computer is Byte, the network speed unit in the embodiment can be specifically converted into Kb/s, which facilitates the calculation of the corresponding relationship between the file and the intelligent terminal device.
Therefore, if the uplink network speed at this time is detected to be 2Mb/s, the network speed is further converted to obtain 2Mb/s of 2048Kb/s of 256Kb/s, which means that the maximum transmission file size in the environment of the uplink network speed of 2M/s is 256 Kb.
In addition, it should be noted that the basic framework from the audio and video acquisition and encapsulation to the live streaming is really invariable, and the fixed flow is as follows: the method comprises the steps of acquisition, compression coding, packaging, stream pushing, distribution and viewing by a streaming media protocol, so that the maximum transmission file size provided by the embodiment is the size of the compressed and coded audio and video, generally speaking, the size of the compressed file is far smaller than that of a source audio and video file, and therefore when the size of the video file is adjusted, the corresponding relation between the audio and video file and the size of the compressed and coded file needs to be calculated.
And 200, setting clipping limit points synchronous with the speed time node of the uplink network at the upper and lower positions of the initial end of the original video data.
Because the occupied space of the audio data in each second is very small, the embodiment firstly cuts the video data, and then classifies, encapsulates and packs the cut video data and the audio data, so that the audio data can be prevented from being damaged during cutting, and when the video data is cut, the size of the audio and video data stream after encapsulation and compression is ensured to be slightly smaller than the speed of the uplink network, namely the size of the video data in each second after compression plus the size of the video data in each second is slightly equal to the size of the data allowed to be transmitted by the speed of the uplink network.
The position of the cutting limit point is variable, so the specific steps for setting the cutting limit point are as follows:
step 201, capturing the face position in each frame of image in real time;
step 202, setting the position 1cm-2cm above the top of the head of the human face as an upper limit clipping limit point of the audio-video data stream;
step 203, marking the upper limit cutting limit point of the audio-video data stream by taking each second as a time point;
step 204, setting the position 10cm-20cm below the top of the head of the face as a lower limit clipping limit point of the audio-video data stream;
and step 205, marking the lower limit clipping limit point of the audio-video data stream by taking each second as a time point.
As one of the feature points of the present embodiment, when a video file is cut, the present embodiment sets a cut limit point in the video file, which can facilitate the cutting process in the later stage and ensure the integrity of the picture.
The video rate is the number of data bits transmitted per unit time during data transmission, and generally, the unit used is KBps, i.e., kilobytes per second. The popular understanding is that the sampling rate is higher, the higher the sampling rate in unit time is, the higher the precision is, and the closer the processed file is to the original file. The basic algorithm of the code rate is as follows: the bit rate is the file size/time, wherein the unit of the file size is KB, the unit of the time is s, and when the data stream is pushed, the bit rate is generally slightly smaller than the uplink speed, so as to ensure that the playing of the live broadcast end does not cause a pause.
The specific implementation mode of changing the transmission code rate in real time by cutting the video file up and down is as follows:
cutting the lower limit cutting limit point, wherein the cutting position is lower than or equal to the lower limit cutting limit point;
cutting the upper limit cutting limit point, wherein the cutting position is higher than or equal to the upper limit cutting limit point;
and finally, packaging and transmitting the cut video file, and ensuring that the packaged code rate is slightly smaller than the uplink network speed.
Therefore, by the mode of cutting the size of the video data in real time, the size of the video data is changed in real time according to the speed of the uplink network, the data transmission size is adaptive to the size of a transmission file allowed by the uplink network, and the condition that live broadcast is blocked due to overlarge audio and video data can be effectively avoided.
Step 300, according to the dynamic data of the uplink network speed, correspondingly converting the dynamic data of the uplink network speed into the size of the maximum transmittable audio and video data file at the moment, and adding a data cutting blank layer for cutting a video picture on a cutting limit point of original video data;
in this embodiment, the data cropping blank layer does not occupy memory, and therefore the file size of the original video data can be reduced.
Step 400, adjusting the cutting depth of the data cutting blank layer in real time according to the uplink network speed, and cutting original video data; and asynchronously classifying, encoding, packaging and packaging the original video data and the original audio data after the data cutting blank layer is cut to form a target video data stream and an audio data stream, monitoring the size of the maximum data which can be transmitted after the audio data stream subjected to compression encoding and the target video data stream are added in real time, and ensuring that the size of the maximum data is slightly smaller than the size of the maximum transmittable audio and video data file all the time.
As a second characteristic point of this embodiment, when the network speed is relatively poor, the code rate is adjusted, the data amount uploaded by the data is reduced, and the effect of keeping the link of the live broadcast end continuous is achieved.
Therefore, the specific operation of adjusting the size of the video data in real time in the embodiment is to cut the original video data in real time in winter through the data cutting blank layer.
The step of adjusting the cutting depth of the data cutting blank layer in real time specifically comprises the following steps:
step 401, converting the uplink network speed into a maximum transmission data byte value transmitted per second, in this embodiment, kilobytes may be a unit of maximum transmission data.
Step 402, according to the maximum transmission data byte value, calculating the maximum data size which can be transmitted by the audio data stream and the target video data stream after compression coding, wherein the maximum data size in each second range is an uplink network speed time node, and then converting the maximum data size into kilobytes.
Step 403, adjusting the row height of the data cropping blank layer, calculating the size of the data after the compressed coding of the video file per second after the cropping in real time, and determining the cutting depth of the data cropping blank layer on the video data.
As a third characteristic point of the present embodiment, the present embodiment implements monitoring of the size of the video file after each test point is cut, compressed and encoded by setting a plurality of test points, so as to improve the integrity of the picture while ensuring normal data transmission.
The step of calculating the size of the data after the compression coding of the cut video file per second in real time specifically comprises the following steps: cutting the lower section of the video data first, and then cutting the upper section of the video data; the specific steps of lower section cutting are as follows: firstly, taking the upper left corner of each frame of image as a starting point, and respectively moving the upper edge and the left edge of each frame of image to the right and downwards; then selecting a plurality of test points in the lower right corner area of each frame of image, and obtaining a closed image formed by connecting a starting point, a left edge downward shift point, the test points and an upper edge right shift point in sequence; and finally, sequentially counting the file size of each test point in the closed image range corresponding to the test point, and taking the test point corresponding to the maximum video data size as a lower cutting point.
When the lower section is cut, the upper left corner of each frame of image is a starting point, a plurality of lower test points are tried on the lower section of the image, the size of the circled image is close to the maximum video data size after compression coding, and then the test point is specifically the position of the lower cutting point.
The upper section cutting method comprises the following specific steps: firstly, taking the lower right corner of the image after the lower end of each frame of image is cut as a starting point, and respectively moving the lower edge of each frame of image leftwards and moving the right edge upwards; then selecting a plurality of test points in the upper left corner area of each frame of image, and obtaining a closed image formed by sequentially connecting a starting point, a right edge upward shift point, the test points and a lower edge leftward shift point; and finally, sequentially counting the file size of each test point in the image range corresponding to the test point, taking the test point corresponding to the maximum video data size as an upper cutting point, and representing the maximum video data size by the space occupied by the final image sizes after the upper and lower cutting.
In the embodiment, the lower segment of the image is cut first, and then the upper segment of the image is cut, so that when the upper segment of the image is cut, the image after the lower segment is cut is taken as a cutting basis, the lower right corner of the image is taken as a starting point, a plurality of lower test points are tried on the upper segment of the image, the size of the circled image is close to the size of the maximum video data after compression coding, and the test point is specifically the position of the upper cut point at this moment.
According to the embodiment, the positions of the upper cutting point and the lower cutting point are adjusted in real time, the size of the data cutting blank layer is changed, and the cutting depth of the data cutting blank layer is controlled, so that the size of a transmitted file can be changed in real time, and the method is suitable for normal live broadcast effects at different network speeds.
And 500, synchronously pushing the audio data stream and the target video data stream to a live broadcast server, and transcoding and watching the audio data stream and the target video data stream.
Example 2
As shown in fig. 2, according to the live broadcasting method, the present invention further provides a system for intelligently adjusting a live broadcasting bit rate of an IP camera, including an intelligent terminal device for receiving video data of the IP camera, and a data transmission unit for streaming original video data to a live broadcasting end; an uplink network monitoring unit, a transmission data conversion unit, a video data cutting unit and a transmission data calculation unit are arranged in the intelligent terminal equipment;
the uplink network monitoring unit captures the uplink network speed of the intelligent terminal equipment in real time;
the transmission data conversion unit is used for calculating the size of the maximum transmittable audio and video data file according to the real-time uplink network speed;
the video data cropping unit is used for setting cropping limit points at the upper and lower positions of the initial end of the original video data and adding a data cropping blank layer for cropping a video picture on the cropping limit points; cutting the original video data by cutting the cutting depth of the real-time adjustment data cutting blank layer according to the uplink network speed;
the data transmission computing unit is used for asynchronously classifying, encoding, packaging and packaging the cut original video data and the original audio data to form an audio data stream and a target video data stream, and computing the maximum size of the audio data stream and the target video data stream which are compressed and encoded, so as to ensure that the size of the audio data stream and the target video data stream is slightly smaller than the size of the maximum transmittable audio and video data file.
In addition, the maximum transmittable audio/video data file size refers to the maximum data size allowed to be transmitted at the uplink network speed, and also refers to the data size obtained by compression coding the original video data and the original audio data.
The video data cropping unit may crop the lower portion and the upper portion of the video data, and first crop the upper portion of the video data, and then crop the lower portion of the video data.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.
Claims (6)
1. A method for intelligently adjusting real-time live broadcast code rate of an IP camera is characterized by comprising the following steps:
step 100, transmitting original audio data and original video data acquired by an IP camera to intelligent terminal equipment in real time, and capturing the uplink network speed of the intelligent terminal equipment in real time;
200, setting clipping limit points synchronous with an uplink network speed time node at the upper and lower positions of the initial end of original video data;
step 300, according to the dynamic data of the uplink network speed, correspondingly converting the dynamic data of the uplink network speed into the size of the maximum transmittable audio and video data file at the moment, and adding a data cutting blank layer for cutting a video picture on a cutting limit point of original video data;
step 400, adjusting the cutting depth of the data cutting blank layer in real time according to the uplink network speed, and cutting original video data; asynchronously classifying, encoding, packaging and packaging the original video data and the original audio data after the blank layer is cut, so as to form a target video data stream and an audio data stream, monitoring the size of the maximum data which can be transmitted after the audio data stream subjected to compression encoding and the target video data stream are added in real time, and ensuring that the size of the maximum data is slightly smaller than the size of the maximum transmittable audio and video data file all the time;
and 500, synchronously pushing the audio data stream and the target video data stream to a live broadcast server, and transcoding and watching the audio data stream and the target video data stream.
2. The method according to claim 1, wherein in step 100, the uplink network speed of the intelligent terminal device is counted in real time, and a network speed dynamic graph of the network speed is generated, wherein an abscissa of the network speed dynamic graph is time, a unit of the time is second, and an ordinate of the network speed dynamic graph is kilobytes for transmitting data codes.
3. The method according to claim 1, wherein in step 200, the position of the clipping limit point is variable, so the specific step of setting the clipping limit point is:
step 201, capturing the face position in each frame of image in real time;
step 202, setting the position 1cm-2cm above the top of the head of the human face as an upper limit clipping limit point of the audio-video data stream;
step 203, marking the upper limit cutting limit point of the audio-video data stream by taking each second as a time point;
step 204, setting the position 10cm-20cm below the top of the head of the face as a lower limit clipping limit point of the audio-video data stream;
and step 205, marking the lower limit clipping limit point of the audio-video data stream by taking each second as a time point.
4. The method for intelligently adjusting the real-time live broadcast code rate of the IP camera according to claim 1, wherein in step 400, the step of adjusting the cutting depth of the data cropping blank layer in real time specifically comprises:
step 401, converting the uplink network speed into the maximum transmission data byte value transmitted per second;
step 402, calculating the maximum data size which can be transmitted by the audio data stream and the target video data stream after compression coding according to the maximum transmission data byte value;
step 403, adjusting the row height of the data cropping blank layer, calculating the size of the data after the compressed coding of the video file per second after the cropping in real time, and determining the cutting depth of the data cropping blank layer on the video data.
5. The method for intelligently adjusting the real-time live broadcast code rate of the IP camera according to claim 3, wherein the method comprises the following steps: when video data is cut, the lower limit cutting limit point is cut first, and then the upper limit cutting limit point is cut.
6. The utility model provides a system for real-time live code rate of intelligent adjustment IP camera which characterized in that includes:
the system comprises intelligent terminal equipment used for receiving video data of an IP camera and a data transmission unit used for pushing and streaming original video data to a live broadcast end; an uplink network monitoring unit, a transmission data conversion unit, a video data cutting unit and a transmission data calculation unit are arranged in the intelligent terminal equipment;
the uplink network monitoring unit captures the uplink network speed of the intelligent terminal equipment in real time;
the transmission data conversion unit is used for calculating the size of the maximum transmittable audio and video data file according to the real-time uplink network speed; the video data cropping unit is used for setting cropping limit points at the upper and lower positions of the initial end of the original video data and adding a data cropping blank layer for cropping a video picture on the cropping limit points; cutting the original video data by cutting the cutting depth of the real-time adjustment data cutting blank layer according to the uplink network speed;
the transmission data calculation unit is used for asynchronously classifying, encoding, packaging and packaging the cut original video data and the original audio data to form an audio data stream and a target video data stream, calculating the size of the audio data stream subjected to compression encoding and the maximum data size capable of being transmitted by the target video data stream, and ensuring that the size of the audio data stream and the size of the target video data stream are slightly smaller than the size of the maximum transmittable audio and video data file all the time;
the video data cropping unit may crop a lower portion and an upper portion of the video data; and the upper portion of the video data is first cut and then the lower portion of the video data is cut.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910485331.1A CN110248199B (en) | 2019-06-05 | 2019-06-05 | System and method for intelligently adjusting real-time live broadcast code rate of IP camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910485331.1A CN110248199B (en) | 2019-06-05 | 2019-06-05 | System and method for intelligently adjusting real-time live broadcast code rate of IP camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110248199A CN110248199A (en) | 2019-09-17 |
CN110248199B true CN110248199B (en) | 2021-10-22 |
Family
ID=67886105
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910485331.1A Active CN110248199B (en) | 2019-06-05 | 2019-06-05 | System and method for intelligently adjusting real-time live broadcast code rate of IP camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110248199B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473228B (en) * | 2021-06-11 | 2022-12-27 | 深圳锐取信息技术股份有限公司 | Transmission control method, device, storage medium and equipment for 8K recorded and played video |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102232298A (en) * | 2011-04-07 | 2011-11-02 | 华为技术有限公司 | Method, device and system for transmitting and processing media content |
CN102413307A (en) * | 2011-11-30 | 2012-04-11 | 苏州希图视鼎微电子有限公司 | Self-adaptive code rate adjustment method and device for television video chat |
CN108924640A (en) * | 2018-07-11 | 2018-11-30 | 湖南双鸿科技有限公司 | Video transmission method, device and computer readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9197909B2 (en) * | 2013-03-14 | 2015-11-24 | Comcast Cable Communications, Llc | Allocation of clamping functionality |
US10819651B2 (en) * | 2017-03-08 | 2020-10-27 | Arris Enterprises Llc | Excess bitrate distribution based on quality gain |
-
2019
- 2019-06-05 CN CN201910485331.1A patent/CN110248199B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102232298A (en) * | 2011-04-07 | 2011-11-02 | 华为技术有限公司 | Method, device and system for transmitting and processing media content |
CN102413307A (en) * | 2011-11-30 | 2012-04-11 | 苏州希图视鼎微电子有限公司 | Self-adaptive code rate adjustment method and device for television video chat |
CN108924640A (en) * | 2018-07-11 | 2018-11-30 | 湖南双鸿科技有限公司 | Video transmission method, device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110248199A (en) | 2019-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105472477B (en) | A kind of data transmission method, device and equipment | |
CN104519325B (en) | A kind of adaptive support method of wireless video monitoring system based on 4G network | |
CN103647954B (en) | Mobile video monitor system based on 3G channels Yu intelligent terminal | |
CN102377730A (en) | Audio/video signal processing method and mobile terminal | |
WO2018054375A1 (en) | Live broadcast information processing method and device, and storage medium | |
CN107529064A (en) | A kind of self-adaptive encoding method based on VR terminals feedback | |
US20060078046A1 (en) | Method and system for multi-path video delivery and distribution | |
CN104053014A (en) | Live broadcast system and method based on mobile terminal, and mobile terminal | |
CN101009824A (en) | A network transfer method for audio/video data | |
CN110248199B (en) | System and method for intelligently adjusting real-time live broadcast code rate of IP camera | |
CN111629283B (en) | Multi-stream media gateway service system and method | |
CN105681817A (en) | Intelligent terminal video and audio collection, transmission and playing system and method | |
CN108471540B (en) | High-definition video smooth live broadcast method and device based on ultralow code stream | |
CN113301342A (en) | Video coding method, network live broadcast method, device and terminal equipment | |
Zhang et al. | Mfvp: Mobile-friendly viewport prediction for live 360-degree video streaming | |
US20080267284A1 (en) | Moving picture compression apparatus and method of controlling operation of same | |
CN104754336A (en) | Coding method and coded stream control device on basis of image priority statistical analysis | |
CN104079949B (en) | Towards the data encapsulation method and apparatus and system of the scene adaptive of multi-screen | |
CN108810468A (en) | A kind of video frequency transmitter and method of optimization display effect | |
CN107360386A (en) | Reduce the method for multi-medium file size | |
CN116233083B (en) | Efficient transmission method for digital media information | |
Huang et al. | DAVE: Dynamic adaptive video encoding for real-time video streaming applications | |
CN104639979A (en) | Video sharing method and system | |
CN107071356A (en) | A kind of multimedia optimization server and its video information processing method | |
CN108540827A (en) | Data processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |