CN111836080B - Video parameter optimization method and device - Google Patents

Video parameter optimization method and device Download PDF

Info

Publication number
CN111836080B
CN111836080B CN201910321333.7A CN201910321333A CN111836080B CN 111836080 B CN111836080 B CN 111836080B CN 201910321333 A CN201910321333 A CN 201910321333A CN 111836080 B CN111836080 B CN 111836080B
Authority
CN
China
Prior art keywords
video
network
code rate
video parameter
network camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910321333.7A
Other languages
Chinese (zh)
Other versions
CN111836080A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201910321333.7A priority Critical patent/CN111836080B/en
Publication of CN111836080A publication Critical patent/CN111836080A/en
Application granted granted Critical
Publication of CN111836080B publication Critical patent/CN111836080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/907Television signal recording using static stores, e.g. storage tubes or semiconductor memories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The method and the device for optimizing the video parameters acquire first video parameters of a network camera, calculate to acquire second video parameters according to the first video parameters and a preset strategy, calculate to acquire first code rate values according to the second video parameters after acquiring the second video parameters, and send the second video parameters and the first code rate values to the network camera, so that the network camera transmits videos to a network hard disk video recorder according to the second video parameters and the first code rate values, and further optimize bandwidth occupied by the network camera for transmitting videos and storage space of the network hard disk video recorder under the condition of ensuring video quality.

Description

