CN104333724A - Alarm video prerecording method for embedded hard disk video recorder - Google Patents

Alarm video prerecording method for embedded hard disk video recorder Download PDF

Info

Publication number
CN104333724A
CN104333724A CN201410694422.3A CN201410694422A CN104333724A CN 104333724 A CN104333724 A CN 104333724A CN 201410694422 A CN201410694422 A CN 201410694422A CN 104333724 A CN104333724 A CN 104333724A
Authority
CN
China
Prior art keywords
file
recording
video
data
prerecording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410694422.3A
Other languages
Chinese (zh)
Other versions
CN104333724B (en
Inventor
戴林
边伟
屈新锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Tiandy Digital Technology Co Ltd
Original Assignee
Tianjin Tiandy Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Tiandy Digital Technology Co Ltd filed Critical Tianjin Tiandy Digital Technology Co Ltd
Priority to CN201410694422.3A priority Critical patent/CN104333724B/en
Publication of CN104333724A publication Critical patent/CN104333724A/en
Application granted granted Critical
Publication of CN104333724B publication Critical patent/CN104333724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Abstract

The invention discloses an alarm video prerecording method for an embedded hard disk video recorder. The alarm video prerecording method comprises the following steps: establishing a prerecording file and a file header as well as an invalid frame before videorecording; writing in prerecording data when videorecording is started, and after the volume of the write-in prerecording data exceeds the capacity of the prerecording file, returning to a position behind the file header and the invalid frame and continuing to start writing-in; and when an alarm signal is received in the prerecording file, establishing an effective prerecording file and an effective file header, and writing in alarm image data into a file system behind the prerecording file in a hard disk. According to the method, videorecording starts after the alarm signal is received and prerecording starts before alarming, prerecording data is repeatedly written in within a segment of data region, effective prerecording data in prerecording time after the alarm is started is stored to the effective prerecording file, and the effective prerecording data start position and the effective prerecording data ending position of the video are updated. Therefore, the video cannot be lost, an I/O interface is lowered, and the problem of repeated copying is avoided.

Description

The warning video recording prerecording method of built-in hard disk video tape recorder
Technical field
The invention belongs to field of video monitoring, be specifically related to a kind of warning video recording prerecording method of built-in hard disk video tape recorder.
Background technology
Embedded device comprises embedded digital video recorder (DVR) (Digital Video Recorder and DVR) equipment, embedded NVR(Network Video Recorder and network hard disk video recorder) equipment and embedded mixed type DVR equipment.
Embedded digital video recorder (DVR) equipment is that one can connecting analog video camera, ball machine etc., and its vision signal of analog acquisition, carry out this locality and export echo, and the embedded type network video equipment that Video coding this locality stores, network real-time video is propagated.
Embedded NVR equipment is that one can connect and net control IPC(Internet Protocol Camra and web camera) front end, the video data transmitted by IPC carries out this locality and stores and forwarded, and decoding shows the equipment of the real time video signals that IPC gathers on the output interface of NVR equipment.
Embedded mixed type DVR equipment is the built-in hard disk video tape recorder equipment of embedded digital video recorder (DVR) and NVR function entirety.
Along with the development of safety precaution, Video Surveillance Industry, the development speed of digital video monitoring is more and more faster, and embedded digital video recorder (DVR) equipment not only traditional in recent years achieves tremendous development, and the new equipment such as embedded NVR, mixed type DVR also arises at the historic moment.The thing followed, because the security requirement of user to video monitoring is more and more higher.
Embedded digital video recorder (DVR), NVR, mixed type DVR the most important thing is recording function.The video recording of embedded digital video recorder (DVR), NVR, mixed type DVR is divided into timing video recording and video recording of reporting to the police, and warning video recording is generally used for and comprises port warning, mobile detection alert, video-losing warning, audio frequency loss alarm, intellectual analysis warning etc.Reporting to the police records a video generally needs pre-record and prolong record, and pre-recording is the thing for the previous period finding warning, and the time of pre-recording is no more than one minute usually, contributes to the reason and the dangerous situation that find warning.Existing pre-recording is establishment file of pre-recording, warning in prerecorded data is copied in video file, but having higher I/O(input/output, input and output) interface time, hard disk can be caused write unsuccessfully, loss record a video.
Summary of the invention
The present invention is in order to above-mentioned technical problem, and the warning video recording prerecording method of a kind of built-in hard disk video tape recorder proposed.
Technical scheme of the present invention is:
The warning video recording prerecording method of built-in hard disk video tape recorder of the present invention, is specially:
Before I video recording, in hard disk, create the file of pre-recording of a fixed capacity, and record this file of pre-recording and start the position of prerecorded data and terminate the position of prerecorded data, to write file header and the invalid frame of a fixed capacity at file start-position of pre-recording simultaneously;
II establishment is pre-recorded after file, when equipment meets video recording condition and starts to record a video, position write prerecorded data after pre-record file file head and invalid frame, and write an I frame index for each I frame of prerecorded data, after the prerecorded data of write exceedes file size of pre-recording, the position after turn back file header and invalid frame continues to start write;
III when receiving alarm signal in file of pre-recording, according to present system time and pre-recording the time, a nearest I frame before finding by I frame index video recording of reporting to the police also is created as file of effectively pre-recording, the effective document head of a fixed capacity is created before this file of effectively pre-recording, and record this file of effectively pre-recording and start the address of effective prerecorded data and terminate the address of effective prerecorded data, write in the file system of warning Video data in hard disk after this file of pre-recording simultaneously;
IV after this effectively pre-records file and warning video data recording, creates a new file of pre-recording in the hard disk after this pre-records file and warning Video data again;
V when not receiving alarm signal in file of pre-recording, then delete this file of pre-recording, and re-creates a new file of pre-recording.
The invention has the beneficial effects as follows:
The present invention did not carry out recording a video before receiving alarm signal, started video recording after receiving alarm signal.Open before warning and pre-record, prerecorded data unconditionally repeatedly writes in one piece of data district, and record I frame index, effective prerecorded data within the time of pre-recording of reporting to the police after starting is saved in effectively pre-records in file, and refresh I frame index data, upgrade effective prerecorded data starting position of video recording and effective prerecorded data end position.Like this namely can not lose video recording, and reduce I/O interface, avoid the problem occurring repeatedly copying.
Accompanying drawing explanation
Fig. 1 is the structural representation of file of pre-recording in hard disk of the present invention;
Fig. 2 is FB(flow block) of the present invention.
Embodiment
Below, with reference to drawings and Examples, the present invention is described in detail:
As shown in Figure 1-2, the warning video recording prerecording method of built-in hard disk video tape recorder of the present invention, is specially:
Before I video recording, in hard disk, create the file of pre-recording of a fixed capacity, and record this file of pre-recording and start the position of prerecorded data and terminate the position of prerecorded data, to write file header and the invalid frame of a fixed capacity at file start-position of pre-recording simultaneously;
II establishment is pre-recorded after file, when equipment meets video recording condition and starts to record a video, position write prerecorded data after pre-record file file head and invalid frame, and write an I frame index for each I frame of prerecorded data, after the prerecorded data of write exceedes file size of pre-recording, the position after turn back file header and invalid frame continues to start write;
III when receiving alarm signal in file of pre-recording, according to present system time and pre-recording the time, a nearest I frame before finding by I frame index video recording of reporting to the police also is created as file of effectively pre-recording, the effective document head of a fixed capacity is created before this file of effectively pre-recording, and record this file of effectively pre-recording and start the address of effective prerecorded data and terminate the address of effective prerecorded data, write in the file system of warning Video data in hard disk after this file of pre-recording simultaneously;
IV after this effectively pre-records file and warning video data recording, creates a new file of pre-recording in the hard disk after this pre-records file and warning Video data again;
V when not receiving alarm signal in file of pre-recording, then delete this file of pre-recording, and re-creates a new file of pre-recording.
The warning video recording prerecording method of described built-in hard disk video tape recorder, when backing up warning Video data, effective prerecorded data is read in the first start address according to file of effectively pre-recording in file of pre-recording and end address, after effective prerecorded data reads, read warning Video data again, and effective prerecorded data and warning Video data are backuped in the file system in hard disk.
The warning video recording prerecording method of described built-in hard disk video tape recorder, when inquiring about playback warning Video data, effective prerecorded data is read in the first start address according to file of effectively pre-recording in file of pre-recording and end address, after effective prerecorded data reads, then reads Normal Alarm Video data.
In the timed task of video file packing and unlatching in DVR/NVR/ mixing DVR picture recording module, certain passage is not had to start video recording and pre-record if detect, and hard disk has enough memory spaces, so creates a file of pre-recording for this passage in its hard-disc storage district.Write empty file head and an invalid frame, the polishing 512K in order to visit data alignment is file record prerecorded data write starting position and the end position of pre-recording.
If when data processing threads detects and has file of pre-recording to meet the condition writing prerecorded data in DVR/NVR/ mixing DVR picture recording module, data are delivered in file of pre-recording and preserve.
Write when pre-recording file, for each I frame writes an I frame index.If pre-recorded, the 64M of file has write full, then start anew to rewrite, and brush off capped I frame index.
If meet packing condition, as amendment audio coding mode, digital channel disconnection etc., then delete file of pre-recording, fall clearly prerecorded data, restart to pre-record.
After alarm signal occurs, data processing threads stops sending prerecorded data.Pre-recording the time simultaneously according to present system time and requirement, calculate distance alarm Video data forward and start a nearest I frame for file of effectively pre-recording, the position of 512K effective document head is calculated forward according to the position of these I frame data, upgrade effective document head, and upgrade effective prerecorded data starting position and the end position of this file of effectively pre-recording.Position write warning Video data simultaneously after this pre-records file, data processing threads is delivered newspaper alert Video data.
When reading warning Video data, read from the file start-position of effectively pre-recording of file of pre-recording, read end of file position of effectively pre-recording, the end position then jumping to file of pre-recording starts alert Video data of reading the newspaper.

Claims (3)

1. a warning video recording prerecording method for built-in hard disk video tape recorder, is characterized in that:
Before I video recording, in hard disk, create the file of pre-recording of a fixed capacity, and record this file of pre-recording and start the position of prerecorded data and terminate the position of prerecorded data, to write file header and the invalid frame of a fixed capacity at file start-position of pre-recording simultaneously;
II establishment is pre-recorded after file, when equipment meets video recording condition and starts to record a video, position write prerecorded data after pre-record file file head and invalid frame, and write an I frame index for each I frame of prerecorded data, after the prerecorded data of write exceedes file size of pre-recording, the position after turn back file header and invalid frame continues to start write;
III when receiving alarm signal in file of pre-recording, according to present system time and pre-recording the time, a nearest I frame before finding by I frame index video recording of reporting to the police also is created as file of effectively pre-recording, the effective document head of a fixed capacity is created before this file of effectively pre-recording, and record this file of effectively pre-recording and start the address of effective prerecorded data and terminate the address of effective prerecorded data, write in the file system of warning Video data in hard disk after this file of pre-recording simultaneously;
IV after this effectively pre-records file and warning video data recording, creates a new file of pre-recording in the hard disk after this pre-records file and warning Video data again;
V when not receiving alarm signal in file of pre-recording, then delete this file of pre-recording, and re-creates a new file of pre-recording.
2. the warning video recording prerecording method of built-in hard disk video tape recorder according to claim 1, it is characterized in that: when backing up warning Video data, effective prerecorded data is read in the first start address according to file of effectively pre-recording in file of pre-recording and end address, after effective prerecorded data reads, read warning Video data again, and effective prerecorded data and warning Video data are backuped in the file system in hard disk.
3. the warning video recording prerecording method of built-in hard disk video tape recorder according to claim 1, it is characterized in that: when inquiring about playback warning Video data, effective prerecorded data is read in the first start address according to file of effectively pre-recording in file of pre-recording and end address, after effective prerecorded data reads, then read Normal Alarm Video data.
CN201410694422.3A 2014-11-27 2014-11-27 The alarm video recording prerecording method of built-in hard disk video tape recorder Active CN104333724B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410694422.3A CN104333724B (en) 2014-11-27 2014-11-27 The alarm video recording prerecording method of built-in hard disk video tape recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410694422.3A CN104333724B (en) 2014-11-27 2014-11-27 The alarm video recording prerecording method of built-in hard disk video tape recorder

Publications (2)

Publication Number Publication Date
CN104333724A true CN104333724A (en) 2015-02-04
CN104333724B CN104333724B (en) 2017-12-08

Family

ID=52408366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410694422.3A Active CN104333724B (en) 2014-11-27 2014-11-27 The alarm video recording prerecording method of built-in hard disk video tape recorder

Country Status (1)

Country Link
CN (1) CN104333724B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141891A (en) * 2015-08-04 2015-12-09 浙江宇视科技有限公司 Alarm-ahead video caching method and device
CN105338279A (en) * 2015-09-28 2016-02-17 中安消物联传感(深圳)有限公司 Control method for video prerecording and alarm system linkage
CN106550203A (en) * 2016-12-07 2017-03-29 高新兴科技集团股份有限公司 A kind of video prerecording method and its application that monitor video is realized based on file cache
CN109639501A (en) * 2018-12-29 2019-04-16 浙江宇视科技有限公司 A kind of exception record information storage means and device
CN109803107A (en) * 2019-01-09 2019-05-24 安徽睿极智能科技有限公司 The embedded file system of multi-medium data and rapid read-write method based on the system
CN111405220A (en) * 2019-09-30 2020-07-10 杭州海康威视系统技术有限公司 Video prerecording method and cloud storage system
CN111447473A (en) * 2020-03-03 2020-07-24 深圳市天视通电子科技有限公司 Alarm video processing method and system
CN112202990A (en) * 2020-09-14 2021-01-08 深圳市百川安防科技有限公司 Video prerecording method, camera and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001292411A (en) * 2000-04-10 2001-10-19 Sony Corp Image data recorder and image data recording method
CN101365088A (en) * 2007-08-10 2009-02-11 深圳市锐明视讯技术有限公司 Hard disc video recording method
CN101729836A (en) * 2009-12-09 2010-06-09 艾默生网络能源有限公司 Method for videoing bottom acquisition device
CN101968967A (en) * 2010-08-04 2011-02-09 深圳英飞拓科技股份有限公司 Prerecording method used for monitoring equipment
CN103369284A (en) * 2012-03-31 2013-10-23 浙江大华技术股份有限公司 Audio video data prerecording method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001292411A (en) * 2000-04-10 2001-10-19 Sony Corp Image data recorder and image data recording method
CN101365088A (en) * 2007-08-10 2009-02-11 深圳市锐明视讯技术有限公司 Hard disc video recording method
CN101729836A (en) * 2009-12-09 2010-06-09 艾默生网络能源有限公司 Method for videoing bottom acquisition device
CN101968967A (en) * 2010-08-04 2011-02-09 深圳英飞拓科技股份有限公司 Prerecording method used for monitoring equipment
CN103369284A (en) * 2012-03-31 2013-10-23 浙江大华技术股份有限公司 Audio video data prerecording method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141891A (en) * 2015-08-04 2015-12-09 浙江宇视科技有限公司 Alarm-ahead video caching method and device
CN105338279A (en) * 2015-09-28 2016-02-17 中安消物联传感(深圳)有限公司 Control method for video prerecording and alarm system linkage
CN106550203A (en) * 2016-12-07 2017-03-29 高新兴科技集团股份有限公司 A kind of video prerecording method and its application that monitor video is realized based on file cache
CN106550203B (en) * 2016-12-07 2019-07-23 高新兴科技集团股份有限公司 A kind of video prerecording method and its application for realizing monitor video based on file cache
CN109639501A (en) * 2018-12-29 2019-04-16 浙江宇视科技有限公司 A kind of exception record information storage means and device
CN109803107A (en) * 2019-01-09 2019-05-24 安徽睿极智能科技有限公司 The embedded file system of multi-medium data and rapid read-write method based on the system
CN111405220A (en) * 2019-09-30 2020-07-10 杭州海康威视系统技术有限公司 Video prerecording method and cloud storage system
CN111405220B (en) * 2019-09-30 2022-07-05 杭州海康威视系统技术有限公司 Video prerecording method and cloud storage system
CN111447473A (en) * 2020-03-03 2020-07-24 深圳市天视通电子科技有限公司 Alarm video processing method and system
CN112202990A (en) * 2020-09-14 2021-01-08 深圳市百川安防科技有限公司 Video prerecording method, camera and electronic equipment
CN112202990B (en) * 2020-09-14 2021-05-11 深圳市睿联技术股份有限公司 Video prerecording method, camera and electronic equipment

Also Published As

Publication number Publication date
CN104333724B (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN104333724A (en) Alarm video prerecording method for embedded hard disk video recorder
CN101867792B (en) Real-time transmission method for video record buffering
CN102456376B (en) Recording and play method for monitoring device
US20110187895A1 (en) Intelligent video compacting agent
CN107093436B (en) Prerecorded audio and video data storage method and device and mobile terminal
CN103226965B (en) Based on the audio/video data access method of time bitmap
CN101729836B (en) Method for videoing bottom acquisition device
CN103369284A (en) Audio video data prerecording method and device
CN104408109B (en) Alarm video recording method for recording and device
CN101237571A (en) A video coding storage method and device in monitoring system
CN104113730A (en) Monitoring method based on audio analysis triggered alarm and video recording
CN102547221A (en) Video recording and network transmitting method based on motion detection
CN103544975B (en) A kind of guard method of vehicle-mounted hard disks
CN114930806A (en) Low light monitoring system using dual video streams
CN202276424U (en) Monitor centralized storing system
CN202334750U (en) High-definition AV (Audio/Video) trial system
CN203520874U (en) Vibration damping effect-improved vehicle-mounted hard disk video recorder apparatus
CN102801946A (en) High-reliability vehicle-mounted video storage device and video storage method
KR102003432B1 (en) Video managing apparatus and method of surveillance systems
CN202759536U (en) Highly reliable vehicle-loaded video storage apparatus and vehicle-loaded video apparatus
CN104333725A (en) Streaming storage equipment of embedded hard disk video and method of streaming storage equipment of embedded hard disk video
JP2009140233A (en) Video recording apparatus and monitoring system
CN201185451Y (en) Miniature apparatus for acquiring digital video
JP2005101904A (en) Recording method of monitor image, and monitor image recording apparatus
JP2007235225A (en) Video storage device and video storage method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 300384 Tianjin City Huayuan Industrial Zone (outer ring road No. 8) two Haitai branch

Applicant after: Tiandi Weiye Technology Co., Ltd.

Address before: 300384 Tianjin city Xiqing District Huayuan new technology Industrial Park (outer ring road No. 8) two Haitai branch

Applicant before: Tianjin Tiandy Digital Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant