WO2016122540A1 - Encoder - Google Patents
Encoder Download PDFInfo
- Publication number
- WO2016122540A1 WO2016122540A1 PCT/US2015/013573 US2015013573W WO2016122540A1 WO 2016122540 A1 WO2016122540 A1 WO 2016122540A1 US 2015013573 W US2015013573 W US 2015013573W WO 2016122540 A1 WO2016122540 A1 WO 2016122540A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video
- alarm
- frame
- encoding
- encoder
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/87—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving scene cut or scene change detection in combination with video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/142—Detection of scene cut or scene change
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/179—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a scene or a shot
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
Definitions
- IP Internet protocol
- video captured by a video camera may be encoded and streamed over a network for live viewing, stored in a storage location such as on storage provided an internet storage provider, or a combination thereof.
- the example encoding system may include an input 101 to receive video frames.
- the input 101 may be an interface to receive input video from a video source.
- the Input 101 may be an interface to provide a direct connection to a camera, a network interface to receive input video from an IP camera, an interface to connect to a storage to receive stored video footage, or other input video.
- the input video has multiple channels, such as red, green, and blue channels. In these implementations, the input may provide frames of the separate channels to the rest of the system.
- the segment may be identified as an unchanged segment and discarded.
- the threshold condition may be a threshold number between 25% and 35% of the number of pixels in the segment.
- the threshold condition may be provided as a percentage or a raw number as a parameter passed to the system or provided by an administrator.
- the segment selector may cause the encoder to skip segments having an insufficient amount of change to warrant compression. For example, slight changes due to smai! scene changes or slowly varying Sighting changes may be ignored by the encoder.
- Figure 5 illustrates an example coding system 501 including a non-transitory computer readable medium 505 storing instructions executable by a processor 504 to encode video.
- the non-transitory computer readable medium 505 may include memory, storage, or a combination thereof.
- the example system 501 may be an implementation of the systems illustrated in Figures 1 and 2 and may perform the methods illustrated in Figures 3 and 4.
- the example medium 505 may store a second instruction set 508.
- the instruction set 508 may be executable by the processor 504 to obtain a difference frame comprising a difference between a first video frame and a second video frame.
- the difference frame may comprise a difference between a first video frame and a second video frame.
- the processor 504 may execute the instructions 508 to subtract the later video frame from the previous vide frame to obtain the difference frame,
- the instructions set 511 may be further executable by the processor 504 to encode the second video frame using a second encoding method if an alarm is registered.
- the instructions 511 may be executable to continue to encode the difference frame using the first encoding method and to perform the second encoding method in parallel.
- the second encoding method may comprise a motion estimation encoding method, such as H.284 or H.263.
- the processor 504 may further execute the instructions 511 to implement the second encoder 08 of Figure 1 or the second encoder 209 of Figure 2.
- the processor 504 may further execute the instructions 511 to direct the video to a hardware encode to encode the video using the second encoding method.
- the instructions 511 may be further executable by the processor 504 to store the encoded video in a storage 506. In other implementations, the instructions 511 may be further executable by the processor 504 to transmit the encoded video to a destination over a network interface 603 or other output.
- Figure 6 illustrates a second example coding system 601 including a non-transitory computer readable medium 805 storing instructions executable by a processor 604 to encode video and upload the video.
- the non-transitory computer readable medium 605 may include memory, storage, or a combination thereof.
- the example system 801 may be an implementation of the systems illustrated in Figures 1 and 2 and may perform the methods illustrated In Figures 3 and 4.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Encoding video may include receiving a video comprising a sequence of frames. A scene change in the video may be detected. Prior to detecting the scene change, the video may be encoded using a first encoding method. After detecting the scene change, the video may be encoded using a second encoding method.
Description
ENCODER
BACKGROUND
[0001] Some video surveillance systems, such as Internet protocol (IP) camera systems, can send and receive data via a computer network, in these systems, video captured by a video camera may be encoded and streamed over a network for live viewing, stored in a storage location such as on storage provided an internet storage provider, or a combination thereof.
BRIEF DESCRIPTION Of THE DRAWINGS
[0002] Figure 1 illustrates an example encoding system.
[0003] Figure 2 illustrates another example encoding system.
[0004] Figure 3 illustrates an example method of encoding video using multiple encoding methods depending on alarm conditions.
[0005] Figure 4 illustrates, a second example method of encoding video.
[0008] Figure 5 illustrates an example coding system including a non- transitory computer readable medium storing instructions executable by a processor to encode video,
[0007] Figure 8 illustrates a second example coding system including a non-transitory computer readable medium storing instructions executable by a processor to encode video and upload the video,
DETAILED DESCRIPTION OF SPECIFIC EXAMPLES
[0008] Video surveillance systems may produce footage for extended periods of time. For example, video surveillance systems may record video constantly for days or even years at a time. Frequently, areas under surveillance present generally static scenes. For example, an area under surveillance may be unchanging for hours except for lighting changes due to passage of time or changes in weather. However, more rapid changes in a scene may be of interest. For example, a rapid change in a scene may indicate a person entering the scene. Some surveillance video encoders may encode static scenes using a first quality level and changing scenes using second, higher quality level. However, in a video surveillance system, a single encoder
may receive video from multiple different video sources, such as different cameras. Encoding many different video streams may be computationally intensive wit some video encoders, particularly when the same type of encoding techniques, such as use of bi-prediction or motion estimation are used for both static and changing scenes. Furthermore, video surveillance footage may be subject to increased amount of noise, for example because of recording during the night or through the use of inexpensive cameras.
[0009] Implementations of the disclosed technology provide a video encoding system. The encoder may encode video using a first encoding method during normal operations, when the video is of a static or slowly changing scene. The encoder may encode video using a second encoding method during aiarm conditions, when the video is of a rapid or greatly changing scene. A scene change threshold may be configured according to a noise level of the video source, to minimize the number of false alarms due to noise.
Additionally, the encoder may package encoded frames in a file-orientated manner rather than a streaming oriented manner,
I0010J Figure 1 illustrates an example encoding system. In various implementations, the illustrated modules 101-108 may be implemented using hardware, software stored on a non-transitor computer readable medium and executed by a processing system, or a combination thereof .
0011] The example encoding system may include an input 101 to receive video frames. For example, the input 101 may be an interface to receive input video from a video source. For example, the Input 101 may be an interface to provide a direct connection to a camera, a network interface to receive input video from an IP camera, an interface to connect to a storage to receive stored video footage, or other input video. In some implementations, the input video has multiple channels, such as red, green, and blue channels. In these implementations, the input may provide frames of the separate channels to the rest of the system.
|0012] In some implementations, the input 101 may buffer at least a pre- alarm length of video preceding the current frame. For example, the input 101 may include a cache that stores a running length of video. The buffered video
may be used to create an alarm video clip that includes footage occurring before the a!arm. The amount of video cached at the input 101 may be input as a parameter when configuring the system to encode the video. Additionally, in some cases, the system may be used to encode multiple video feeds, and the pre~aSarm length of video may foe different for the different feeds,
[0013] The example system may also include a frame buffer 102, The buffer 102 may store a previous video frame to compare with a current video frame at a difference module 103. After providing the previous video frame to the difference module 103, the buffer 102 may store the current video frame for use in encoding the next video frame.
[001 ] The example system may include the difference module 103. The difference module 103 may compare the previous frame with a current frame to generate a difference frame. For example, each pixel of the difference frame may be value of the current video frame at that pixel location minus the value of the previous video frame at that pixel location. Accordingly, the difference frame may reflect differences between the two frames due to changes in the scene, for example because of motion of objects in the scene or changes in lighting. The difference frame may also reflect differences between the two frames due to noise introduced by the video source.
[001 SJ The example system may also include a segmentation module 104. The segmentation module 104 may divide the difference frame into a plurality of segments. Each of the segments may be a plurality of pixels constituting a subset of the pixels of the difference frame. For example, the segmentation module 104 may divide the difference frame Into a grid of blocks. For example, the module 104 may divide the difference frame into a 10x10 grid of 10Q equal sized blocks. In some implementations, the number of segments may be provided during set-up of the encoder for the video source. For example, increasing the number of segments may improve video quality at the expense of decreased compression ratio and increased computational requirements.
[0016] The example system may include a segment selector 105. The segment selector 105 may identify which segments reflect a sufficient change to
be encoded in the norma! coding process. For each segment, the segment selector 105 may compare each pixel of the segment to an intensity threshold. Pixels having values exceeding the intensity threshold may be regarded as likely representing a scene change between the current frame and the previous frame. Pixels having values less than the intensity threshold may be regarded as iikely representing the result of noise, in some implementations, the intensity threshold may be a function of a noise vaiue of a camera capturing the video frames. For exampie, the intensity threshold may be function of the mean noise intensity of the camera,
|0O17] For each segment, the segment selector 105 may count a number of pixels exceeding the intensity threshold. For exampie, the threshold condition may whether a count of the number of pixels greater than the intensity threshold exceeds a threshold percentage, if the threshold condition is met, the segment may be identified as a changed segment and selected for
compression, li the threshold condition is not met, the segment may be identified as an unchanged segment and discarded. For example, the threshold condition may be a threshold number between 25% and 35% of the number of pixels in the segment. In some implementations, the threshold condition ma be provided as a percentage or a raw number as a parameter passed to the system or provided by an administrator. Accordingly, the segment selector may cause the encoder to skip segments having an insufficient amount of change to warrant compression. For example, slight changes due to smai! scene changes or slowly varying Sighting changes may be ignored by the encoder.
[0018] The example system may also include a first encoder 107, The first encoder 107 may be the encoder 107 used for continuous recording. In some implementations, the first encoder 107 may encode the video by encoding the frame stored in the buffer 102 as a key frame or encoding fhe segments selected by the segment selector 105 as an inter-frame (I frame).
|0019] For example, to encode a key frame, the encoder 107 may receive the frame to be encoded from the buffer 102 and encode frame using an intra-
coding compression method. For example, the encoder 107 may apply JPEG compression to the key frame to produce a compressed key frame.
0020] To encode an I frame, the encoder 107 may compress each selected segment using an inira-coding compression method. For example, the intra-coding compression method may use only information contained within the segment being compressed. In various implementations, a variety of lossless or lossy image compression techniques may be used as the inira-coding compression method. For example, encoder 107 may apply JPEG compression to the segment to produce a compressed segment. In some implementations, the encoder 107 may use default coding parameters for the intra-coding compression method. In other implementations, coding parameters for the encoder 07 may be provided to the system to configure the compression for the video being compressed.
[0021] In some implementations, each compressed segment may be kept as a separate file, such as a separate * jpg file. In these implementations, the encoder 107 may compress the set of compressed selected segments using an archive file compression method to produce a compressed inter-frame file. For example, the encoder 107 may use a compression method such as DEFLATE and produce a *.zip file as the inter-frame file.
0022 T e encoder 107 may include additional information in the inter- frame file. For example, the encoder 107 may include information needed to decode the inter-frame in the file. For example, the encoder 107 may include metadata about the location of each of the compressed segments in the file, resolution of the video, frame rate, decoding parameters, video identification, which player to use, or other decoding information.
[0023] During decoding, the decoder may decompress the inter-frame files, and apply the decoded difference segments to the fast processed frame. If compressed inter-frames are lost, the last processed frame may be different from: the frame used to generate the inter-frame being decompressed, in implementations utilizing key frames, as discussed below, frame loss of any frames following the last received key frame may be ignored by the decoder,
[0024] The example system may also include an aiarm detector 108, The alarm detector 108 may count a number of segments selected by the segment selector 105 and to detect an aiarm condition if the number of segments exceeds an aiarm threshold. For example, the aiarm detector 106 may detect the aiarm condition if more than a threshold percentage of the segments selected. For example, the a!arrn detector 106 may detect the alarm condition if more than 50% of the segments have a registered change.
[0025] In some implementations, the alarm detector 106 may receive a noise value of a camera to capture the video. The alarm detector 106 may use the noise value to determine the alarm threshold. For example, the noise value may be percentage of pixels expected to exceed the intensity threshold as a result of noise. The alarm threshold may then be a constant percentage added to the noise value. For example, the constant percentage may be between 10 and 20%, For example, with a constant of 20%, a noise percentage of 30% may result in an alarm threshold of 50%, while a camera with a noise percentage of 20% may result in an alarm threshold of 40%.
|O026| The alarm detector 106 may direct the system to encode a video clip, such as an alarm clip using a second encoder 108 If the number of changed segments is greater than the alarm threshold. The second encoder 108 may be the encoder 108 used for atypical footage, such as when a person or object enters or is moving within the recorded scene. The second encoder 108 may encode the video using a higher-quality encoding method than the encoder 107. For example, the encoder 108 may employ a block-oriented motion-com ensation -based video compression method using coding parameters provided during system initialization. For example, the encoder 108 may encode the video to produce H.264 or H.263 formatted video. The resulting video clip may have a stand format such that it may be played by standard media players and able to be shared with othe parties, such as law enforcement,
[0027] To encode the video dip, the encoder 108 may obtain the video to be encoded from the input 101. In some implementations, the encoder 108 may obtain the pre-alarm length of video preceding the current frame from the input
01. Additionally, the encoder 108 may obtain a post-alarm length of video following the frame triggering the alarm. Accordingly, if only a single alarm event occurs during the time covered by the clip, the length of the video clip encoded by the encoder 108 may be the sum of the pre-aiarm length and post- alarm length. In some implementations, the post-alarm length may be input as an encoding parameter during system configuration.
[0028] In some implementations, the alarm detector 106 may operate on each received frame to determine whether to continue encoding video using the second encoder 108. If the aiarm detector 108 detects another alarm event white the second encoder 108 is operating, the aiarm detector 08 may trigger the encoder 108 to reset the post-alarm length to run from the subsequent alarm event. Accordingly, the length of the clip encoded by the encoder 108 may be the pre-alarm length plus the video spanning from the first to last aiarm event pius the post-aiarm length. In this example, alarm events within the video spanning the first to !ast aiarm length will occur within the pre-alarm length plus the post alarm length time duration.
00293 Figure 2 illustrates another example encoding system. In various implementations, the illustrated modules 201-212 may be implemented using hardware, software stored on a non-transitor computer readable medium and executed by a processing system, or a combination thereof .
00303 The illustrated system may include an input 201 , buffer 202, difference moduie 204, segmentation module 205, segment selector 206, aiarm detector 207, first encoder 208, and second encoder 209. These modules may operate as described with respect to input 101 , buffer 102, difference module 103, segmentation moduie 104, segment selector 105, alarm detector 106, first encoder 07, and second encoder 108 of Figure 1 , respectively.
00313 Additionally, the system may include a filter module 202. The filter module 202 may receive the video frames from th input and apply a filter to the video frames. The filter module 202 may then provide the filtered video frames to the difference module, in some implementations, the filter module 202 may apply the filters to normalize the video frames prior to analysis. In
implementations where each channel is separately encoded, the filter module
202 may apply filters to the combined image of a!l channels, or to the separate color channels individually.
0032] In some implementations, the filter module 207 may appiy a brightness filter to brighten the images to normalize the histograms of the video frames. For example, the filter module 107 may brighten or darken images as needed to achieve a predetermined mean histogram value. In some
impiementations, the filter module 207 may apply a smoothing filter to smooth the images prior to noise thresholding. The smoothing filter may reduce the effects of noise on the images by decreasing the intensity difference between co-located pixels at successive frames. Additionally, the smoothing filter may reduce the intensity differences within a frame, which may reduce the number of segments selected by the segment selector 205.
£0033} In some impiementations, the system may have multiple operational modes to encode the video. For example, the system may operate in a day mode or a night mode depending on the brightness of the video. For example, the filter module 202, input 201 , or other module may make the determination of which mode to enter. For example, the system may inspect histograms of video frames to determine an average amount of light in the scene. This may allow the system to adapt to unexpected condition changes. For example, by allowing the system to enter night mode during in cloudy weather or when the scene is in shadow. In other implementations, the system may enter different modes based on time of day or outside control signals. In implementations with multiple operational modes, various encoding settings may be adjusted based on the current operational mode. For example, the amount of smoothing applied by the filter module 202 may be lower In a dark mode than in a Sight mode.
| 0343 Additionally , the filter 202 may perform frame rate control. For example, in some cases, different video sources may have their own frame rate configurations. For example, a USB computer camera could have a frame rate of 30 FPS while an IP camera could have a frame rate of 10 FPS. The filter 202 may discard video frames to achieve at most a target frame rate. For example, the filter 202 may monitor the frame rate of the video received through the input
201 and discard frames to achieve the target frame in a homogenous manner during a certain time period, such as a second. In some implementations, the desired frame rate may be obtained as a coding parameter during system initialization. In some implementations, video encoded by the first encoder 208 may have a different frame rate than video encoded by the second encoder 209. Fo example, the fitter 202 may provide a few frames per second, such as 2-3 fps, to the first encoder 208. The filter 202 may provide an increased numbe of frames per second to the second encoder 209. For example, the filter 202 may provide 25 fps to the second encoder. Additionally, as described below, the upioader 21 1 ma modify the target frame rate to work within bandwidth limitations. In particular, the upioader 21 1 may modify the target frame rate for the first encoder 208 and leave the frame rate for the second encoder 209 unchanged.
[0035] In some implementations, the second encoder 209 may receive the video to be encoded into the alarm clip directly from the input 201 . in other implementations, the second encoder 209 may receive the video after processing by the filter 202.
[0036] The system may further include a packager 2 0. The packager 210 may receive encoded video from the first encoder 208. The packager 210 may further package the encoded video into video packages. Addiiionaliy, the packager 210 may include metadata in the video packages, in some
implementations, the metadata may include any information needed to decode the packages without reference to a previous package. For example, for video encoded using the first encoder 208, if the package contains a key frame, the metadata may indicate which file in the package is a key frame. If the package is contains an I frame, the metadata may indicate the locations of the encoded segments within the difference frame corresponding to the ! frame. Additionally, the metadata may indicate resolution of the video, frame rate, decoding parameters, video identification, which p!ayer to use, or other decoding information . Additionally, the metadata may include an indication of whether the second encoder 209 was operating in parallel with the encoded video. For example, the metadata may be an indication of the alarm state of the system at
the time the video was taken, where the alarm state reflects whether the second coder 209 was operating.
0037] The system may further include an upioader 211. The upioader 21 1 may establish a connection 213 with a network connected storage. For example, The upioader 211 may send the video packages from the packager 210 and the alarm clips from the second encoder 209 to a network location for retrieval by a decoder. For example, the yploader 21 may send the video to a cloud storage site, !n some implementations, the upioader 211 may utilize available application programming interfaces (APIs) to send the video to a publicly hosted cloud storage location. Accordingly, the video may be transmitted using standard file transmission protocols and architectures rather than using streaming-specific protocols and architectures.
|0038J In some implementations, the upioader 2 1 may provide different treatment to the video packages from the packager 210 and the alarm dips from the second encoder 209. For example, the upioader 211 may upload the two types of video to different locations on the network connected storage or to different network connected storage sites. For example, the upioader 211 may store a!arm clips in an alarm folder on the storage. The upioader 21 1 may store packages containing standard video packages from the packager 2 0 in a streaming video folder. For example, the aiarm package folder may store alarm clips until they are manually removed or until a first storage threshold is reached. The streaming video fofder may store standard video until they are manually removed or a second storage threshold is reached.
|0039] Additionally, in some implementations, the upioader 211 may provide different treatment to alarm clips and standard packages if the network connection 213 is lost. For example, the upioader 211 may discard the standard packages while the connection 2 3 is lost and resume uploading the video packages when the connection 213 is regained. As discussed above, the decoder may ignore frames !ost because of a lost connection 213 by applying a received I frame to its last successfully decoded frame. The upioader 211 may store alarm clips in a local cache 212 until the connection is reestablished 213, In some implementations, the local cache 212 may have a maximum size. For
example, the system may have a maximum size set as a raw value, as a percentage of available disk space, or as the entire local disk space avaiiable except for a reserved amount of space for system health. When the maximum size is reached, the uploader 211 ma perform different operations based on system configuration. For example, the uploader 211 may begin to remove older alarm clips from the local cache 212 to free up cache space. As another example, the uploader 211 may stop storing new clips in the local cache 212, When the connection is reestablished, the uploader 211 may upload any alarm clips saved in the iocai cache 212.
0040] In some implementations, the uploader 211 may provide feedback to the fiiter 202 or encoder 208 to adapt the video bitrate according to avaiiabie bandwidth constraints. For example, the uploader 21 may act as a network monitor and may adapt the video bitrate to attempt to achieve a desired video bitrate reflecting a desired frame rate and desired image quality, such as G~8G. ff the available upload bandwidth is insufficient to achieve th desired bitrate, the uploader 21 1 may reduce the video bitrate until the bitrate is !ess than then the upload bitrate. If the avaiiabie bandwidth later increases, the uploader 211 may increase the bitrate until the bitrate meets the avaiiabie bandwidth or the desired bitrate is met. For example, the uploader 211 may compare a currently avaiiabie network bandwidth to an upload rate required to upload the video at its current bitrate. If the current bandwidth is insufficient to achieve the required upload rate, the uploader 2 1 may decrease the target frame rate used by the filter 202 or may decrease the image quality of the encoder 202 until the avaiiabie bandwidth is sufficient to meet the upload rate required to transmit the video,
[0041] In some implementations, the uploader 2 1 may first decrease the image quality until a minimum quality is reached. After the minimum quality is reached, the uploader 2 may decrease the target frame rate until a minimum frame rate is reached. In some cases, the uploader 211 may iterativeiy monitor the currently avaiiabie bandwidth. For example, the uploader 2 1 may monitor the currently avaiiabie upload bandwidth each time it uploads a package. At each iteration, the uploader 21 1 may decrease an image quality parameter of
the infra-coding compression method if the current bandwidth is insufficient to achieve the required upioad rate and the image quaiity parameter is greater than a minimum quaiity. For example, the upioader 21 1 may decrease the image quality parameter, such as a Q value for JPEG compression by 1 at each iteration until a minimum value, such as Q-20, is met. Alternatively, at each iteration the upioader 21 1 may decrease the target frame rate if the current bandwidth is insufficient to achieve the target upload rate and the image quality parameter is less than or equal to the minimum quaiity. For example, the upioader 211 may decrease the frame rate by 1 frame per second at each iteration. If the available bandwidth increase, the upioader 21 1 may reverse the process, iteratively increasing the frame rate until the frame rate is at a desired frame rate, and then increasing the image quality until the image quality is at a desired quality level.
[0042] Additionally, if the available upload bandwidth is insufficient to upload alarm clips, the upioader 211 may store the packages in the local cache 212 until they can be uploaded. For exampie, the upioader 21 1 may continue to upload alarm packages over the connection 213 after an alarm period has ended. As another example, the upioader 211 may free up some network bandwidth by discarding packages from the first encoder 208 while there are alarm clips in the local cache 212.
0043 Figure 3 illustrates an example method of encoding video using multiple encoding methods depending on aiarm conditions. For example, the illustrated method may be performed by an encoding system such as the system of Figure 1 or Figure 2.
[0044] The exampie method may include block 301 . Block 301 may include receiving a video comprising a sequence of frames. For example, block
301 may include receiving a video from a video source such as a camera, or from: a preprocessing system such as a system of filters, frame rate controllers, or other pre-processing systems,
0046] The exampie method ma also include block 302, Block 302 may include encoding the video using a first encoding method. For example, block
302 may encoding the video in the manner described with respect to the
operation of the first encoder 107 of Figure 1 or the first encoder 208 of Figure 2. For example, biock 302 may include reducing the frame rate of the received video by discarding frames Biock 302 may furthe include encoding a key frame at a key frame rate by encoding key frames using intra-compression, such as JPEG. Biock 302 may further include encoding t frames between key frames by creating a difference frame between two successive frames, dividing the difference frame into portions, such as blocks, and encoding any blocks having a sufficient number of sufficiently changed pixels.
[0046] The example method ma also include block 303. Block 303 may include detecting a scene change in the video while encoding the video using the first method. In some implementations, block 303 may be performed as described with respect to alarm detector 106 of Figure 1 or aiarm detector 207 of Figure 2. For example, block 303 may include dividing a video frame or a difference frame into portions and counting the number of portions which have a sufficient number of pixels meeting a chang threshold. Block 303 may further include detecting the scene change if the number of changed portions ss greater than an alarm threshold.
[0047] The example method may further include block 304. Biock 304 may include encoding the video using a second encoding method after detecting the scene change. In some implementations, block 304 may be performed as described with respect to the second encoder 108 of Figure 1 or the second encoder 209 of Figure 2. For example, biock 304 may inciude encoding the video using H.284, H.263 or HEVC coding.
[0048] In some cases, block 304 may be performed in parallel with continued performance of block 302. In some implementations, block 302 maybe continued to be performed after detecting a scene change. For example, the system may continuousl record the video using the first encoding method in block 302. In parallel, the system may record alarm clips using the second encoding method in block 304 after detection of scene changes in block 303, [0049] In some implementations, block 304 may inciude encoding the video and a cached pre-alarm length of video using the second encoding method. Block 304 may further include encoding the video using the second
encoding method to include a clip having at ieast an alarm clip time duration. For example, block 305 may include maintaining a counter which countdowns after each frame, in this example, block 303 may continue to be performed while performing blocks 302 and 303 to determine if there are further scene changes, and if so, resetting the counter.
|0G5Q| Figure 4 illustrates a second example method of encoding video. For example, the illustrated method may include performing the method of Figure 3 and may he performed by the encoding systems of Figure 1 or Figure 2.
0051] The example method may include block 401 . Block 401 may tnciude obtaining coding parameters for encoding the video. For example, biock 401 may include obtaining a noise value of a camera that captures the video. Block 401 may further include determining th alarm threshold as a function of the noise value. For example, the noise value may be percentage of pixels expected to exceed the intensity threshold as a result of noise. The alarm threshold may then be a constant percentage added to the noise value. For example, the constant percentage may be between 10 and 20%. For example, with a constant of 20%, a noise percentage of 30% may result in an alarm threshold of 50%, while a camera with a noise percentage of 20% may result in an alarm threshold of 40%.
00523 The example method may further include block 402. Block 402 may include obtaining the video. For example, block 402 may be performed as described with respect to biock 301 . Block 402 may further include obtaining a frame. The frame may comprise a set of pixels, with each pixel having a value. For example, the frame may be a red, green, or blue channel video frame of the video, with each pixel having a red, green, or blue intensity value. As another example, the video may be a grayscale video and the pixel values may be grayscale intensity. As a further example, the frame may be a difference frame created by subtracting the intensities of a video frame from a preceding video frame at each pixel location. The difference frame may therefore have a plurality of pixels having intensities reflecting the difference between the intensities of two successive co-located pixels.
[0053] The example method may further include block 403, Block 403 may include apportioning the frame into a plurality of portions, each portion comprising a subset of the set of pixels. For exampie, block 403 may include dividing the frame into a grid of blocks. For exampie, the number of blocks may be received during block 401 or may be provided during initialization. As an example, block 403 may include dividing the frame into a 10x10 grid of 00 blocks.
[0054] The example method may further include block 404, Block 404 may include evaluating each portion of the plurality of portions created in block 403. For each portion, block 404 may include detecting a change in the portion if a threshold number of pixels have changed by a threshold amount when compared to a preceding frame. For example, block 404 may include detecting a change in the portion when a block of the difference frame has the alarm threshold number of pixels exceeding an intensity threshold. In some implementations, the intensity threshold may be determined according to the noise value obtained in block 401. For example, the intensity threshold may be a constant divided by noise percentage of the camera, such as 10 divided by the noise percentage.
[0055] The example method may further include block 405. Block 405 may include detecting a scene change if the number of changed portions exceeds an alarm threshold. For example, the alarm threshold may be determined as a function of the noise value as described with respect to block 401.
£005$| a scene change is not detected, the method may proceed to block 408. Block 406 may include encoding the video using a first encoding method. For example, block 408 may be performed as described with respect to block 302 of Figure 3.
0057] If a scene change is detected, the method may proceed to block 407 in parallel with block 406. Block 40? may include encoding the video using a second encoding method. For example, block 407 may be performed as described with respect to block 304 of Figure 3,
[0058] The example method may further include block 408, Block 408 may Include packaging the encoded video from block 408 into video packages. In some implementations, block 408 may be performed as described with respect to the operation of the packager 210 of Figure 2, For example, block 408 may include including metadata in the packages. The metadata may indicate locations of the encoded segments within the difference frame, as ei! as other information needed to decode the package data without reference to other packages.
[0059] The example method may further include blocks 409-413. In some implementations, blocks 409-413 may be performed as described with respect to the upioader 21 1 of Figure 2, Block 409 may inciude determining if a connection to a network connected storage location exists, if a connection does exist, the packages and alarm clips may be uploaded to the network connected storage iocation in block 410. If a connection does not exist, then the packages and the alarm clips may be treated differently in block 411. In block 412, packages having video encoded using the first encoding method ma be discarded, in block 413: alarm clips encoded using the second encoding method may be stored in a local cache, in some implementations, block 413 may further include determining if a maximum size for the local cache is reached. If so, block 413 may include discarding the oldest alarm clips first to free space in the local cache.
|0O6O] Figure 5 illustrates an example coding system 501 including a non-transitory computer readable medium 505 storing instructions executable by a processor 504 to encode video. For example, the non-transitory computer readable medium 505 may include memory, storage, or a combination thereof. In some implementations, the example system 501 may be an implementation of the systems illustrated in Figures 1 and 2 and may perform the methods illustrated in Figures 3 and 4.
£0061] The example medium 505 may store a first instruction set 507. The first instructio set 507 may be executable by the processor 504 to receive a video comprising a sequence of video frames. For example, the instructions 507 may be executable by the processor 504 to implement the input 101 of
Figure 1 or the input 201 of Figure 2. For exampie, the instructions 507 may be executable by the processor 504 to receive video from a video source over a video input 502. As another example, the instructions 507 may be executable by the processor 504 to retrieve the video from a storage 506.
[0062] The example medium 505 may store a second instruction set 508. The instruction set 508 may be executable by the processor 504 to obtain a difference frame comprising a difference between a first video frame and a second video frame. The difference frame may comprise a difference between a first video frame and a second video frame. For example, the processor 504 may execute the instructions 508 to subtract the later video frame from the previous vide frame to obtain the difference frame,
[0063] The example medium 505 may store a third instruction set 509. The instruction set 509 may be executable by the processor 504 to divide the difference frame into blocks, each biock comprising a set of pixels. For example, the processor 504 may execute the instructions 509 to implement a
segmentation module such as the segmentation module 104 of Figure 1 or the segmentation module 205 of Figure 2. in some implementations, the instruction set 509 may be executable by the processor 504 to obtain the number of blocks as an input parameter,
[0064] The exampie medium 505 may store a fourth instruction set 510. The fourth instruction set 510 may be executable by the processor 504 to register an alarm if an alarm threshold number of blocks have a threshold number of pixels that meet an intensity threshold. For example, the instructions 510 may be executable by the processor to implement the alarm detector 106 of Figure 1 or the alarm detector 207 of Figure 2,
[0065] The example medium 505 may store a fifth instruction set 511. The instruction set 511 may be executable by the processor 504 to encode the video depending on alarm conditions. The instructions 511 may be executable by the processor 504 to encode the difference frame using a first encoding method if an alarm is not registered. For example, the processor 504 may execute the instructions 511 to implement the first encoder 107 of Figure 1 or the first encoder 208 of Figure 2. Alternatively, the processor 504 may execute
the instructions 51 1 to direct the video to a hardware encoder to encode the video using the first encoding method, in such implementations, the hardware encoder applying the first encoding method may provide the alarm registered by the processor when executing instructions 510, in some implementations, the first encoding method may include compressing any of the blocks having the threshold number of pixels that meet the intensity threshold using an intra- coding compression method.
[0066] The instructions set 511 may be further executable by the processor 504 to encode the second video frame using a second encoding method if an alarm is registered. In this case, the instructions 511 may be executable to continue to encode the difference frame using the first encoding method and to perform the second encoding method in parallel. For example, the second encoding method may comprise a motion estimation encoding method, such as H.284 or H.263. For example, the processor 504 may further execute the instructions 511 to implement the second encoder 08 of Figure 1 or the second encoder 209 of Figure 2. Alternatively, the processor 504 may further execute the instructions 511 to direct the video to a hardware encode to encode the video using the second encoding method. Additionally, the instructions 511 may be executable by the processor 504 to encode a pre-a!arm length of video preceding the second frame if an alarm is registered . The instructions 51 may also be executable by the processor 504 to encode at least a post-alarm length of video following the second frame. If another alarm is registered during the post-alarm length, the processor 504 may extend the video encoding by the post-alarm length from the subsequent alarm.
Accordingly the instructions 51 may be executable by the processor 504 to create an alarm video clip that may be viewed by standard video players, such as players able to pla H.284 or H.263 encoded video.
[0067) In some implementations, the instructions 511 may be further executable by the processor 504 to store the encoded video in a storage 506. In other implementations, the instructions 511 may be further executable by the processor 504 to transmit the encoded video to a destination over a network interface 603 or other output.
[0068] Figure 6 illustrates a second example coding system 601 including a non-transitory computer readable medium 805 storing instructions executable by a processor 604 to encode video and upload the video. For example, the non-transitory computer readable medium 605 may include memory, storage, or a combination thereof. In some implementations, the example system 801 may be an implementation of the systems illustrated in Figures 1 and 2 and may perform the methods illustrated In Figures 3 and 4.
[0089] The example medium 605 may store instructions 607-61 1 - These instructions may be executable by the processor 604 as described with respect to instructions 507-51 1 of Figure 5, respectively. Execution of these instructions may use video input 602, network interface 603, and storage 606 in the manner described with respect to video input 502, network interface 503, and storage 506 of Figure 5, respectively.
[0070] The example medium 606 may store a further instruction set 612. Instruction set 612 may be executable by the processor 604 to package video compressed using the first encoding method Into standard video packages. For example, instruction set 612 may be executable by the processor 602 to implement the packager 210 of Figure 2.
[0071] The example medium 607 may store a further instruction set 613. Instructions set 613 may be executable by the processor 604 to manage the encoded video. For example, the Instructions 613 may be executed by the processor 604 to implement the upioader 211 of Figure 2. In some
implementations, these instructions 612 may be executed by the processor 604 to establish and maintain a connection to a network connected storage location using the network interface 603. Additionally, the instructions 613 may be executed by the processor 604 to store alarm clips while the network connection is lost. For example, the instructions 613 may be executable to discard standard video packages and save alarm clips in a local cache while the connection to the online storage is lost. The instructions 613 may be further executable to transmit the alarm dips to the online storage when the connection is reestablished.
[0072] In the foregoing description, numerous details are set forth to provide an understanding of the subject disclosed herein. However, implementations may be practiced without some or all of these details. Other implementations may include modifications and variations from the details discussed above, it is intended that the appended claims cover such modifications and variations.
Claims
1. An encoding system, comprising:
an input to receive a video comprising a sequence of frames;
a difference module to compare a previous frame with a current frame to generate a difference frame;
a segmentation moduie to segment the difference frame into a plurality of segments, each segment comprising a plurality of pixels;
a segment selector to select segments of the plurality of segments having a threshold number of pixels exceeding an intensity threshold; a first encoder to receive and encode the selected segments;
an alarm detector to count a number of segments selected by the segment selector and to delect an alarm condition if the number of segments exceeds an alarm; threshold;
a second encoder to receive and encode the current frame to produce an alarm clip if the alarm detector detects an alarm condition.
2. The encoding system of claim 1 , wherein the alarm detector is to receive a noise value of a camera to capture the video and to determine the alarm threshold from the noise value.
3. The encoding system of claim 1 , wherein:
the input is to buffer at least a pre~aiarm length of video preceding current frame; and
wherein the second encoder Is to encode the pre-alarm length of video preceding the current frame if the alarm detector detects an alarm condition,
4. The encoding system of claim 1 , further comprising:
a packager to receive encoded video from the first encoder to package the encoded video from the first encoder into video packages, each video package including metadata indicating locations of the encoded
segments within the difference frame.
5. The encoding system of claim 4, further comprising:
an upioader to:
establish a connection with a network connected storage;
upload the alarm clips and the video packages to a network connected storage; and
if the connection to the network connected storage is lost:
discard the video packages, and
store the alarm dips in a local cache until the connection is reestablished.
6. The encoding system of claim 1 , further comprising:
a filter to;
receive the video from the input;
appiy a brightness filter selected according to a brightness measurement of a video frame; and
provide the filtered video frames to the difference module.
7. A method, comprising:
receiving a video comprising a sequence of frames;
detecting a scene change in the video;
prior to detecting the scene change, encoding the video using a first encoding method;
after defecting the scene change, encoding the video using a second encoding method.
8 The method of claim 7, further comprising, after detecting the scene change, encoding the video and a cached pre-aiarm length of video using the second encoding method.
9. The method of claim 7, further comprising encoding the video using the first encoding method after detecting the scene change.
10. The method of claim 7, further comprising:
obtaining a frame, the frame comprising a set of pixels, each pixel having a value;
apportioning the frame into a plurality of portions, each portion comprising a subset of the set of pixels;
for each portion of the plurality of portions, detecting a change in the portion if a threshold number of pixels have changed by a threshold amount when compared to a preceding frame:
detecting the scene change if a number of changed portions exceeds an alarm threshold.
11. The method of claim 10, further comprising:
obtaining a noise value of a camera that captures the video;
determining the alarm threshold as a function of the noise value.
12. The method of claim 7, further comprising:
packaging the encoded video encoded using the first encoding method into video packages;
determining if a connection to a network connected storage location exists;
if the connection does not exist, discarding video packages and storing video encoded using the second encoding method in a local cache.
13. A non-transitory computer readable medium storing instructions executable by a processo to:
receive a video comprising a sequence of video frames;
obtain a difference frame comprising a difference between a first video frame and a second video frame;
divide the difference frame into blocks, each block comprising a set of pixels;
register an alarm if an alarm threshold number of blocks have a threshold number of pixels that meet an intensity threshold;
if an aiarm is not registered, encode the difference frame using a first encoding method;
if an alarm is registered, encode the second video frame using a second encoding method.
14. The non-transitory computer readable medium of claim 13, wherein the alarm ihreshold number and the intensity threshold are determined from a noise level of a source of the video.
15. The non-transitory computer readable medium of claim 13, further comprising instructions executable by the processor to:
package video compressed using the first encoding method into video packages;
while a connection to an online storage is lost, discard video packages and save video encoded using the second encoding method in a local cache.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013573 WO2016122540A1 (en) | 2015-01-29 | 2015-01-29 | Encoder |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/US2015/013573 WO2016122540A1 (en) | 2015-01-29 | 2015-01-29 | Encoder |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016122540A1 true WO2016122540A1 (en) | 2016-08-04 |
Family
ID=56543963
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2015/013573 Ceased WO2016122540A1 (en) | 2015-01-29 | 2015-01-29 | Encoder |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2016122540A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113873250A (en) * | 2021-08-25 | 2021-12-31 | 西安万像电子科技有限公司 | Data processing method, data processing device, nonvolatile storage medium and processor |
| CN119135847A (en) * | 2024-11-08 | 2024-12-13 | 深圳市小鹰视界智能有限公司 | A mobile terminal remote control monitoring system and method |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5956424A (en) * | 1996-12-23 | 1999-09-21 | Esco Electronics Corporation | Low false alarm rate detection for a video image processing based security alarm system |
| US6430222B1 (en) * | 1998-08-31 | 2002-08-06 | Sharp Kabushiki Kaisha | Moving picture coding apparatus |
| US20060133480A1 (en) * | 2004-12-17 | 2006-06-22 | Quanta Computer Inc. | System and method for video encoding |
| US20060239645A1 (en) * | 2005-03-31 | 2006-10-26 | Honeywell International Inc. | Event packaged video sequence |
| US20120194542A1 (en) * | 2011-01-31 | 2012-08-02 | Fujitsu Limited | Information processing apparatus and image display method |
-
2015
- 2015-01-29 WO PCT/US2015/013573 patent/WO2016122540A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5956424A (en) * | 1996-12-23 | 1999-09-21 | Esco Electronics Corporation | Low false alarm rate detection for a video image processing based security alarm system |
| US6430222B1 (en) * | 1998-08-31 | 2002-08-06 | Sharp Kabushiki Kaisha | Moving picture coding apparatus |
| US20060133480A1 (en) * | 2004-12-17 | 2006-06-22 | Quanta Computer Inc. | System and method for video encoding |
| US20060239645A1 (en) * | 2005-03-31 | 2006-10-26 | Honeywell International Inc. | Event packaged video sequence |
| US20120194542A1 (en) * | 2011-01-31 | 2012-08-02 | Fujitsu Limited | Information processing apparatus and image display method |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113873250A (en) * | 2021-08-25 | 2021-12-31 | 西安万像电子科技有限公司 | Data processing method, data processing device, nonvolatile storage medium and processor |
| CN119135847A (en) * | 2024-11-08 | 2024-12-13 | 深圳市小鹰视界智能有限公司 | A mobile terminal remote control monitoring system and method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9756348B2 (en) | Method, device and system for producing a merged digital video sequence | |
| US10284877B2 (en) | Video encoder | |
| US11557185B2 (en) | Image processing method | |
| US10277901B2 (en) | Encoding a video stream having a privacy mask | |
| KR101960006B1 (en) | Video encoding method and video encoder system | |
| US11477459B2 (en) | Image processing device, a camera and a method for encoding a sequence of video images | |
| US10616498B2 (en) | High dynamic range video capture control for video transmission | |
| US20150249829A1 (en) | Method, Apparatus and Computer Program Product for Video Compression | |
| JP6396397B2 (en) | Bit rate controller and output bit rate limiting method | |
| TW202220452A (en) | Method and image-processing device for video processing | |
| CN112351280A (en) | Video coding method and device, electronic equipment and readable storage medium | |
| WO2016122540A1 (en) | Encoder | |
| CA2972520C (en) | Systems and methods for adjusting the frame rate of transmitted video based on the level of motion in the video | |
| US12003744B2 (en) | Hierarchical surveilance video compression repository | |
| US11716475B2 (en) | Image processing device and method of pre-processing images of a video stream before encoding | |
| JP6678525B2 (en) | Imaging device and imaging method | |
| US20250024054A1 (en) | Video data processing technology for reducing transmission bandwidth | |
| KR20240085151A (en) | Video failover recording | |
| US20180070098A1 (en) | Encoding apparatus, decoding apparatus, and image processing system | |
| CA2885198A1 (en) | Method, apparatus and computer program product for video compression |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15880436 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15880436 Country of ref document: EP Kind code of ref document: A1 |