Video parameter optimization method and device
Technical Field
The present disclosure relates to the field of video processing technologies, and in particular, to a method and an apparatus for optimizing video parameters.
Background
The Network Video Recorder (NVR) has the main function of receiving, storing and managing digital Video code streams transmitted by Network CAMERA (IP CAMERA, IPC) equipment through a Network, thereby realizing the advantage of a distributed architecture brought by networking.
At present, when a network camera transmits a video code stream to a network hard disk video recorder after the network camera is on line in a channel of the network hard disk video recorder, the code rate is higher. Although the higher the bitrate is, the higher the video quality is, the larger the storage space required in a unit time is, and the larger the required network transmission bandwidth is, in this case, the bitrate, the bandwidth and the storage space for transmitting the video are all to be optimized.
Disclosure of Invention
In view of the above, the present disclosure provides a method and an apparatus for optimizing video parameters.
The present disclosure provides a video parameter optimization method, which is applied to a network hard disk video recorder, and the method comprises:
first video parameters of the network camera are obtained.
And calculating to obtain a second video parameter according to the first video parameter and a preset strategy.
And calculating to obtain a first code rate value according to the second video parameter.
And sending the second video parameter and the first code rate value to the network camera so that the network camera transmits video to the network hard disk video recorder according to the second video parameter and the first code rate value.
Further, the preconfigured policy includes whether to start at least one of the plurality of encoding formats, and whether to start a processing mode corresponding to the at least one of the plurality of encoding formats.
The step of calculating a second video parameter according to the first video parameter and a preconfigured policy comprises:
judging whether the network camera supports the coding format adopted by the current network video recorder or not according to the first video parameter; and the encoding format adopted by the network hard disk video recorder is at least one encoding format included in the preset strategy.
And if the network camera supports the coding format adopted by the network video recorder, calculating to obtain the second video parameter according to the processing mode corresponding to the coding format adopted by the network video recorder.
Further, the second video parameters include a first encoding format, a second encoding format, a resolution, and a frame rate.
The first code rate value is calculated by the following formula:
Bitrate=F(xyzw)
wherein, bite represents code rate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, z.
Further, the method further comprises:
modifying the second video parameter.
And calculating to obtain a second code rate value according to the modified second video parameter.
And issuing the second code rate value and the modified second video parameter to the network camera so that the network camera transmits video to the network hard disk video recorder according to the second code rate value and the modified second video parameter.
Further, the method further comprises:
and acquiring a change demand, and changing the calculated code rate value according to the change demand.
And sending the changed code rate value to the network camera so that the network camera transmits a video to the network video recorder according to the changed code rate value.
The utility model provides a video parameter optimizing device, is applied to network video recorder, video parameter optimizing device includes acquisition module, processing module and issuing module.
The acquisition module is used for acquiring a first video parameter of the network camera.
And the processing module is used for calculating to obtain a second video parameter according to the first video parameter and a preset strategy.
The processing module is further configured to calculate a first code rate value according to the second video parameter.
The issuing module is used for issuing the second video parameter and the first code rate value to the network camera so that the network camera transmits video to the network hard disk video recorder according to the second video parameter and the first code rate value.
Further, the preconfigured policy includes whether to start at least one of the plurality of encoding formats, and whether to start a processing mode corresponding to the at least one of the plurality of encoding formats.
The processing module comprises a judgment submodule and a calculation submodule.
The judgment submodule is used for judging whether the network camera supports the coding format adopted by the current network video recorder or not according to the first video parameter; and the encoding format adopted by the network hard disk video recorder is at least one encoding format included in the pre-configured strategy.
And if the network camera supports the coding format adopted by the network video recorder, the calculation submodule is used for calculating to obtain the second video parameter according to the processing mode corresponding to the coding format adopted by the network video recorder.
Further, the second video parameters include a first encoding format, a second encoding format, a resolution, and a frame rate.
The calculation submodule is further configured to calculate the first code rate value by using the following formula:
Bitrate=F(xyzw)
wherein, bite represents code rate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, z.
Further, the video parameter optimization device further comprises an execution module.
And the execution module is used for modifying the second video parameter and calculating a second code rate value according to the modified second video parameter.
The issuing module is used for issuing the second code rate value and the modified second video parameter to the network camera, so that the network camera transmits video to the network hard disk video recorder according to the second code rate value and the modified second video parameter.
Further, the obtaining module is further configured to obtain a change requirement;
and the execution module is also used for changing the calculated code rate value according to the change requirement.
The issuing module is further configured to issue the changed code rate value to the network camera, so that the network camera transmits a video to the network hard disk video recorder according to the changed code rate value.
The method and the device for optimizing the video parameters acquire a first video parameter of a network camera, calculate to obtain a second video parameter according to the first video parameter and a preset strategy, calculate to obtain a first code rate value according to the second video parameter after obtaining the second video parameter, and send the second video parameter and the first code rate value to the network camera, so that the network camera transmits video to a network hard disk video recorder according to the second video parameter and the first code rate value, and further optimize the bandwidth occupied by the network camera for transmitting the video and the storage space of the network hard disk video recorder under the condition of ensuring the video quality.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the present disclosure, the drawings needed in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate certain embodiments of the present disclosure and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a video parameter optimization method provided in the present disclosure.
Fig. 2 is a schematic diagram illustrating an interaction principle of a video parameter optimization method provided by the present disclosure.
Fig. 3 is a schematic flow chart of another video parameter optimization method provided by the present disclosure.
Fig. 4 is a schematic flow chart of a video parameter optimization method provided by the present disclosure.
Fig. 5 is a schematic flow chart of a video parameter optimization method provided by the present disclosure.
Fig. 6 is a block diagram of a video parameter optimization apparatus provided in the present disclosure.
Fig. 7 is another block diagram of the video parameter optimization apparatus provided in the present disclosure.
Icon: 10-video parameter optimization means; 11-an acquisition module; 12-a processing module; 121-a judgment submodule; 122-a calculation submodule; 13-a sending module; 14-execution module.
Detailed Description
The technical solutions in the present disclosure will be described clearly and completely with reference to the accompanying drawings in the present disclosure, and it is to be understood that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The components of the present disclosure, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The Network Video Recorder (NVR) has the main function of receiving, storing and managing digital Video code streams transmitted by Network CAMERA (IP CAMERA, IPC) equipment through a Network, thereby realizing the advantage of a distributed architecture brought by networking.
With the continuous development of the technology, the performance of the network camera and the network video recorder is continuously improved, so that after the network camera is on line in a channel of the network video recorder, the code rate of the video transmitted from the network camera to the network video recorder is very high, correspondingly, the occupied storage space at the end of the network video recorder is larger, the network transmission bandwidth required for transmitting the video is larger, and when the storage space is certain, the saved video recording time is very short, and the occupied bandwidth is also very large.
Based on the above research, the present disclosure provides a video parameter optimization method and apparatus to improve the above problems.
The video parameter optimization method provided by the disclosure is applied to a network video recorder. Referring to fig. 1 and fig. 2 in combination, fig. 2 is a schematic view of an interaction principle of a video parameter optimization method provided by the present disclosure, and fig. 1 is a schematic view of a flow of the video parameter optimization method provided by the present disclosure. The following describes a specific flow of the video parameter optimization method shown in fig. 1 in detail.
Step S10: first video parameters of the network camera are obtained.
When the network video recorder starts an online process, and the network video camera is added to the network video recorder for the first time, the network video recorder initiates a request to the network video camera to acquire a first video parameter of the network video camera in the online process. The first video parameters of the webcam include a video resolution, a frame rate, a first encoding format, and a second encoding format. Optionally, in the present disclosure, the first encoding format is a standard encoding format, for example, encoding formats such as h.264, h.265, and MJPEG; the second encoding format is an intelligent encoding format, such as a UCODE encoding format.
Step S20: and calculating to obtain a second video parameter according to the first video parameter and a preset strategy.
The network video recorder is provided with a configuration item, and before the first video parameter is obtained, the configuration item of the network video recorder is configured firstly according to a strategy. Different network hard disk video recorders have different configuration items, and a user can correspondingly configure the configuration items of the network hard disk video recorder according to strategies. Optionally, if the user does not configure the configuration item of the network hard disk video recorder, the factory configuration of the network hard disk video recorder is taken as the standard. After the configuration item of the network hard disk video recorder is configured, when the network video recorder is on line, the current configuration item of the network hard disk video recorder is taken as the standard.
Referring to fig. 3, the step of calculating the second video parameter according to the first video parameter and the pre-configured policy includes steps S21 to S22.
Step S21: and judging whether the network camera supports the current coding format adopted by the network video recorder or not according to the first video parameter.
Step S22: and if the network camera supports the coding format adopted by the network video recorder, calculating to obtain the second video parameter according to the processing mode corresponding to the coding format adopted by the network video recorder.
The preset strategy comprises whether at least one of the multiple encoding formats is started or not and whether a processing mode corresponding to the at least one of the multiple encoding formats is started or not, wherein the encoding format adopted by the network hard disk video recorder is the at least one encoding format included in the strategy.
For example, in the present disclosure, the preconfigured policy includes whether to start the first encoding format, whether to start the second encoding format, whether to start the first encoding format, and whether to start the processing mode corresponding to the second encoding format.
When the first encoding format is a standard encoding format and the second encoding format is an intelligent encoding format, the following processing modes may be available for whether the first encoding format (standard encoding format) is turned on and whether the second encoding format (intelligent encoding format) is turned on.
(a) If the current network video recorder starts the standard coding format and closes the intelligent coding format, the network video recorder is accessed to the network video recorder for the first time, and the processing mode is as follows:
(1) judging whether the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder or not, if so, obtaining a second video parameter according to the standard coding format, issuing the obtained second video parameter to the network camera, and simultaneously issuing the obtained first video parameter original value according to the intelligent coding format. For example, if the standard encoding format is h.265 and the encoding capability of the network camera supports h.265, the second video parameter is sent to the network camera in the h.265 encoding format, and the intelligent encoding format is sent according to the original value of the obtained first video parameter.
(2) And judging whether the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder or not, and if the coding capability of the network camera does not support the standard coding format started by the current network hard disk video recorder, not issuing the video parameters.
(b) If the current network video recorder starts a standard coding format and an intelligent coding format and starts a basic mode, the network video recorder is firstly accessed to the network video recorder at the network video camera, and the processing mode is as follows:
(1) and judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder and the basic mode of the intelligent coding format, obtaining a second video parameter according to the standard coding format and the basic mode of the intelligent coding format, and issuing the second video parameter to the network camera. For example, if the standard encoding format is h.265, the encoding capability of the webcam supports the basic mode of h.265 and the intelligent encoding format, the video parameters are delivered to the webcam in the h.265 encoding format, and the intelligent encoding format delivers the video parameters in the basic mode.
(2) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder and does not support the basic mode of the intelligent coding format, obtaining a second video parameter according to the standard coding format and issuing the second video parameter to the network camera, and meanwhile, issuing the intelligent coding format according to the obtained original value of the first video parameter.
(3) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera does not support the standard coding format started by the current network hard disk video recorder and supports the basic mode of the intelligent coding format, obtaining a second video parameter according to the basic mode of the intelligent coding format and issuing the second video parameter to the network camera, and simultaneously issuing the standard coding format according to the original value of the obtained first video parameter.
(4) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera does not support the standard coding format started by the current network hard disk video recorder and the basic mode of the intelligent coding format, not issuing the video parameters.
(c) If the current network video recorder starts a standard coding format and an intelligent coding format and starts an advanced mode, the network video recorder is firstly accessed to the network video recorder at the network video camera, and the processing mode is as follows:
(1) and judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder and the advanced mode of the intelligent coding format, obtaining a second video parameter according to the standard coding format and the advanced mode of the intelligent coding format, and issuing the second video parameter to the network camera. For example, if the standard encoding format is h.265, the encoding capability of the webcam supports h.265 and the advanced mode of the smart encoding format, the video parameters are delivered to the webcam in the h.265 encoding format, and the smart encoding format delivers the video parameters in the advanced mode.
(2) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder, does not support the advanced mode of the intelligent coding format and only supports the basic mode of the intelligent coding format, obtaining a second video parameter according to the standard coding format and the basic mode of the intelligent coding format, and issuing the second video parameter to the network camera. For example, if the standard encoding format is h.265, the encoding capability of the webcam supports the basic mode of h.265 and the intelligent encoding format, the video parameters are delivered to the webcam in the h.265 encoding format, and the intelligent encoding format delivers the video parameters in the basic mode.
(3) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the standard coding format started by the current network hard disk video recorder and does not support the basic mode and the advanced mode of the intelligent coding format, obtaining a second video parameter according to the standard coding format and issuing the second video parameter to the network camera, and simultaneously issuing the second video parameter according to the obtained original value of the first video parameter by the intelligent coding format.
(4) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera does not support the standard coding format started by the current network hard disk video recorder and supports the advanced mode of the intelligent coding format, obtaining a second video parameter according to the advanced mode of the intelligent coding format and issuing the second video parameter to the network camera, and simultaneously issuing the standard coding format according to the original value of the obtained first video parameter.
(5) Judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera does not support the standard coding format started by the current network hard disk video recorder and the advanced mode of the intelligent coding format, and supports the basic mode of the intelligent coding format, obtaining a second video parameter according to the basic mode of the intelligent coding format, and issuing the second video parameter to the network camera, and meanwhile, issuing the standard coding format according to the original value of the obtained first video parameter.
(6) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, and if the coding capability of the network camera does not support the standard coding format, the advanced mode of the intelligent coding format and the basic mode of the intelligent coding format started by the current network hard disk video recorder, not issuing the video parameters.
(d) If the current network video recorder closes the standard coding format and opens the basic mode in the intelligent coding format, the network video recorder is accessed to the network video recorder for the first time, and the processing mode is as follows:
(1) and judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the basic mode of the intelligent coding format, obtaining a second video parameter according to the basic mode of the intelligent coding format and issuing the second video parameter to the network camera, and simultaneously issuing the standard coding format according to the original value of the obtained first video parameter.
(2) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, and if the coding capability of the network camera does not support the basic mode of the intelligent coding format, not issuing the video parameters.
(e) If the current network video recorder closes the standard coding format and opens the advanced mode in the intelligent coding format, the network video recorder is firstly accessed into the network video recorder, and the processing mode is as follows:
(1) and judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera supports the advanced mode of the intelligent coding format started by the current network hard disk video recorder, obtaining a second video parameter according to the advanced mode of the intelligent coding format and issuing the second video parameter to the network camera, and meanwhile, issuing the standard coding format according to the obtained original value of the first video parameter.
(2) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, if the coding capability of the network camera only supports the basic mode of the intelligent coding format started by the current network hard disk video recorder, obtaining a second video parameter according to the basic mode of the intelligent coding format and issuing the second video parameter to the network camera, and meanwhile, issuing the standard coding format according to the obtained original value of the first video parameter.
(3) And judging whether the coding capability of the network camera supports the coding format started by the current network hard disk video recorder, and if the coding capability of the network camera does not support the advanced mode and the basic mode of the intelligent coding format started by the current network hard disk video recorder, not issuing the video parameters.
(f) If the current network video recorder closes the standard coding format and the intelligent coding format, the network video recorder is accessed to the network video recorder for the first time, and the processing mode is that the video parameters are not sent down and are consistent with the original value of the obtained first video parameter.
In the present disclosure, the smart coding format includes a base mode and an advanced mode, wherein the base mode Of the smart coding format includes an independent control strategy for I-frames and P-frames Of an image, a selection strategy for a dynamic Interest Of Interest (GOI), and a strategy for adjusting a Quantization Parameter (QP) according to image information. The advanced mode of the smart coding format further includes a strategy for adjusting a Group of pictures (GOP) size according to image motion information on the basis of the base mode.
Therefore, if the network camera only supports the basic mode of the intelligent coding format, the second video parameter can be obtained according to the basic mode of the intelligent coding format.
The acquired first video parameters include encoding format capability parameters of the network camera, such as the first encoding format parameter and the second encoding format parameter in the present disclosure, so that after the first video parameters of the network camera are acquired, whether the network camera supports the encoding format adopted by the current network hard disk video recorder can be judged according to the encoding format capability parameters in the first video parameters. And if the network camera supports the coding format adopted by the network hard disk video recorder, calculating to obtain a second video parameter according to the processing mode corresponding to the coding format adopted by the network hard disk video recorder.
Referring back to fig. 2, after the second video parameter is obtained, step S30 is executed.
Step S30: and calculating to obtain a first code rate value according to the second video parameter.
Further, in the present disclosure, for the first video parameter obtained by the network camera, the second video parameter calculated by the present disclosure includes the first encoding format, the second encoding format, the resolution, and the frame rate.
The first code rate value is calculated by the following formula:
Bitrate=F(xyzw)
wherein, bite represents code rate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, z.
In the present disclosure, the first bitrate value is determined by each of the second video parameters, and for each of the second video parameters, there is a calculation policy corresponding to the parameter, for example, the calculation rule of the resolution and the bitrate is shown in table 1.
Figure BDA0002033471080000121
Figure BDA0002033471080000131
For another example, in addition to the above, the calculation rules of the coding format and the code rate are as follows.
Under the condition of opening a standard coding format (such as H.264), if the intelligent coding format is not opened or only the basic mode of the intelligent coding format is opened, the calculation rule of the code rate is consistent with the Default calculation rule shown in the table 1; if the advanced mode of the intelligent coding format is started, the code rate calculation rule is 1/2, namely Default/2, of the Default code rate calculation rule shown in Table 1.
Under the condition of starting a standard coding format (such as H.265), if an intelligent coding format is not started or only a basic mode of the intelligent coding format is started, and a code rate calculation rule is H.264, 1/2 of the calculation rule of the basic mode of the intelligent coding format is not started or only started, namely Default/2; if the advanced mode of the intelligent coding format is started, the calculation rule of the code rate is 1/4, namely Default/4, of the calculation rule of the basic mode of the intelligent coding format is not started or is only started under the H.264 coding format.
For another example, the calculation rule of the frame rate and the code rate is shown in table 2.
At low frame rates (e.g., 10, 12.5, 15, etc.) Default/2
At normal frame rate (e.g. 20, 30) Default
At high frame rates (e.g., 50, 60) Default*1.5
Further, in the present disclosure, if the calculated first code rate value is not 256-aligned, the remainder part needs to be 256-aligned, for example, the calculated first code rate value is 1026kbps, the remainder is 2, and after 256-aligned, the finally calculated first code rate value is 1280 kbps.
Referring back to fig. 2, after the first code rate value is calculated, step S40 is executed.
Step S40: and sending the second video parameter and the first code rate value to the network camera so that the network camera transmits video to the network hard disk video recorder according to the second video parameter and the first code rate value.
After the second video parameter and the first code rate value are obtained through calculation, the second video parameter and the first code rate value are issued to the network camera, so that the network camera transmits videos to the network hard disk video recorder according to the second video parameter and the first code rate value, and further, under the condition that the video quality is guaranteed, the occupied bandwidth of the network camera for transmitting the videos and the storage space of the network hard disk video recorder are optimized.
Further, please refer to fig. 4 in combination, in order to obtain the target code rate value of the user for the convenience of the user operation, the video parameter optimization method provided by the present disclosure further includes steps S50 to S52.
Step S50: modifying the second video parameter.
If the user has a user-defined requirement on the video parameter, after the second video parameter is obtained through calculation, the requirement of the user can also be obtained, and the second video parameter is modified according to the requirement of the user.
Step S51: and calculating to obtain a second code rate value according to the modified second video parameter.
Step S52: and sending the second code rate value and the modified second video parameter to the network camera, so that the network camera transmits a video to the network hard disk video recorder according to the second code rate value and the modified second video parameter.
After the second video parameter is modified according to the requirement of the user, a recommended code rate value, namely a second code rate value, can be obtained through calculation according to the modified second video parameter and a calculation formula Bitrate ═ F (xyz), and after the second code rate value is obtained, the second code rate value and the modified second video parameter are sent to the network camera, so that the network camera transmits the video to the network hard disk video recorder according to the second code rate value and the modified second video parameter, and the quality, the occupied bandwidth and the storage space of the network hard disk video recorder of the network camera can achieve a better effect.
Further, please refer to fig. 5, the video parameter optimization method provided in the present disclosure may also modify the calculated code rate value, and the specific process includes steps S60 to S61.
Step S60: and acquiring a change demand, and changing the calculated code rate value according to the change demand.
Step S61: and sending the changed code rate value to the network camera so that the network camera transmits a video to the network hard disk video recorder according to the changed code rate value.
If the user has a defined requirement on the code rate of the video transmitted by the network camera, after the recommended code rate value is obtained through calculation, the change requirement of the user is obtained, the code rate value obtained through calculation is changed according to the change requirement of the user, and the changed code rate value is issued to the network camera, so that the network camera transmits the video to the network hard disk video recorder according to the changed code rate value.
Optionally, when a user sets that the network camera is added to the network hard disk video recorder for the first time according to requirements, the video parameter optimization method provided by the disclosure is effective, and the video parameter optimization method provided by the disclosure can also be set to be effective all the time.
Further, please refer to fig. 6 in combination, the present disclosure provides a video parameter optimization apparatus 10, where the video parameter optimization apparatus 10 provided in the present disclosure is applied to a network hard disk video recorder, and the video parameter optimization apparatus 10 includes an obtaining module 11, a processing module 12, and a sending module 13.
The acquiring module 11 is configured to acquire a first video parameter of the network camera.
The processing module 12 is configured to calculate a second video parameter according to the first video parameter and a preconfigured policy.
The processing module 12 is further configured to calculate a first code rate value according to the second video parameter.
The issuing module 13 is configured to issue the second video parameter and the first code rate value to the network camera, so that the network camera transmits a video to the network hard disk video recorder according to the second video parameter and the first code rate value.
Further, referring to fig. 7, the processing module 12 includes a determining sub-module 121 and a calculating sub-module 122. The pre-configured strategy comprises whether at least one of the multiple encoding formats is started or not and whether a processing mode corresponding to at least one of the multiple encoding formats is started or not.
The judgment submodule 121 is configured to judge whether the network camera supports a coding format adopted by the network hard disk recorder currently according to the first video parameter; and the encoding format adopted by the network hard disk video recorder is at least one encoding format included in the preset strategy.
If the network camera supports the encoding format adopted by the network hard disk video recorder, the calculating sub-module 122 is configured to calculate to obtain the second video parameter according to the processing mode corresponding to the encoding format adopted by the network hard disk video recorder.
Further, the second video parameters include a first encoding format, a second encoding format, a resolution, and a frame rate;
the calculating submodule 122 is further configured to calculate the first code rate value by the following formula:
Bitrate=F(xyzw)
wherein, bite represents code rate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, z.
Further, the video parameter optimization device 10 further includes an execution module 14.
The execution module 14 is configured to modify the second video parameter, and calculate a second code rate value according to the modified second video parameter.
The issuing module 13 is configured to issue the second code rate value and the modified second video parameter to the network camera, so that the network camera transmits a video to the network hard disk recorder according to the second code rate value and the modified second video parameter.
Further, the obtaining module 11 is further configured to obtain a change requirement.
The executing module 14 is further configured to modify the calculated code rate value according to the modification requirement.
The issuing module 13 is further configured to issue the changed code rate value to the network camera, so that the network camera transmits a video to the network hard disk recorder according to the changed code rate value.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the video parameter optimization apparatus 10 described above may refer to the corresponding process in the foregoing method, and will not be described in too much detail herein.
In summary, according to the video parameter optimization method and apparatus provided by the present disclosure, a first video parameter of a network camera is obtained, a second video parameter is obtained by calculation according to the first video parameter and a preconfigured policy, after the second video parameter is obtained, a first code rate value is obtained by calculation according to the second video parameter, and the second video parameter and the first code rate value are sent to the network camera, so that the network camera transmits a video to a network hard disk recorder according to the second video parameter and the first code rate value, and further, under the condition that the video quality is ensured, a bandwidth occupied by the network camera for transmitting the video and a storage space of the network hard disk recorder are optimized.
In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is illustrative of only alternative embodiments of the present disclosure and is not intended to limit the disclosure, which may be modified and varied by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (10)

1. A video parameter optimization method is applied to a network video recorder and comprises the following steps:
acquiring a first video parameter of a network camera; wherein the first video parameters comprise video resolution, frame rate, first encoding format and second encoding format;
calculating to obtain a second video parameter according to the first video parameter and a preset strategy; wherein the second video parameters comprise video resolution, frame rate, first encoding format, and second encoding format;
calculating to obtain a first code rate value according to the second video parameter;
and sending the second video parameter and the first code rate value to the network camera so that the network camera transmits a video to the network hard disk video recorder according to the second video parameter and the first code rate value.
2. The method of claim 1, wherein the preconfigured policies include whether to turn on at least one of the plurality of encoding formats and whether to turn on a processing mode corresponding to the at least one of the plurality of encoding formats;
the step of calculating a second video parameter according to the first video parameter and a preconfigured policy comprises:
judging whether the network camera supports the coding format adopted by the current network video recorder or not according to the first video parameter; wherein, the coding format adopted by the network hard disk video recorder is at least one coding format included in the pre-configured strategy;
and if the network camera supports the coding format adopted by the network video recorder, calculating to obtain the second video parameter according to the processing mode corresponding to the coding format adopted by the network video recorder.
3. The video parameter optimization method of claim 2, wherein the second video parameters comprise a first encoding format, a second encoding format, a resolution, and a frame rate;
the first code rate value is calculated by the following formula:
Bitrate=F(xyzw)
wherein, bite represents code rate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, z.
4. The method of claim 1, further comprising:
modifying the second video parameter;
calculating to obtain a second code rate value according to the modified second video parameter;
and sending the second code rate value and the modified second video parameter to the network camera, so that the network camera transmits a video to the network hard disk video recorder according to the second code rate value and the modified second video parameter.
5. The video parameter optimization method of claim 1, wherein the method further comprises:
acquiring a change demand, and changing the calculated code rate value according to the change demand;
and sending the changed code rate value to the network camera so that the network camera transmits a video to the network video recorder according to the changed code rate value.
6. A video parameter optimization device is characterized by being applied to a network hard disk video recorder and comprising an acquisition module, a processing module and an issuing module;
the acquisition module is used for acquiring a first video parameter of the network camera; wherein the first video parameters comprise video resolution, frame rate, first encoding format and second encoding format;
the processing module is used for calculating to obtain a second video parameter according to the first video parameter and a preset strategy; wherein the second video parameters comprise video resolution, frame rate, first encoding format, and second encoding format;
the processing module is further used for calculating to obtain a first code rate value according to the second video parameter;
the issuing module is used for issuing the second video parameter and the first code rate value to the network camera so that the network camera transmits video to the network hard disk video recorder according to the second video parameter and the first code rate value.
7. The apparatus according to claim 6, wherein the pre-configured policy includes whether to turn on at least one of the plurality of encoding formats and whether to turn on a processing mode corresponding to the at least one of the plurality of encoding formats;
the processing module comprises a judgment submodule and a calculation submodule;
the judgment submodule is used for judging whether the network camera supports the coding format adopted by the current network video recorder or not according to the first video parameter; the network hard disk video recorder adopts at least one coding format included in the pre-configured strategy;
and if the network camera supports the coding format adopted by the network video recorder, the calculation submodule is used for calculating to obtain the second video parameter according to the processing mode corresponding to the coding format adopted by the network video recorder.
8. The video parameter optimization device of claim 7, wherein the second video parameters comprise a first encoding format, a second encoding format, a resolution, and a frame rate;
the calculation sub-module is further configured to calculate the first code rate value by using the following formula:
Bitrate=F(xyzw)
wherein, bite represents a Bitrate, x represents any one of the second video parameters, y represents any one of the second video parameters different from x, z represents any one of the second video parameters different from x, y, and w represents any one of the second video parameters different from x, y, and z.
9. The video parameter optimization device of claim 8, further comprising an execution module:
the execution module is used for modifying the second video parameter and calculating to obtain a second code rate value according to the modified second video parameter;
the issuing module is used for issuing the second code rate value and the modified second video parameter to the network camera, so that the network camera transmits video to the network hard disk video recorder according to the second code rate value and the modified second video parameter.
10. The video parameter optimization device of claim 9,
the obtaining module is further used for obtaining a change requirement;
the execution module is also used for changing the calculated code rate value according to the change requirement;
the issuing module is further configured to issue the changed code rate value to the network camera, so that the network camera transmits a video to the network hard disk video recorder according to the changed code rate value.
CN201910321333.7A 2019-04-19 2019-04-19 Video parameter optimization method and device Active CN111836080B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910321333.7A CN111836080B (en) 2019-04-19 2019-04-19 Video parameter optimization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910321333.7A CN111836080B (en) 2019-04-19 2019-04-19 Video parameter optimization method and device

