A kind of kinescope method and equipment of video
Technical field
The present invention relates to technical field of video monitoring more particularly to the kinescope methods and equipment of a kind of video.
Background technique
Digital VTR (Digital Video Recorder, DVR) is that one kind can record video by data hard disc
With the monitoring device of audio data, there is storage video recording, playing back videos, telereference video recording, long-range playback, remote download record
The functions such as picture, remote speech intercommunication.DVR points are plain edition digital hard disc video recorder, mixed type digital hard disc video recorder (Hybrid
) and network hard disk video recorder (Network Video Recorder, NVR) DVR.
When the prior art carries out video record by DVR, code stream size will not carry out dynamic adjustment according to scene, such as in vehicle
When carrying monitoring, if the position of camera alignment driver, driver are driving always, sound, picture are constant, but are still at this time
It is recorded a video according to the code stream size of the HD video set, actually this section of video is not necessarily to save as HD video,
It only mutates in picture or sound, saves HD video when situation is abnormal on vehicle, facilitate evidence obtaining.
In addition, vehicle-mounted monitoring by use environment and condition due to being influenced, it is impossible to configure multiple hard disks, under normal circumstances only
A hard disk or two hard disks can be configured, are calculated according to the code stream size of current HD video, the code stream of every road 4Mb/s, such as
If fruit is 8 pipeline equipments, according to current video recording mode, the hard disk of a 500G capacity only enough deposits 40 hours, then will
Covering is not recorded a video or recycled, very big puzzlement is caused to user.
In conclusion the monitoring device of the prior art carries out video using the coding parameter of pre-set HD video
Coding, and the video data after coding is saved, and record HD video always and very high requirement is proposed for the capacity of hard disk,
And the capacity of vehicle-mounted monitoring hard disk is limited, therefore, the prior art is unable to satisfy vehicle-mounted monitoring, and for hard disk, storage is recorded a video for a long time
Requirement.
Summary of the invention
The embodiment of the invention provides a kind of kinescope method of video and equipment, certain to the capacity in video recording equipment
Under the conditions of, improve the utilization rate of video recording equipment.
A kind of kinescope method of video provided in an embodiment of the present invention, comprising:
Acquire audio and video;
The sound value that the audio characterizes is compared with preset sound value, if the sound value of audio characterization is greater than
The preset sound value then encodes the video according to the first coding parameter, and saves the video data after coding, no
Then the video is encoded according to second encoding parameter, and saves the video data after coding;Wherein:
First coding parameter includes the first code stream value and first resolution value;The second encoding parameter includes second
Code stream value and second resolution value;The first code stream value is greater than the second code flow valuve;The first resolution value is greater than institute
State second resolution value.
By the kinescope method of video provided in an embodiment of the present invention, comprising: acquisition audio and video;The sound that audio is characterized
Value is compared with preset sound value, if the sound value of audio characterization is greater than preset sound value, according to the first coding parameter
Video is encoded, and saves the video data after coding, otherwise video is encoded according to second encoding parameter, and protects
Video data after depositing coding;Wherein: the first coding parameter includes the first code stream value and first resolution value, second encoding parameter
Including second code flow valuve and second resolution value;First code stream value is greater than second code flow valuve;First resolution value is greater than second point
Resolution value.Due to the embodiment of the present invention only audio characterization sound value be greater than preset sound value when, just use high code stream value
It is encoded with the coding parameter of high resolution value, and saves the video data after coding;And the sound value in audio characterization is small
It when preset sound value, is encoded using the coding parameter of low code stream value and low resolution values, and saves the video after coding
Data;Compared with prior art, the video recording that the embodiment of the present invention saves no longer is entirely high definition video recording, in the capacity of video recording equipment
Under conditions of certain, the utilization rate of video recording equipment is improved.
Preferably, the method is also before the sound value that the audio is characterized is compared with preset sound value
It comprises determining that background noise, and removes background noise.
If joining preferably, the sound value of audio characterization is greater than the preset sound value according to the first coding
It is several that the video is encoded, it specifically includes:
The duration for the sound value that the audio that record is greater than the preset sound value characterizes, if the duration is greater than
When default first time threshold, then the video is encoded according to the first coding parameter, is otherwise joined according to current coding
It is several that the video is encoded.
Preferably, described encode the video according to second encoding parameter, specifically include:
The duration for the sound value that the audio that record is less than the preset sound value characterizes, if the duration is greater than
When default second time threshold, then the video is encoded according to second encoding parameter, is otherwise joined according to current coding
It is several that the video is encoded.
Preferably, the method also includes:
The brightness change value of the video of two adjacent I frames is detected, if the brightness change value is greater than predetermined luminance value,
The video is encoded according to the first coding parameter, and saves the video data after coding, is otherwise joined according to the second coding
It is several that the video is encoded, and save the video data after coding.
If preferably, the brightness change value is greater than predetermined luminance value, according to the first coding parameter to the view
Frequency is encoded, and is specifically included:
The duration that the brightness change value is greater than predetermined luminance value is recorded, if the duration is greater than default third
When time threshold, then the video is encoded according to the first coding parameter, otherwise according to current coding parameter to described
Video is encoded.
Preferably, described encode the video according to second encoding parameter, specifically include:
The duration that the brightness change value is less than predetermined luminance value is recorded, if the duration is greater than the default 4th
When time threshold, then the video is encoded according to second encoding parameter, otherwise according to current coding parameter to described
Video is encoded.
The embodiment of the invention also provides a kind of video recording equipments of video, comprising:
Acquisition unit, for acquiring audio and video;
Video record unit, the sound value for characterizing the audio is compared with preset sound value, if the audio frequency table
The sound value of sign is greater than the preset sound value, then encodes according to the first coding parameter to the video, and save coding
Otherwise video data afterwards encodes the video according to second encoding parameter, and save the video data after coding;Its
In: first coding parameter includes the first code stream value and first resolution value;The second encoding parameter includes the second code stream
Value and second resolution value;The first code stream value is greater than the second code flow valuve;The first resolution value is greater than described the
Two resolution values.
Preferably, further including noise removal unit, for determining background noise, and background noise is removed.
Preferably, the video record unit is specifically used for, record is greater than the sound value that the audio of the preset sound value characterizes
Duration, if the duration is greater than default first time threshold, according to the first coding parameter to the video
It is encoded, otherwise the video is encoded according to current coding parameter.
Preferably, the video record unit is specifically used for, record is less than the sound value that the audio of the preset sound value characterizes
Duration, if the duration is greater than default second time threshold, according to second encoding parameter to the video
It is encoded, otherwise the video is encoded according to current coding parameter.
Preferably, the video record unit is also used to, the brightness change value of the video of two adjacent I frames is detected, if described
Brightness change value be greater than predetermined luminance value, then the video is encoded according to the first coding parameter, and save coding after
Otherwise video data encodes the video according to second encoding parameter, and save the video data after coding.
Preferably, the video record unit is specifically also used to, records the brightness change value and continue greater than predetermined luminance value
Time compiles the video according to the first coding parameter if the duration is greater than default third time threshold
Code, otherwise encodes the video according to current coding parameter.
Preferably, the video record unit is specifically also used to, records the brightness change value and continue less than predetermined luminance value
Time compiles the video according to second encoding parameter if the duration is greater than default four time threshold
Code, otherwise encodes the video according to current coding parameter.
Detailed description of the invention
Fig. 1 is a kind of kinescope method flow chart of video provided in an embodiment of the present invention;
Fig. 2 is the kinescope method flow chart for the video that the embodiment of the present invention one provides;
Fig. 3 is the kinescope method flow chart for another video that the embodiment of the present invention one provides;
Fig. 4 is the kinescope method flow chart of video provided by Embodiment 2 of the present invention;
Fig. 5 is a kind of schematic diagram of the video recording equipment of video provided in an embodiment of the present invention;
Fig. 6 is the kinescope method flow chart for the video under vehicle-mounted monitoring environment that the embodiment of the present invention three provides.
Specific embodiment
The embodiment of the invention provides a kind of kinescope method of video and equipment, certain to the capacity in digital VTR
Under conditions of, improve the utilization rate of digital VTR.
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
As shown in Figure 1, the specific embodiment of the invention provides a kind of kinescope method of video, comprising:
S101, acquisition audio and video;
S102, the sound value that the audio characterizes is compared with preset sound value, if the sound of audio characterization
Value is greater than the preset sound value, then encodes according to the first coding parameter to the video, and saves the video after coding
Otherwise data encode the video according to second encoding parameter, and save the video data after coding;Wherein: described
First coding parameter includes the first code stream value and first resolution value;The second encoding parameter includes second code flow valuve and second
Resolution value;The first code stream value is greater than the second code flow valuve;The first resolution value is greater than the second resolution
Value.
Specifically, when the specific embodiment of the invention records a video to video, using current most widely used DVR equipment or
NVR equipment acquires audio and video, acquisition by the camera of DVR equipment or NVR front equipment end first when being recorded a video
To audio characterization be DVR equipment or NVR equipment working environment sound value size.
Specifically, for the specific embodiment of the invention when carrying out video record, the setting of the size of preset sound value is basis
What the performance of the environment and DVR equipment or NVR equipment actually recorded a video itself was configured, after setting, when collected audio
When the sound value of characterization is greater than the preset sound value, indicates that DVR equipment or NVR equipment working environment are abnormal, it is pre- to be less than this
If when sound value, indicating that DVR equipment or NVR equipment working environment are relatively stable, there is no exceptions.
Specifically, the specific embodiment of the invention encodes video under the first coding parameter, due to the first coding ginseng
The code stream value and resolution value that number includes are higher, therefore, the video saved after being encoded under the first coding parameter to video
Data are HD video data, and in the specific implementation, code stream value and resolution value are carried out according to the specific requirement to HD video
Setting, the occurrence of setting can be identical as the code stream value and resolution value of HD video in the prior art, in addition, the present invention has
The first coding parameter in body embodiment, which further includes the video recorded, needs the other parameters value that sets when being HD video, such as:
High frame per second.
Specifically, the specific embodiment of the invention encodes video under second encoding parameter, due to the second coding ginseng
The code stream value and resolution value that number includes are lower, therefore, the video saved after being encoded under second encoding parameter to video
Data are general video data, and in the specific implementation, code stream value and resolution value are carried out according to the specific requirement to ordinary video
Setting, the occurrence of setting can be identical as the code stream value and resolution value of ordinary video in the prior art, in addition, the present invention has
Second encoding parameter in body embodiment, which further includes the video recorded, needs the other parameters value that sets when being ordinary video, such as:
Low frame per second.
For the specific embodiment of the invention when carrying out video record, background sound itself is more noisy sometimes, will lead to acquisition
The sound value of the audio characterization arrived is larger, when the sound value for characterizing the audio is compared with preset sound value, can compare
Relatively result affects.Preferably, the specific embodiment of the invention is in the sound value and preset sound value for characterizing audio
Before being compared, further includes: determine background noise, and remove background noise.Here background noise may include equipment from
The noise of body, and other noises in equipment local environment, such as the sound of speaking of people at this time.Specifically, the present invention is specific
Embodiment removes this background noise by the filter unit in DVR equipment or NVR equipment, the minimizing technology of background noise with it is existing
Technology is identical, and which is not described herein again.
The video recording method of the specific embodiment of the invention is specifically introduced with reference to the accompanying drawing.
Embodiment one:
As shown in Fig. 2, the specific embodiment of the invention passes through the camera acquisition sound of DVR equipment or NVR front equipment end first
Frequency and video;Then background noise is removed, when so that the sound value of follow audio characterization being compared with preset sound value, is compared
As a result more accurate;Then the sound value that the audio of acquisition characterizes is compared with preset sound value, judges audio characterization
Whether sound value is greater than preset sound value, if the sound value of audio characterization is greater than preset sound value, according to the first coding parameter
Video is encoded, and saves the video data after coding, the video data saved at this time is HD video data, if audio
The sound value of characterization is less than preset sound value, then encodes according to second encoding parameter to video, and saves the view after coding
Frequency evidence, the video data saved at this time are general video data.
When the specific embodiment of the invention saves the video data after coding, DVR equipment can be stored in or NVR is set
In hard disk in standby, it can also be stored in other storage equipment such as storage (SD) card in DVR equipment or NVR equipment.
Compared with prior art, using the specific embodiment of the invention provide video recording method, be stored in DVR equipment or
Video recording in NVR equipment is no longer entirely the video data of high definition, just saves high definition when being only abnormal situation
Video data, remaining when save general video data, be greatly saved the space of DVR equipment or NVR equipment, improve
The utilization rate of DVR equipment or NVR equipment.
For the specific embodiment of the invention when carrying out video record, video recording environment is it is possible that the sound of some short time is dry
It disturbs, if detecting the sound of the audio characterization at a certain moment during recording a video using the first coding parameter to video
Value is less than preset sound value, just encodes at once according to second encoding parameter to video, and detects in subsequent time
The sound value of audio characterization is greater than preset sound value, then and at once encodes according to the first coding parameter to video, and practical
The video recording of the upper period is all important, requires to record a video to video according to the first coding parameter, at a time examine
The audio measured may receive interference, therefore the video information that will lead to the moment is not able to satisfy actual needs, if it is
Critically important information may will affect evidence obtaining.In addition, monitoring device is also given in the frequent adjustment of coding parameter in video process
Bring biggish load.
In order to more accurately record a video to video, the specific embodiment of the invention, which also needs to record, is more than or less than default sound
The duration of the sound value of the audio characterization of value, and then determine and video is encoded using any coding parameter.
Specifically, as shown in figure 3, acquiring audio and video by the camera of DVR equipment or NVR front equipment end first;
Then, background noise is removed;Then, the sound value that collected audio characterizes is compared with preset sound value, judges sound
Whether the sound value of frequency characterization is greater than preset sound value, if the sound value of audio characterization is greater than preset sound value, record is greater than pre-
If the duration for the sound value that the audio of sound value characterizes, if the duration is greater than default first time threshold, press
Video is encoded according to the first coding parameter, otherwise video is encoded according to current coding parameter;When even continuing
Between when being less than default first time threshold, if being according to the first coding parameter within the duration of the sound value of audio characterization
Video is encoded, then continues to encode video according to the first coding parameter, if in the sound value of audio characterization
It is to be encoded according to second encoding parameter to video in duration, then continues to compile video according to second encoding parameter
Code.Wherein, the size for presetting first time threshold is set according to actual environment and user.
If the sound value of audio characterization is less than preset sound value, record is less than the sound value that the audio of preset sound value characterizes
Duration video is encoded according to second encoding parameter if the duration is greater than default second time threshold,
Otherwise video is encoded according to current coding parameter;When even the duration is less than default second time threshold, if
It is to be encoded according to the first coding parameter to video in the duration of the sound value of audio characterization, then continues according to first
Coding parameter encodes video, if being according to second encoding parameter pair within the duration of the sound value of audio characterization
Video is encoded, then continues to encode video according to second encoding parameter.Wherein, the size of second time threshold is preset
And set according to actual environment and user, preset first time threshold in the specific embodiment of the invention
Size can be equal with the size of default second time threshold, can also be unequal.
Embodiment two:
It is using first that the specific embodiment of the invention, which can also be determined by the variation of video pictures in video record,
Coding parameter still uses second encoding parameter.Specifically, the specific embodiment of the invention passes through DVR equipment or NVR equipment first
The camera of front end acquires audio and video;It is then determined whether collected video changes, if video changes,
Then video is encoded according to the first coding parameter, and saves the video data after coding, otherwise according to second encoding parameter
Video is encoded, and saves the video data after coding.
Specifically, the specific embodiment of the invention two is when determining whether collected video pictures change, Ke Yigen
It is determined according to different standards, such as: detecting that opposite variation occurs for the brightness of video pictures, and this variation is adjacent
It is that when being more than some predetermined luminance value, that is, can determine whether that video pictures are changed between two I frames, here, predetermined luminance value
Specific setting can setting according to actual environment and user.
When it is implemented, in order to more accurately record a video to video, it is also necessary to record changed video pictures with
And the duration of not changed video pictures, and then determine and video is encoded using any coding parameter.
Specifically, as shown in figure 4, acquiring audio and video by the camera of DVR equipment or NVR front equipment end first;
Next, it is determined that whether collected video pictures occur to change relatively, specifically, the bright of the video of two adjacent I frames is detected
Changing value is spent, if the brightness change value is greater than predetermined luminance value, then it is assumed that opposite variation has occurred in video pictures, records the brightness
The duration of changing value, if the duration is greater than default third time threshold, according to the first coding parameter to video into
Row coding, otherwise encodes video according to current coding parameter.Wherein, the size for presetting third time threshold is basis
Actual environment and user's set.
The brightness change value of the video of two adjacent I frames is detected, if the brightness change value is less than predetermined luminance value, is recognized
Do not occur to change relatively for video pictures, record the duration of the brightness change value, if the duration is greater than the default 4th
Between threshold value when, then video is encoded according to second encoding parameter, otherwise video is compiled according to current coding parameter
Code.Wherein, the size for presetting the 4th time threshold is also set according to actual environment and user, of the invention
The size and the size of default 4th time threshold that third time threshold is preset in specific embodiment can be equal, can not also phase
Deng.Certainly, in practical applications, the default first time threshold of the specific embodiment of the invention, default second time threshold, default
Third time threshold and default 4th time threshold can be set to the identical time.
As shown in figure 5, the specific embodiment of the invention additionally provides a kind of video recording equipment of video, comprising:
Acquisition unit 51, for acquiring audio and video;
Video record unit 52, the sound value for characterizing the audio is compared with preset sound value, if the audio
The sound value of characterization is greater than the preset sound value, then encodes according to the first coding parameter to the video, and save volume
Video data after code, otherwise encodes the video according to second encoding parameter, and saves the video data after coding;
Wherein, first coding parameter includes the first code stream value and first resolution value;The second encoding parameter includes second code
Flow valuve and second resolution value;The first code stream value is greater than the second code flow valuve;The first resolution value is greater than described
Second resolution value.
Preferably, the video recording equipment of the video in the specific embodiment of the invention further includes noise removal unit 53, for true
Determine background noise, and removes background noise.
Specifically, the video recording equipment of the video in the specific embodiment of the invention uses DVR equipment or NVR equipment, the equipment
In configured with the components such as gyroscope.DVR equipment or NVR equipment in the specific embodiment of the invention are discussed in detail with reference to the accompanying drawing
The method that video record is carried out to environment locating for vehicle under vehicle-mounted monitoring.
Embodiment three:
The specific embodiment of the invention is introduced for being configured with gyroscope in DVR equipment or NVR equipment.Specifically,
As shown in fig. 6, firstly, audio and video are acquired by the camera of DVR equipment or NVR front equipment end, in acquisition audio and view
While frequency, gyro data is read in real time, judges whether vehicle collides, turns on one's side according to the gyro data of reading.Its
In, the specific embodiment of the invention judges whether vehicle collides according to the gyro data of reading, the specific method turned on one's side with
The prior art is identical, and which is not described herein again.
If collision, rollover has occurred in vehicle at this time, judge DVR equipment or NVR equipment at this time whether according to the first coding
Parameter is encoded, if encoded according to the first coding parameter at this time, directly saves the video data after coding;
If being encoded not in accordance with the first coding parameter at this time, need to adjust coding parameter, so that joining according to the first coding at this time
Number is encoded, and saves the video data after coding.In this way, the abnormal phenomenon if vehicle collides, turns on one's side etc., judge immediately
Present encoding parameter whether be high definition parameter configuration, if not high definition configure, be adjusted to high definition configuration, save high definition
Video directly saves video recording, when unusual condition occurs in vehicle, can also there is the video of high definition if being high definition configuration
To collect evidence.
If collision, rollover do not have occurred for vehicle at this time, remove background noise, the sound value that the audio of acquisition is characterized with
Preset sound value is compared, and judges whether the sound value of audio characterization is greater than preset sound value, if the sound value of audio characterization
Greater than preset sound value, the duration for the sound value that the audio that record is greater than preset sound value characterizes, if the duration is greater than
When default first time threshold, then video is encoded according to the first coding parameter, and saves the video data after coding;It is no
Then video is encoded according to current coding parameter, and saves the video data after coding.
If the sound value of audio characterization is less than preset sound value, record is less than the sound value that the audio of preset sound value characterizes
Duration video is encoded according to second encoding parameter if the duration is greater than default second time threshold,
And save the video data after coding;Otherwise video is encoded according to current coding parameter, and saves the view after coding
Frequency evidence.
The specific embodiment of the invention dynamically adjusts the resolution ratio and code stream when recorded video according to the sound on vehicle
Size illustrates no exceptions phenomenon if very quiet always on vehicle, this section of video can be recorded using low code stream low resolution
Picture and storage;If unexpected sound becomes the noisy or lasting louder sound occurred greater than preset sound value on vehicle, illustrate to occur
Exception adjusts resolution ratio and code stream size, using high code stream high-resolution is recorded a video and stored.In this way, may be used
With the concrete scene according to video recording come the resolution ratio and code stream size when dynamically adjusting recorded video, preferably improves video recording and sets
Standby utilization rate.
Certainly, the specific embodiment of the invention, can also be by judging video pictures when collision, rollover do not have occurred for vehicle
Whether change to determine in video record being using the first coding parameter or using second encoding parameter, specific method
Identical as the embodiment of the present invention two, which is not described herein again.
In conclusion the specific embodiment of the invention provides the kinescope method and equipment of a kind of video, the kinescope method of video
It include: acquisition audio and video;The sound value that audio characterizes is compared with preset sound value, if the sound value of audio characterization
Greater than preset sound value, then video is encoded according to the first coding parameter, and save the video data after coding, otherwise pressed
Video is encoded according to second encoding parameter, and saves the video data after coding;Wherein, the first coding parameter includes first
Code stream value and first resolution value;Second encoding parameter includes second code flow valuve and second resolution value;First code stream value is greater than
Second code flow valuve;First resolution value is greater than second resolution value.Since the specific embodiment of the invention is only in audio characterization
When sound value is greater than preset sound value, just recorded a video using the coding mode of high code flow valuve and high-resolution value, and
When the sound value of audio characterization is less than preset sound value, recorded using the coding mode compared with low code stream value and low resolution value
Picture, compared with prior art, the video recording that the specific embodiment of the invention saves are entirely no longer HD video, can greatly be saved
The space of video recording equipment extends the video time of video recording equipment under conditions of the capacity of video recording equipment is certain, improves video recording and sets
Standby utilization rate.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.