CN111797060A - Offline video recording method, device and equipment and computer readable storage medium - Google Patents

Offline video recording method, device and equipment and computer readable storage medium Download PDF

Info

Publication number
CN111797060A
CN111797060A CN202010929607.3A CN202010929607A CN111797060A CN 111797060 A CN111797060 A CN 111797060A CN 202010929607 A CN202010929607 A CN 202010929607A CN 111797060 A CN111797060 A CN 111797060A
Authority
CN
China
Prior art keywords
file
video
time stamp
timestamp
offline
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
CN202010929607.3A
Other languages
Chinese (zh)
Other versions
CN111797060B (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.)
Hangzhou Mirui Technology Co ltd
Original Assignee
Hangzhou Meari 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 Hangzhou Meari Technology Co Ltd filed Critical Hangzhou Meari Technology Co Ltd
Priority to CN202010929607.3A priority Critical patent/CN111797060B/en
Publication of CN111797060A publication Critical patent/CN111797060A/en
Application granted granted Critical
Publication of CN111797060B publication Critical patent/CN111797060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses an offline video recording method, which comprises the steps of receiving a video recording file, and creating an index file corresponding to the video recording file; writing the system time stamp of the video file into the index file, and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp; when the networking time correction is successful, acquiring a networking timestamp; calculating to obtain an actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-to-receive-file real time stamp and a file reception end real time stamp; adding the actual timestamp to the index file; the offline video recording method can effectively solve the problem that the equipment cannot record video in an offline scene, does not need manual operation, and is convenient and rapid. The application also discloses an offline video recording device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Offline video recording method, device and equipment and computer readable storage medium
Technical Field
The present application relates to the field of multimedia technologies, and in particular, to an offline video recording method, and an offline video recording apparatus, an offline video recording device, and a computer-readable storage medium.
Background
With the development of mobile communication and multimedia technology, consumers are using more and more monitoring devices such as IP cameras and consumer cameras in life. However, in the products of the smart home camera, many products only provide the function of starting video recording after the networking activation is successful, and there is a problem that video recording is not performed until the network timing is performed, so that the products cannot be used in a scene without a network.
In the related technical scheme, one is to adopt a button cell and an external RTC clock circuit to realize the function of continuous timing, but the realization mode can cause the increase of extra cost and greatly reduce the competitiveness of the product; the other method is to connect the mobile phone to the equipment hotspot and then perform equipment timing to realize the video recording function, but the realization mode needs manual intervention and has a complex realization process.
Therefore, how to effectively solve the problem that the device cannot record video in the offline scene is a problem to be urgently solved by the technical staff in the field.
Disclosure of Invention
The offline video recording method can effectively solve the problem that equipment cannot record video in an offline scene, does not need manual operation, and is convenient and quick; another object of the present application is to provide an offline video recording apparatus, an offline video recording device and a computer-readable storage medium, which also have the above-mentioned advantages.
In a first aspect, the present application provides an offline video recording method, including:
receiving a video file, and creating an index file corresponding to the video file;
writing the system time stamp of the video file into the index file, and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
when the networking time correction is successful, acquiring a networking timestamp;
calculating to obtain an actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-reception-file real time stamp and a file reception end real time stamp;
adding the actual timestamp to the index file.
Preferably, the receiving the video file includes:
receiving each video clip file;
writing each video clip file into a preset folder to generate the video file; and the video clip files in the preset folder are stored in sequence according to the writing time sequence.
Preferably, the offline video recording method further includes:
and when the number of the video clip files in the preset folder reaches a preset number, creating a new folder for storing the video clip files, and generating new video files until all the video clip files are stored.
Preferably, after the writing the index file into the video file, the method further includes:
storing the video files written in the index file to a preset root directory; and the video files under the preset root directory are stored in sequence according to the writing time sequence.
Preferably, the offline video recording method further includes:
and under the preset root directory, calculating the actual time stamp of each video file according to the sequence from back to front.
Preferably, the offline video recording method further includes:
and adding the same universal unique identification code for all video files of the current offline video and the index file corresponding to each video file.
Preferably, the offline video recording method further includes:
and inquiring the video file according to the actual time stamp.
In a second aspect, the present application further discloses an offline video recording apparatus, including:
the index file creating module is used for receiving the video files and creating the index files corresponding to the video files;
the index file storage module is used for writing the system time stamp of the video file into the index file and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
the networking time correcting module is used for acquiring a networking timestamp when the networking time correction is successful;
the time stamp calculation module is used for calculating and obtaining the actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-reception-file real time stamp and a file reception end real time stamp;
and the index file updating module is used for adding the actual time stamp to the index file.
In a third aspect, the present application further discloses an offline video recording device, including:
a memory for storing a computer program;
a processor for executing said computer program to implement the steps of any of the off-line video recording methods as described above.
In a fourth aspect, the present application further discloses a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to implement the steps of any of the offline video recording methods as described above.
The offline video recording method comprises the steps of receiving a video recording file, and creating an index file corresponding to the video recording file; writing the system time stamp of the video file into the index file, and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp; when the networking time correction is successful, acquiring a networking timestamp; calculating to obtain an actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-reception-file real time stamp and a file reception end real time stamp; adding the actual timestamp to the index file.
Therefore, the offline video recording method provided by the application can be used for normally recording under the offline condition to obtain the video file and recording the related timestamp information when the video file is stored, so that the actual timestamp of the video file can be determined through the timestamp calculation method after networking, the time calibration of the video file is completed, the problem that the equipment cannot record video under the offline condition is solved, the accuracy of the time information of the video file can be further ensured, in addition, the implementation mode has no extra cost increase, the implementation process is simple, manual operation is not needed, and the method is convenient and fast.
The offline video recording device, the offline video recording equipment and the computer-readable storage medium provided by the application all have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a schematic flow chart of an offline video recording method according to the present application;
fig. 2 is a schematic structural diagram of an offline video recording system provided in the present application;
fig. 3 is a schematic structural diagram of an offline video recording apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an offline video recording apparatus provided in the present application.
Detailed Description
The core of the application is to provide an offline video recording method, the offline video recording method can more effectively solve the problem that equipment cannot record video in an offline scene, manual operation is not needed, and the method is convenient and rapid; another core of the present application is to provide an offline video recording apparatus, an offline video recording device and a computer-readable storage medium, which all have the above-mentioned advantages.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of an offline video recording method according to the present application, where the offline video recording method includes:
s101: receiving a video file, and creating an index file corresponding to the video file;
the step aims to realize the creation of an index file corresponding to a video file, wherein the video file is image data acquired by video equipment, the index file is used for storing metadata corresponding to the video file, and the specific content of the index file comprises but is not limited to the following information such as a system timestamp and file duration. The video files are in one-to-one correspondence with the index files, namely each video file has the corresponding index file, so that the timestamp calibration function and the later file query function are conveniently realized.
As a preferred embodiment, receiving the video file may include: receiving each video clip file; writing each video clip file into a preset folder to generate a video file; and the video clip files under the preset folder are sorted and stored according to the writing time sequence.
Due to the limitation of file size, in order to realize fast file query, the video files may be set to exist in the form of a plurality of video clip files, that is, each video file is composed of a plurality of video clip files, and the video clip files may be video frames. Specifically, when the video recording device performs video recording, a plurality of video recording segment files may be generated and sequentially sent to a preset folder for storage, where the preset folder is a folder pre-established in a storage medium for storing the video recording files, and all the video recording segment files in the preset folder constitute one video recording file, that is, one preset folder corresponds to one video recording file. Further, in order to facilitate later file query, the video clip files in the preset folder may be sorted and stored according to the writing time sequence thereof, and it can be understood that the writing time sequence is the sequence in which the video clip files are written into the preset folder, and corresponds to the generation sequence of the video clip files, that is, the video recording time sequence.
As a preferred embodiment, the offline video recording method may further include: and when the number of the video clip files in the preset folder reaches the preset number, creating a new folder for storing the video clip files, and generating new video files until all the video clip files are stored.
Similarly, due to the limitation of file size, in order to facilitate fast file query, one folder may not store all video data, and in this case, a new folder may be created to store the video clip files, that is, to store the obtained video data in the form of a plurality of video files. For example, 50 video segment files can be stored in the preset folder, but the actual video data has 80 video segment files, and at this time, the first 50 video segment files need to be stored in the preset folder in a time sequence, and the last 30 video segment files need to be stored in a newly established folder in a time sequence, so far, two video files are generated. Of course, since the video files correspond to the index files one by one, when the folder is created, the corresponding index file needs to be created and the corresponding system timestamp information needs to be stored. In addition, the value of the preset number is not unique and can be set according to actual requirements, and the method is not limited in the application.
It should be noted that, the implementation of the technical scheme is not affected by each video clip file, the size of each video file, and the number of video files in each preset folder, and may be set by a technician according to an actual situation, which is not limited in this application.
S102: writing the system time stamp of the video file into the index file, and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
specifically, after the index file is created, the metadata of the video file corresponding to the index file may be written into the index file, where the metadata is the system timestamp, and of course, the metadata may also include information such as a file duration and a file name of the video file, and is not limited to the system timestamp. It can be understood that, because of offline video recording, the system timestamp refers to a system relative timestamp, that is, the number of milliseconds from the start of the system to the current time, and specifically may include a file system receiving timestamp and a file receiving end system timestamp, that is, a time node at which the video file starts to be received under the offline video recording condition and a time node at which the video file is completely received. Further, the index file is written into the video file for later file query and timestamp calibration, and it can be understood that the index file is stored under the video file together with each video clip file in the video file.
Furthermore, for the convenience of performing more detailed video data query in the later stage, for the storage mode of storing the video files in the form of the video clip files, when the system timestamps of the video files are recorded, the system timestamps of the video clip files in the video files can be recorded more specifically, that is, the system timestamps of the video clip files are written into the index file, and the system timestamps of the video clip files also include the system timestamp of the received clip file and the system timestamp of the received clip file.
As a preferred embodiment, after writing the index file into the video file, the method may further include: storing the video files written in the index file to a preset root directory; and the video files under the preset root directory are sorted and stored according to the writing time sequence.
The storage of the respective video files in the storage medium may be performed in the order of the writing time. Specifically, a root directory may be created in the storage medium, where the root directory is used to implement query of all video files, and each time a video file is generated, the root directory is written into the root directory. Of course, regarding the storage of the video files and the video clip files, the storage order may not be set, but the implementation manner of firstly sorting the video files or the video clip files and then inquiring the files may be adopted in the file inquiry.
S103: when the networking time correction is successful, acquiring a networking timestamp;
s104: calculating to obtain an actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-to-receive-file real time stamp and a file reception end real time stamp;
the above steps are intended to implement a timestamp calibration function to obtain the actual timestamp of the video file. Specifically, since the above-mentioned S101 and S102 are video recordings performed in an off-line state, the time information of each video recording file is only the system relative time, not the actual time, and therefore, when the networking signal is received and the networking time correction is successful, the timestamp calibration can be carried out, firstly, the current timestamp after the networking time correction is successful is obtained, i.e., the above-mentioned networking time stamp, and further calculate the actual time stamp of each video file according to the system time stamp and the networking time stamp in the index file, it can be understood that, since the networking time calibration is successful at this time, the actual timestamp refers to the absolute timestamp of the system, i.e., the number of milliseconds after the system is calibrated compared with the number of milliseconds of 1970-01-010: 0:0, specifically may include a file reception start actual time stamp and a file reception end actual time stamp, namely, the time node for starting to receive the video file under the networking condition and the time node for finishing receiving the video file.
The specific calculation process of the actual timestamp may include: for the offline state and the networking state, the difference between the networking timestamp and the file receiving end system timestamp is equal to the difference between the file receiving start actual timestamp and the file receiving start system timestamp, so that a first difference between the networking timestamp and the file receiving end system timestamp is calculated first, the sum of the first difference and the file receiving start system timestamp is further calculated to obtain the file receiving start actual timestamp, a second difference between the file receiving end system timestamp and the file receiving start system timestamp is calculated, the sum of the second difference and the file receiving start actual timestamp is calculated finally to obtain the file receiving end actual timestamp, and thus, the calculation of the file receiving start actual timestamp and the file receiving end actual timestamp is completed, that is, the calculation of the actual timestamp is completed.
Furthermore, for the convenience of performing more detailed video data query in the later stage, for the storage mode of storing the video files in the form of the video clip files, when calculating the actual timestamps of the video files, the actual timestamps of the video clip files in the video files can be recorded more specifically, that is, the actual timestamps of the video clip files are also written into the index file, and the actual timestamps of the video clip files also include the actual timestamp of the received clip file and the actual timestamp of the received clip file.
As a preferred embodiment, the offline video recording method may further include: and under the preset root directory, calculating the actual time stamp of each video file according to the sequence from back to front.
Because the number of the video files under the preset root directory is not unique, the timestamp calibration needs to be carried out on all the video files under the preset root directory, and further, in order to ensure the accuracy of the time information after the calibration, the timestamp calibration can be completed by traversing all the video files in the sequence from back to front, so that the method is rapid and accurate.
S105: the actual timestamp is added to the index file.
This step aims at realizing the update of index file, will calculate the actual time stamp that obtains and add to index file, and at this moment, including the system time stamp and the actual time stamp of corresponding video file in the index file simultaneously, from this, no matter be ideal state or networking state, all can convenient and fast's realization file inquiry.
As a preferred embodiment, the offline video recording method may further include: adding the same universal unique identification code (UUID) to all video files of the current offline video and the index files corresponding to all the video files.
The preferred embodiment aims to realize the identification setting of the video files, and specifically, the same UUID is added to all the video files of the current offline video and the index files corresponding to the video files, so as to ensure the integrity of offline video data each time and avoid the confusion of the video data during multiple offline videos. In other words, when the device restarts to perform offline recording again, the device belongs to a new offline recording, and a new UUID needs to be set for newly obtained video data.
As a preferred embodiment, the offline video recording method may further include: and inquiring the video file according to the actual time stamp.
The preferred embodiment aims to realize the video file query function, and in a networking state, a target video file, namely a video file required by a user, can be queried by directly traversing the actual timestamp of an index file in the video file. Of course, in the offline state, the target video file can be queried by directly traversing the system timestamp under the index file in the video file.
Therefore, the offline video recording method provided by the application can be used for normally recording under the offline condition to obtain the video file and recording the related timestamp information when the video file is stored, so that the actual timestamp of the video file can be determined through the timestamp calculation method after networking, the time calibration of the video file is completed, the problem that the equipment cannot record video under the offline condition is solved, the accuracy of the time information of the video file can be further ensured, in addition, the implementation mode has no extra cost increase, the implementation process is simple, manual operation is not needed, and the method is convenient and fast.
On the basis of the above embodiments, the embodiments of the present application provide a more specific offline video recording method.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an offline video recording system provided in the present application, where the ideal video recording system mainly includes a video index management task module, a video code stream write task module, and a video code stream control task module, where the video index management task module is mainly used to create, generate, and store an index file corresponding to a video file, the video code stream control task module is mainly used to obtain the video file, and the video code stream control task module is mainly used to store the video file.
Based on the offline video recording system, the offline video recording method provided by the embodiment of the application has the following specific implementation flow:
1. creating a video folder:
(1) entering a root directory related to the video under the storage medium, or creating the root directory related to the video under the storage medium;
(2) generating a UUID value which is different after each restart;
(3) creating a folder under a video root directory: the method comprises the steps of < GLOBAL _ RECORD _ DIR _ SEQ > - < UUID >, wherein GLOBAL _ RECORD _ DIR _ SEQ is a shaping character string which can be 16-system or 10-system and is a creation sequence number of video files for realizing the sequencing and grouping of the video files; the UUID is the same as the UUID in the step (2); of course, the file name may also incorporate some additional information, such as the device ID, etc.
2. Writing the video clip file and updating the index file:
(1) creating a video clip file under a video folder: the method comprises the steps of < GLOBAL _ RECORD _ FILE _ SEQ > - < UUID >. subfix, wherein the GLOBAL _ RECORD _ FILE _ SE is a shaping character string which can be 16-system or 10-system and is a creation sequence number of a video clip FILE, and is used for realizing the sequencing and continuity check of the video clip FILE; the UUID is the same as that in 1- (2); subfix is a suffix to video, such as MP 4; similarly, other additional information may be added to the file name;
(2) updating the index file under the video folder: bin, if not present, created; writing the file name of the video file folder, a system relative timestamp (corresponding to the system timestamp), a reserved system absolute timestamp (corresponding to the actual timestamp) and a reserved file duration into the index file, wherein the system absolute timestamp is filled to be 0 when the time is not corrected;
3. switching a new video folder and updating the meta information in the index file:
(1) writing the video clip files into corresponding video clip folders, and when the video clip files under the video clips are full, creating a new video clip, a new video clip folder and a new index file thereof until all video data are written;
(2) and finishing the storage of the video clip files in the video file folder according to the preset video duration or file size, namely determining whether a new video file folder needs to be switched or not, and updating the meta information in the index file after the new video file folder is switched.
4. Calibrating the time stamp:
when the equipment is networked successfully and can perform time correction, traversing all index files from back to front, calculating a system absolute timestamp T0= S0+ (T1-S1) (file actual receiving start timestamp) when the video files are received and a system absolute timestamp T2= T0+ (S1-S0) (file actual receiving end timestamp) when the video files are received according to a system relative timestamp S0 (file system receiving start timestamp), a current system absolute timestamp T1 (networking timestamp) and a current system relative timestamp S1 (file receiving end system timestamp) recorded in the index files, and adding T0 and T2 to the index files, namely updating the reserved system absolute timestamps, so as to perform time retrieval in the subsequent time.
5. Video file query:
(1) scanning a video root directory to obtain all video folder names, and sequencing the video folder names from small to large (namely sequencing the video folders according to a writing time sequence);
(2) according to the timestamp information in the index file, a user can check the video file by taking out the SD card, and can also check the video file after the equipment is successfully activated through networking.
Therefore, the offline video recording method provided by the embodiment of the application can be used for normally recording under the offline condition to obtain the video file and recording the related timestamp information when the video file is stored, so that the actual timestamp of the video file can be determined through the timestamp calculation method after networking, the time calibration of the video file is completed, the problem that the equipment cannot record video under the offline condition is solved, the accuracy of the time information of the video file can be further ensured, the implementation mode is free of additional cost increase, the implementation process is simple, manual operation is not needed, and the method is convenient and fast.
To solve the above technical problem, the present application further provides an offline video recording apparatus, please refer to fig. 3, where fig. 3 is a schematic structural diagram of the offline video recording apparatus provided in the present application, and the offline video recording apparatus may include:
the index file creating module 1 is used for receiving the video files and creating index files corresponding to the video files;
the index file storage module 2 is used for writing the system time stamp of the video file into the index file and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
the networking time correcting module 3 is used for acquiring a networking timestamp when the networking time correction is successful;
the time stamp calculating module 4 is used for calculating and obtaining the actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-to-receive-file real time stamp and a file reception end real time stamp;
and an index file updating module 5, configured to add the actual timestamp to the index file.
It is thus clear that the off-line video recording device that this application embodiment provided normally records a video in order to obtain the video file under the off-line condition, and record relevant timestamp information when saving the video file, from this, can confirm the actual timestamp of the video file through the method of timestamp calculation after the networking, the time calibration of accomplishing the video file, the problem that the equipment can't record a video under the off-line condition has not only been solved, can further guarantee the accuracy of video file time information, and this kind of implementation does not have extra cost to increase, and the implementation process is simple, need not manual operation, convenient and fast.
As a preferred embodiment, the offline video recording apparatus further includes a video file receiving module, configured to receive each video clip file; writing each video clip file into a preset folder to generate a video file; and the video clip files under the preset folder are sorted and stored according to the writing time sequence.
As a preferred embodiment, the offline video recording apparatus may further include a video clip file storage module, configured to create a new folder for storing the video clip files when the number of the video clip files in the preset folder reaches the preset number, and generate a new video file until all the video clip files are stored.
As a preferred embodiment, the offline video recording apparatus may further include a video file storage module, configured to store the video file written in the index file to a preset root directory after the index file is written in the video file; and the video files under the preset root directory are sorted and stored according to the writing time sequence.
As a preferred embodiment, the offline video recording apparatus may further include a video file traversal module, configured to calculate, under the preset root directory, the actual time stamps of the video files in a sequence from the back to the front.
As a preferred embodiment, the offline video recording apparatus may further include an identifier setting module, configured to add the same universal unique identifier to all video files of the current offline video recording and the index file corresponding to each video file.
As a preferred embodiment, the offline video recording apparatus may further include a video file query module, configured to query the video file according to the actual timestamp.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above technical problem, the present application further provides an offline video recording apparatus, please refer to fig. 4, where fig. 4 is a schematic structural diagram of the offline video recording apparatus provided in the present application, and the offline video recording apparatus may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the above-described offline video recording methods.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the steps of any of the above offline video recording methods.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. An off-line video recording method, comprising:
when a video file is received, creating an index file corresponding to the video file;
writing the system time stamp of the video file into the index file, and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
when the networking time correction is successful, acquiring a networking timestamp;
calculating to obtain an actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-reception-file real time stamp and a file reception end real time stamp;
adding the actual timestamp to the index file.
2. The offline video recording method according to claim 1, wherein said receiving a video file comprises:
receiving each video clip file;
writing each video clip file into a preset folder to generate the video file; and the video clip files in the preset folder are stored in sequence according to the writing time sequence.
3. The offline video recording method according to claim 2, further comprising:
and when the number of the video clip files in the preset folder reaches a preset number, creating a new folder for storing the video clip files, and generating new video files until all the video clip files are stored.
4. The offline video recording method according to claim 1, wherein after said writing said index file into said video recording file, further comprising:
storing the video files written in the index file to a preset root directory; and the video files under the preset root directory are stored in sequence according to the writing time sequence.
5. The offline video recording method according to claim 4, further comprising:
and under the preset root directory, calculating the actual time stamp of each video file according to the sequence from back to front.
6. The offline video recording method according to any one of claims 1 to 5, further comprising:
and adding the same universal unique identification code for all video files of the current offline video and the index file corresponding to each video file.
7. The offline video recording method according to claim 1, further comprising:
and inquiring the video file according to the actual time stamp.
8. An off-line video recording apparatus, comprising:
the index file creating module is used for receiving the video files and creating the index files corresponding to the video files;
the index file storage module is used for writing the system time stamp of the video file into the index file and writing the index file into the video file; wherein the system timestamp comprises a start-of-reception file system timestamp and a file reception end system timestamp;
the networking time correcting module is used for acquiring a networking timestamp when the networking time correction is successful;
the time stamp calculation module is used for calculating and obtaining the actual time stamp of the video file according to the system time stamp and the networking time stamp; wherein the real time stamp includes a start-reception-file real time stamp and a file reception end real time stamp;
and the index file updating module is used for adding the actual time stamp to the index file.
9. An offline video recording device, comprising:
a memory for storing a computer program;
processor for executing said computer program for carrying out the steps of the off-line video recording method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the offline video recording method according to any one of claims 1 to 7.
CN202010929607.3A 2020-09-07 2020-09-07 Offline video recording method, device and equipment and computer readable storage medium Active CN111797060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010929607.3A CN111797060B (en) 2020-09-07 2020-09-07 Offline video recording method, device and equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010929607.3A CN111797060B (en) 2020-09-07 2020-09-07 Offline video recording method, device and equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111797060A true CN111797060A (en) 2020-10-20
CN111797060B CN111797060B (en) 2020-12-04

Family

ID=72834052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010929607.3A Active CN111797060B (en) 2020-09-07 2020-09-07 Offline video recording method, device and equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111797060B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409831A (en) * 2021-05-31 2021-09-17 广州敏视数码科技有限公司 Video covering method of vehicle-mounted video recorder based on virtual timestamp chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103037203A (en) * 2012-12-11 2013-04-10 浙江宇视科技有限公司 Method and device for index recovery based on block storage
CN104270605A (en) * 2014-09-23 2015-01-07 浪潮(北京)电子信息产业有限公司 Method and device for processing video monitoring data
CN105578265A (en) * 2015-12-10 2016-05-11 杭州当虹科技有限公司 Timestamp compensation or correction method based on H264/H265 video analysis
CN108874826A (en) * 2017-05-12 2018-11-23 杭州海康威视数字技术股份有限公司 Video-frequency band sort method and cloud storage system
US20190147392A1 (en) * 2012-09-07 2019-05-16 Mapmyid, Inc. Address exchange systems and methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190147392A1 (en) * 2012-09-07 2019-05-16 Mapmyid, Inc. Address exchange systems and methods
CN103037203A (en) * 2012-12-11 2013-04-10 浙江宇视科技有限公司 Method and device for index recovery based on block storage
CN104270605A (en) * 2014-09-23 2015-01-07 浪潮(北京)电子信息产业有限公司 Method and device for processing video monitoring data
CN105578265A (en) * 2015-12-10 2016-05-11 杭州当虹科技有限公司 Timestamp compensation or correction method based on H264/H265 video analysis
CN108874826A (en) * 2017-05-12 2018-11-23 杭州海康威视数字技术股份有限公司 Video-frequency band sort method and cloud storage system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DR. JANI VÄRE等: "《2016 International Conference on Information Networking (ICOIN)》", 10 March 2016 *
肖雪: "视频监控平台的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409831A (en) * 2021-05-31 2021-09-17 广州敏视数码科技有限公司 Video covering method of vehicle-mounted video recorder based on virtual timestamp chain

Also Published As

Publication number Publication date
CN111797060B (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN110674146B (en) Data synchronization method, synchronization end, end to be synchronized, equipment and storage medium
CN109542330B (en) Data storage method, data query method and device
CN104951474A (en) Method and device for acquiring MySQL binlog incremental logs
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN102244758A (en) Video-recording-file-based data acquisition method and equipment
CN108093016B (en) Picture storage method and device and video monitoring system
CN109451078B (en) Transaction processing method and device under distributed architecture
CN111797060B (en) Offline video recording method, device and equipment and computer readable storage medium
CN105657049A (en) Incremental data synchronization method and device and mobile terminal
CN112748877A (en) File integration uploading method and device and file downloading method and device
CN111193622B (en) Asymmetric configuration management method, device and equipment and readable storage medium
CN113608692A (en) Method, system, equipment and medium for verifying data consistency of storage system
CN105991744B (en) Method and apparatus for synchronizing user application data
CN113468274A (en) Data storage method and device, storage medium and electronic equipment
CN107148612A (en) A kind of method and apparatus of extending user subregion
CN107609197B (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN111147226B (en) Data storage method, device and storage medium
CN114491145B (en) Metadata design method based on stream storage
CN103886028A (en) Method and device for copying files from storage equipment to advertisement players
CN110515907B (en) Data synchronization method and related device for distributed storage nodes
CN107770265B (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN116541468B (en) Snapshot data synchronization method, storage master, electronic device and storage medium
CN103593407A (en) Data file storage and playback methods
CN111079199B (en) Enterprise credit data screenshot tamper-proofing method based on block chain technology
CN117676183A (en) Video storage method, video playing device, video storage equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310000 rooms 604 and 605, building 1, 768 Jianghong Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province (self declaration)

Patentee after: Hangzhou Mirui Technology Co.,Ltd.

Address before: Room 604 and 605, building 1, Zhejiang nongkechuang garden, No. 768, Jianghong Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU MEARI TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address