Publications (2)

Publication Number Publication Date
CN111836080A CN111836080A (en) 2020-10-27
CN111836080B true CN111836080B (en) 2022-07-19

Family

ID=72912092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910321333.7A Active CN111836080B (en) 2019-04-19 2019-04-19 Video parameter optimization method and device

Country Status (1)

Country Link
CN (1) CN111836080B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014262A (en) * 2010-10-27 2011-04-13 杭州海康威视软件有限公司 Hard disk video recorder and system and method for converting multimedia formats
CN105306942A (en) * 2015-10-19 2016-02-03 上海增容数据科技有限公司 Encoding method, device and system for video encoder
CN107547941A (en) * 2016-06-24 2018-01-05 杭州海康威视数字技术股份有限公司 Storage method, the device and system of media data
CN107948674A (en) * 2017-12-07 2018-04-20 天津天地伟业机器人技术有限公司 A kind of VOD method applied in NVR equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3474225B1 (en) * 2017-10-18 2019-09-25 Axis AB Method and encoder for encoding a video stream in a video coding format supporting auxiliary frames

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014262A (en) * 2010-10-27 2011-04-13 杭州海康威视软件有限公司 Hard disk video recorder and system and method for converting multimedia formats
CN105306942A (en) * 2015-10-19 2016-02-03 上海增容数据科技有限公司 Encoding method, device and system for video encoder
CN107547941A (en) * 2016-06-24 2018-01-05 杭州海康威视数字技术股份有限公司 Storage method, the device and system of media data
CN107948674A (en) * 2017-12-07 2018-04-20 天津天地伟业机器人技术有限公司 A kind of VOD method applied in NVR equipment

