iafilatov / hikstract Goto Github PK
View Code? Open in Web Editor NEWExtracts videos recorded by Hikvision IP camera
Extracts videos recorded by Hikvision IP camera
At first, thank you very much for the great script!
But some directories are failed to be processed.
Here is the debug output and the index file.
./hikstract
2018-07-19 11:58:42,743 [15476] DEBUG: Finished loading db: {'cur_datadir': 'datadir0',
'datadirs': {'datadir0': {'cur_section': 1,
'last_vrec': 0,
'revision': 15787},
'datadir1': {'cur_section': 131,
'last_vrec': 1,
'revision': 16269},
'datadir2': {'cur_section': 0,
'last_vrec': -1,
'revision': 15683}}}
2018-07-19 11:58:42,743 [15476] INFO: Entering datadir0
2018-07-19 11:58:42,743 [15476] DEBUG: Making Header at /mnt/transport/vol03/datadir0/index00.bin:0
2018-07-19 11:58:42,744 [15476] DEBUG: cur_sec_idx: 2, rec_sec_num: 186, revision: 14228, total_sec: 2
2018-07-19 11:58:42,744 [15476] INFO: Index revision is 14228
2018-07-19 11:58:42,744 [15476] DEBUG: Making Section at /mnt/transport/vol03/datadir0/index00.bin:500
2018-07-19 11:58:42,744 [15476] DEBUG: end_dt: 2018-02-14 16:14:15, idx: 0, last_vrec_idx: 0, start_dt: 2018-02-14 15:52:02
2018-07-19 11:58:42,744 [15476] DEBUG: Making Section at /mnt/transport/vol03/datadir0/index00.bin:520
2018-07-19 11:58:42,745 [15476] DEBUG: end_dt: 2018-02-22 15:47:50, idx: 1, last_vrec_idx: 0, start_dt: 2018-02-22 15:39:22
2018-07-19 11:58:42,745 [15476] DEBUG: Making CurrentSection at /mnt/transport/vol03/datadir0/index00.bin:30
2018-07-19 11:58:42,745 [15476] DEBUG: end_dt: 1970-01-01 00:00:00, idx: 255, last_vrec_idx: 0, start_dt: 1970-01-01 00:00:00
2018-07-19 11:58:42,745 [15476] DEBUG: Entering section 1
2018-07-19 11:58:42,746 [15476] DEBUG: Making VideoRecord at /mnt/transport/vol03/datadir0/index00.bin:6c40
2018-07-19 11:58:42,746 [15476] DEBUG: duration: 508, end_dt: 2018-02-22 15:47:50, length: 260466216, start_dt: 2018-02-22 15:39:22, start_offset: 0
2018-07-19 11:58:42,746 [15476] DEBUG: Entering section 255
2018-07-19 11:58:42,746 [15476] DEBUG: Making VideoRecord at /mnt/transport/vol03/datadir0/index00.bin:4fcc40
Traceback (most recent call last):
File "./hikstract", line 50, in <module>
run()
File "./hikstract", line 42, in run
parser.update()
File "/home/user/git/hikstract/parser.py", line 32, in update
self.update_datadir(datadir)
File "/home/user/git/hikstract/parser.py", line 61, in update_datadir
next_vrecs = u.islice_from(sec.video_records, next_vrec_idx)
File "/home/user/git/hikstract/items.py", line 104, in video_records
vrec = VideoRecord.make(self._h_idx_file, idx, start)
File "/home/user/git/hikstract/items.py", line 58, in make
fields = struct.unpack(cls.fmt, buf)
struct.error: unpack requires a bytes object of length 80
-- in this case only one video file is created.
index00.bin.gz
What is the index.db file? Is it supposed to be autogenerated from the script? Or am I supposed to get it from the hikvision SD Card?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.