Also Published As

Publication number Publication date
CN111836080A (en) 2020-10-27

Similar Documents

Publication Publication Date Title
US8792774B2 (en) Image processing device, development apparatus, image processing method, development method, image processing program, development program and raw moving image format
US10051202B2 (en) Method and apparatus for adaptively mixing video source signals
US10582211B2 (en) Neural network to optimize video stabilization parameters
EP1949705B1 (en) Image signal processing apparatus
CN104639951B (en) The pumping frame processing method and device of video code flow
US20120213272A1 (en) Method and system for adjusting video and audio quality of video stream
US20090290645A1 (en) System and Method for Using Coded Data From a Video Source to Compress a Media Signal
JP2002135783A (en) Processing method of variable bit rate for streaming service
US9264714B2 (en) Image processing apparatus and image processing method
US8867611B2 (en) Video transmitting method and system with image quality adjusting function
US7432960B2 (en) Image generating apparatus and image generating method
CN111225254A (en) Video transmission method, device, terminal equipment and storage medium
US7319811B2 (en) Information processing apparatus and method
CN112584194A (en) Video code stream pushing method and device, computer equipment and storage medium
US8681860B2 (en) Moving picture compression apparatus and method of controlling operation of same
CN111836080B (en) Video parameter optimization method and device
CN108124155B (en) Code rate control method and device and electronic equipment
US10721473B2 (en) Systems and methods for adjusting the frame rate of transmitted video based on the level of motion in the video
CN112788364B (en) Code stream flow regulating device, method and computer readable storage medium
US9648067B2 (en) Reception of a digital content in trick mode
US11496535B2 (en) Video data transmission apparatus, video data transmitting method, and storage medium
CN114302145A (en) Video coding optimization method, device, equipment and storage medium for adaptive network environment
US20020154320A1 (en) Image data generation method, image data generation apparatus, image processing method, image processing apparatus, and recording medium
WO2012042701A1 (en) Multi-stream encoding control device and camera system
JPH04145781A (en) Picture data recording 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