CN111866422B - Video data uploading method, device, equipment and computer readable storage medium - Google Patents

Video data uploading method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111866422B
CN111866422B CN202010545962.0A CN202010545962A CN111866422B CN 111866422 B CN111866422 B CN 111866422B CN 202010545962 A CN202010545962 A CN 202010545962A CN 111866422 B CN111866422 B CN 111866422B
Authority
CN
China
Prior art keywords
video data
data
uploaded
uploading
time
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.)
Active
Application number
CN202010545962.0A
Other languages
Chinese (zh)
Other versions
CN111866422A (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202010545962.0A priority Critical patent/CN111866422B/en
Publication of CN111866422A publication Critical patent/CN111866422A/en
Application granted granted Critical
Publication of CN111866422B publication Critical patent/CN111866422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a method, a device, equipment and a computer readable storage medium for uploading video data, wherein the method comprises the following steps: estimating the size of the video data to be uploaded by the camera device at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file; sending a data uploading request to the video data storage equipment so that the video data storage equipment receives video data based on the data uploading request; and uploading the video data currently generated by the camera device to a video data storage device until the total volume of the video data uploaded this time meets the estimated size of the video data to be uploaded this time. The invention can realize the generation and uploading of the video while generating the video, does not occupy the memory of the camera equipment to cause the insufficient memory of the camera equipment with small memory, and does not need the camera equipment to be configured with an SD card.

Description

Video data uploading method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of video technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for uploading video data.
Background
In order to meet the storage requirement of the video data of the security camera, the video data of the security camera can be transmitted to other video data storage devices for storage, for example, the video data is transmitted to a cloud for storage, wherein the uploading of the video data to the cloud for storage is a scheme widely used for the storage of the video data in the field of security monitoring at present.
The current video uploading and storing schemes include the following two: 1. storing the video data in a memory of security camera equipment, and uploading the video data of a section to video data storage equipment for storage after the video data of the whole section is fully stored; 2. and storing the video data in the SD card, and uploading the video data to video data storage equipment for storage after a complete section of video is stored in the SD card.
The inventor finds that the following technical problems exist in the prior art in the process of implementing the invention: the first scheme has the defects that the memory of the security camera equipment is limited, and the video files are stored in the memory of the security camera equipment, so that the memory overhead of the security camera equipment can be greatly increased, and even the memory of the security camera equipment is insufficient to cause the abnormal work of the security camera equipment; the second scheme requires that the security camera equipment is provided with an SD card, and if the SD card is damaged or is manually pulled out, the video uploading storage function of the equipment is invalid, so that the reliability and the economy of the second video uploading storage scheme are not ideal.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a computer-readable storage medium for uploading video data, which can generate and upload video while recording, and do not occupy the memory of a camera device, which results in insufficient memory of the camera device with a small memory, and do not require the camera device to configure an SD card.
An embodiment of the present invention provides a video data uploading method, including:
estimating the size of the video data to be uploaded by the camera device at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file;
sending a data uploading request to the video data storage equipment so that the video data storage equipment receives video data based on the data uploading request;
and uploading the video data currently generated by the camera device to a video data storage device until the total amount of the video data uploaded this time meets the estimated size of the video data to be uploaded this time.
As an improvement of the above scheme, if the data upload request includes information of a currently estimated size of the video data to be uploaded, the uploading the video data currently generated by the camera to a video data storage device until a total amount of the video data uploaded this time satisfies the estimated size of the video data to be uploaded this time, includes:
uploading the video data currently generated by the camera to a video data storage device until a video data uploading completion instruction sent by the video data storage device is received; the video data uploading completion instruction is as follows: the video data storage equipment judges that the total amount of the video data uploaded by the camera device at this time meets the size of the estimated video data at this time and issues the video data;
and stopping uploading the video data according to the received uploading completion instruction of the video data.
As an improvement of the above solution, the video data storage device is a server, the data upload request is an HTTP request, and the information of the size of the uploaded video data is written in a header statement of the HTTP request.
As an improvement of the above-mentioned solution, the estimating a size of the video data to be uploaded by the camera at this time includes:
and estimating the size of the video data to be uploaded of the camera device at this time according to the preset average code rate and the preset estimated video recording time.
As an improvement of the above-mentioned solution, the uploading the video data currently generated by the camera device to a video data storage device until the total amount of the video data uploaded this time meets the estimated size of the video data to be uploaded this time includes:
uploading the GOPs currently generated by the camera device to a video data storage device until the total data volume of all the GOPs uploaded this time meets the estimated size of the video data to be uploaded this time; if the sum of the currently generated data of the last GOP to be uploaded at this time and the total data volume of all the GOPs uploaded at this time cannot meet the size of the estimated video data to be uploaded at this time, filling redundant data in front of the last uploaded GOP at this time, wherein the redundant data is discarded data during video playing.
As an improvement of the foregoing solution, the estimating the size of the video data to be uploaded by the camera at this time includes:
estimating the data size of a single GOP according to a preset code rate upper limit, a preset time length of the single GOP and a preset data redundancy coefficient of the single GOP; the data redundancy coefficient is greater than 1;
estimating the number of GOPs according to the preset actual video recording time length and the preset time length of a single GOP;
and predicting the size of the video data to be uploaded at this time of the camera device according to the predicted data size of the single GOP and the predicted number of the GOPs.
As an improvement of the above-mentioned solution, the uploading the video data currently generated by the camera device to a video data storage device until the total amount of the video data uploaded this time meets the estimated size of the video data to be uploaded this time includes:
if the data size of the GOP currently generated by the camera device is equal to the estimated data size of the single GOP, uploading the GOP currently generated by the camera device to a video data storage device, and if the data size of the GOP currently generated by the camera device is smaller than the estimated data size of the single GOP, filling redundant data in the GOP currently generated, and uploading the data of the GOP currently generated and the redundant data together as the single GOP to the video data storage device until the total data volume of all the GOPs uploaded this time meets the estimated size of the video data to be uploaded this time; wherein the total data size of the current generated GOP data and the redundant data is equal to the data size of the estimated single GOP, and the redundant data is discarded data during video playing.
Another embodiment of the present invention correspondingly provides a video data uploading apparatus, including:
the video data estimation module is used for estimating the size of the video data to be uploaded by the camera at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file;
the request sending module is used for sending a data uploading request to the video data storage equipment so that the video data storage equipment receives video data based on the data uploading request;
and the video data uploading module is used for uploading the video data currently generated by the camera device to the video data storage equipment until the total volume of the video data uploaded at this time meets the estimated size of the video data to be uploaded at this time.
Another embodiment of the present invention provides a video data uploading device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor executes the computer program to implement the video data uploading method according to the above embodiment of the present invention.
Another embodiment of the present invention provides a storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device on which the computer-readable storage medium is located is controlled to execute the video data uploading method described in the above embodiment of the present invention.
Compared with the prior art, one of the technical schemes has the following advantages:
the size of the video data of a section of complete video file to be shot by the camera device is estimated in advance, and when the total amount of the video data uploaded by the camera device next meets the estimated size of the video data, the fact that the currently uploaded video data can form a complete video file is indicated, and the current uploading work of the video data can be finished. From the above analysis, the embodiment of the invention can generate the video and upload the video at the same time, and does not occupy the memory of the camera equipment to cause the insufficient memory of the camera equipment with small memory, and does not need to configure the SD card of the camera equipment. Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
Fig. 1 is a schematic flowchart illustrating a video data uploading method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a first video data uploading sequence according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a second video data uploading sequence according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video data uploading apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video data uploading device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
Referring to fig. 1, a schematic flow chart of a video data uploading method according to an embodiment of the present invention is shown, where the method includes:
s10, estimating the size of the video data to be uploaded by the camera device at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file;
s11, sending a data uploading request to the video data storage equipment so that the video data storage equipment receives video data based on the data uploading request;
and S12, uploading the video data currently generated by the camera device to a video data storage device until the total volume of the video data uploaded this time meets the estimated size of the video data to be uploaded this time.
In this embodiment of the present invention, an execution main body of the video data uploading method may be a video data uploading device, and the video data uploading device may be a camera device (for example, a security monitoring camera device), or a data processing and uploading device connected to the camera device (for example, a host connected to the security monitoring camera device), and the like, which is not limited specifically herein.
In the embodiment of the present invention, it is understood that a complete video file may refer to a video file recorded according to a fixed video recording duration (for example, a complete video file uploaded and stored by an existing imaging device is a video file recorded according to 5 minutes), or may be a video file recorded according to a fixed file size (for example, the fixed file size is 5 Mb), and is not limited herein.
When the currently generated video data is uploaded, the uploaded video data may be a video data segment with a set data length or a single GOP, and the uploading is not particularly limited herein. Here, a GOP refers to a Group of pictures (Group of pictures), and refers to a Group of pictures consisting of one I frame and a plurality of P frames and a plurality of B frames.
The key problem to generate a video file by uploading video data is when the uploading is finished, so that a complete file can be formed. Therefore, it is necessary to estimate the size of the video data to be uploaded each time before uploading the video data that can constitute a complete video file.
In the embodiment of the invention, the size of the video data of a section of complete video file to be shot by the camera device is estimated in advance, and when the total amount of the video data uploaded by the camera device next meets the estimated size of the video data, the currently uploaded video data can form a complete video file, and the current video data uploading operation can be finished. From the above analysis, the embodiment of the invention can generate the video and upload the video at the same time, and does not occupy the memory of the camera equipment to cause the insufficient memory of the camera equipment with small memory, and does not need to configure the SD card of the camera equipment. Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
For example, if the data upload request includes information about the size of the video data to be uploaded, the step S12 includes:
s120, uploading the video data currently generated by the camera to a video data storage device until a video data uploading completion instruction sent by the video data storage device is received; the video data uploading completion instruction is as follows: the video data storage equipment judges that the total amount of the video data uploaded by the camera device at this time meets the size of the estimated video data at this time and issues the video data;
and S121, stopping uploading the video data according to the received video data uploading completion instruction.
In this embodiment, by adding the estimated size information of the to-be-uploaded video data to the data uploading request in advance, in the process of receiving the uploaded video data, the video data storage device may determine whether the video data uploaded by the current camera device may form a complete video file according to the size information of the to-be-uploaded video data analyzed from the request, and if the determination result is yes, issue the video data uploading completion instruction, thereby stopping uploading the video data of the current camera device.
It can be understood that the work of judging whether the uploaded video data can form a complete video file may also be performed by the video data uploading device.
In the foregoing embodiment, for example, the video data storage device is a server, the data upload request is an HTTP request, and the information of the size of the uploaded video data is written into a header statement of the HTTP request. It will be appreciated that the video data storage device may also be other devices, such as a computer or network video recorder that may be used to store video data.
Illustratively, as a first way of estimating the size of the video recording data according to the embodiment of the present invention, the step S10 includes:
and estimating the size of the video data to be uploaded of the camera device at this time according to the preset average code rate and the preset estimated video recording time.
For example, each piece of uploaded video data is a single GOP, and taking the example of uploading the video data to the cloud server, it is assumed that the cloud storage record is stored according to a fixed time duration, for example, the time duration of the cloud storage record generated by the timing record is 5 minutes, and the time duration of the cloud storage record triggered by the motion detection is 1 minute (the time duration of the cloud storage may be specified to other values, which is specified by the equipment manufacturer). Taking the cloud storage time length of 1 minute as an example, the size of a cloud storage video in one minute is estimated according to the average code rate, for example, the average code rate is 1Mbps, the video size in 1 minute is 1mbps 60s/8=7.5MB, and the size of the video data to be uploaded is stated to be 7.5MB in the uploaded http header content-length.
Further, the step S12 includes:
uploading the GOPs currently generated by the camera device to a video data storage device until the total data volume of all the uploaded GOPs meets the estimated size of the video data to be uploaded at this time; if the sum of the currently generated data of the last GOP to be uploaded at this time and the total data volume of all the GOPs uploaded at this time cannot meet the size of the estimated video data to be uploaded at this time, filling redundant data in front of the last uploaded GOP at this time, wherein the redundant data is discarded data during video playing.
In the process of uploading the video data, the GOPs may be uploaded one by one, that is: and uploading the currently generated GOP every time a GOP is generated, counting the data volume of the uploaded GOP while uploading in the GOP uploading process, and determining the last GOP to be uploaded when the estimated data residual volume of the size of the video data to be uploaded at this time is judged to be less than that of the two GOPs.
For example, in the above example, since there is a certain error between the estimated size of the video data to be uploaded and the size of the video data actually uploaded according to the average bitrate estimation, see fig. 2, the redundant data can be padded before the last GOP (invalid data does not affect decoding, and the player discards the video data when playing it), so that the actually generated size is equal to the previously stated size of 7.5MB. The number of GOPs of this scheme is variable, because the GOP size is not fixed, which is related to the complexity of the picture, the GOP of the picture with large complexity is larger, so that 7.5MB of data can be put down for less GOPs, the duration of a GOP is fixed, for example, 2 seconds or 4 seconds, and the size of each GOP is variable, so that 7.5M of data can be put down for variable number of GOPs. Therefore, the size of the video file is fixed, and the video recording duration is not fixed.
It is to be understood that the redundant data may be automatically added by the image pickup apparatus when it is determined that the above condition is satisfied, or may be automatically added by the recorded-video-data uploading device when it is determined that the above condition is satisfied. The redundant data can be zero data, and the corresponding decoding end is invalid data, so that the redundant data can be discarded during decoding, and the decoding of the video data is not influenced.
As another example, that is, as a second way of estimating the size of the recorded video data according to the embodiment of the present invention, the step S10 includes:
estimating the data size of a single GOP according to a preset code rate upper limit, a preset time length of the single GOP and a preset data redundancy coefficient of the single GOP; the data redundancy coefficient is greater than 1;
estimating the number of GOPs according to the preset actual video recording time length and the preset time length of a single GOP;
and predicting the size of the video data to be uploaded at this time of the camera device according to the predicted data size of the single GOP and the predicted number of the GOPs.
Further, the uploading the video data currently generated by the camera device to a video data storage device until the total amount of the video data uploaded this time meets the estimated size of the video data to be uploaded this time includes:
if the data size of the GOP currently generated by the camera device is equal to the estimated data size of the single GOP, uploading the GOP currently generated by the camera device to a video data storage device, and if the data size of the GOP currently generated by the camera device is smaller than the estimated data size of the single GOP, filling redundant data in the GOP currently generated and uploading the data of the GOP currently generated and the redundant data together as the single GOP to the video data storage device until the total data volume of all the GOPs uploaded at this time meets the estimated size of the video data to be uploaded at this time; wherein the total data size of the current generated GOP data and the redundant data is equal to the data size of the estimated single GOP, and the redundant data is discarded data during video playing.
It is to be understood that the redundant data may be automatically added by the image pickup apparatus when it is judged that the above condition is satisfied, or may be automatically added by the recorded-video-data uploading device when it is judged that the above condition is satisfied. The redundant data can be zero data, and the corresponding decoding end is invalid data, and the redundant data can be discarded during decoding, so that the decoding of the video data is not influenced.
For example, each piece of uploaded video data is a single GOP, and taking uploading of the video data to a cloud server as an example, the maximum value of each GOP is estimated according to the bitrate upper limit, taking the bitrate upper limit of 1Mbps as an example (assuming 1 GOP every 2 seconds), and the size of 1 GOP is 1mbps × 2/8=250kb, by setting the data redundancy coefficient, a certain data margin can be allowed, and an instantaneous drastic increase in bitrate can be prevented, for example, the data redundancy coefficient can be set to 1.2, and the size of each GOP can be adjusted to 120% × 250kb =300kb. The total recording size is the number of GOPs multiplied by the maximum GOP value, and if the recording time requirement is 1 minute, 30 GOPs are required, that is, the total size is 9000KB. Referring to fig. 3, in this scheme, redundant data is filled in each GOP, and the recording duration and the recording size can be guaranteed to be fixed by controlling the number of GOPs.
In the two specific embodiments of video data estimation and uploading, the video data is estimated according to the two modes, and redundant data is added to the uploaded video data, so that while it can be ensured that all the video data which have been finally uploaded at this time can form a complete video file, the total amount of the video data which have been finally uploaded at this time can meet the estimated size of the video data to be uploaded at this time.
It should be noted that, in the two examples of video data prediction and uploading described above, if the time requirement is particularly strict and redundant data is allowed, the second option may be selected. The scheme can ensure the accuracy of time. If data size is a concern, it is undesirable to fill in too much redundant data, allowing for slight temporal fluctuations. Then option one may be selected. It will be appreciated that the two schemes are either possible or determined at the time of development.
Referring to fig. 4, a schematic structural diagram of a video data uploading apparatus according to an embodiment of the present invention is shown, including:
a video data estimation module 10, configured to estimate the size of video data to be uploaded by the camera at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file;
a request sending module 11, configured to send a data upload request to the video data storage device, so that the video data storage device performs video data receiving work based on the data upload request;
and the video data uploading module 12 is configured to upload the video data currently generated by the camera to a video data storage device until the total amount of the video data uploaded this time meets the estimated size of the video data to be uploaded this time.
In the embodiment of the invention, the size of the video data of a section of complete video file to be shot by the camera device is estimated in advance, and when the total amount of the video data uploaded by the camera device next meets the estimated size of the video data, the currently uploaded video data can form a complete video file, and the current video data uploading operation can be finished. From the above analysis, the embodiment of the present invention can generate and upload video while recording, and does not occupy the memory of the camera device, which results in insufficient memory of the camera device with small memory, and does not require the camera device to configure an SD card. Of course, it is not necessary for any product to practice the invention to achieve all of the above-described advantages at the same time.
As an improvement of the above scheme, the video data uploading module 12 is specifically configured to:
uploading the video data currently generated by the camera to a video data storage device until a video data uploading completion instruction sent by the video data storage device is received; the video data uploading completion instruction is as follows: the video data storage equipment judges that the total amount of the video data uploaded by the camera device at this time meets the size of the video data estimated at this time and issues the video data;
and stopping the uploading work of the video data according to the received uploading completion instruction of the video data.
As an improvement of the above solution, the video data storage device is a server, the data upload request is an HTTP request, and the information of the size of the uploaded video data is written in a header statement of the HTTP request.
As an improvement of the above scheme, the video data estimation module 10 is specifically configured to:
and estimating the size of the video data to be uploaded of the camera device at this time according to the preset average code rate and the preset estimated video recording time.
As an improvement of the above scheme, the video data uploading module 12 is specifically configured to:
uploading the GOPs currently generated by the camera device to a video data storage device until the total data volume of all the uploaded GOPs meets the estimated size of the video data to be uploaded at this time; if the sum of the currently generated data of the last GOP to be uploaded at this time and the total data volume of all the GOPs uploaded at this time cannot meet the estimated size of the video data to be uploaded at this time, filling redundant data in front of the last uploaded GOP at this time, wherein the redundant data is discarded data during video playing.
As an improvement of the above scheme, the video data estimation module 10 is specifically configured to:
estimating the data size of a single GOP according to a preset code rate upper limit, a preset time length of the single GOP and a preset data redundancy coefficient of the single GOP; the data redundancy coefficient is greater than 1;
estimating the number of GOPs according to the preset actual video recording time length and the preset time length of a single GOP;
and predicting the size of the video data to be uploaded at this time of the camera device according to the predicted data size of the single GOP and the predicted number of the GOPs.
As an improvement of the above scheme, the video data uploading module 12 is specifically configured to:
if the data size of the GOP currently generated by the camera device is equal to the estimated data size of the single GOP, uploading the GOP currently generated by the camera device to a video data storage device, and if the data size of the GOP currently generated by the camera device is smaller than the estimated data size of the single GOP, filling redundant data in the GOP currently generated and uploading the data of the GOP currently generated and the redundant data together as the single GOP to the video data storage device until the total data volume of all the GOPs uploaded at this time meets the estimated size of the video data to be uploaded at this time; wherein the total data size of the current generated GOP data and the redundant data is equal to the data size of the estimated single GOP, and the redundant data is discarded data when the video is played.
Fig. 5 is a schematic diagram of a video data uploading device according to an embodiment of the present invention. The video data uploading device of the embodiment includes: a processor, a memory, and a computer program, such as a video data upload program, stored in the memory and executable on the processor. The processor implements the steps in the above-described embodiments of the video data uploading method when executing the computer program. Alternatively, the processor implements the functions of the modules/units in the above device embodiments when executing the computer program.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the video data uploading apparatus.
The video data uploading device can be security monitoring camera equipment, a computer with a camera or a mobile phone with a camera and the like. The video data uploading device may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that the schematic diagram is merely an example of the video data uploading device, and does not constitute a limitation to the video data uploading device, and may include more or less components than those shown in the figure, or some components may be combined, or different components may be included, for example, the video data uploading device may further include an input-output device, a network access device, a bus, and the like.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor is a control center of the video data uploading device and connects various parts of the whole video data uploading device by using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the video data uploading apparatus by executing or executing the computer programs and/or modules stored in the memory and calling the data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The module/unit integrated with the video data uploading device may be stored in a computer readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection therebetween, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (9)

1. A video data uploading method is characterized by comprising the following steps:
estimating the size of the video data to be uploaded by the camera device at this time; the uploaded video data is video data which is obtained by a camera and forms a section of complete video file;
sending a data uploading request to a video data storage device so that the video data storage device receives video data based on the data uploading request;
uploading the video data currently generated by the camera device to a video data storage device until the total volume of the uploaded video data meets the estimated size of the video data to be uploaded at this time;
the uploading the video data currently generated by the camera device to a video data storage device until the total amount of the video data uploaded at this time meets the estimated size of the video data to be uploaded at this time includes:
uploading the GOPs currently generated by the camera device to a video data storage device until the total data volume of all the GOPs uploaded this time meets the estimated size of the video data to be uploaded this time; if the sum of the currently generated data of the last GOP to be uploaded at this time and the total data volume of all the GOPs uploaded at this time cannot meet the estimated size of the video data to be uploaded at this time, filling redundant data in front of the last uploaded GOP at this time, wherein the redundant data is discarded data during video playing.
2. The method for uploading video data according to claim 1, wherein the data uploading request includes information of a current estimated size of the video data to be uploaded, and the uploading the video data currently generated by the camera to a video data storage device until a total amount of the video data uploaded this time satisfies the estimated size of the video data to be uploaded this time includes:
uploading the video data currently generated by the camera to a video data storage device until a video data uploading completion instruction sent by the video data storage device is received; the video data uploading completion instruction is as follows: the video data storage equipment judges that the total amount of the video data uploaded by the camera device at this time meets the size of the video data estimated at this time and issues the video data;
and stopping uploading the video data according to the received uploading completion instruction of the video data.
3. The video data uploading method according to claim 1, wherein the video data storage device is a server, the data uploading request is an HTTP request, and the information on the size of the uploaded video data is written in a header statement of the HTTP request.
4. The video data uploading method of claim 1, wherein estimating the size of the video data to be uploaded by the camera at this time comprises:
and estimating the size of the video data to be uploaded by the camera at this time according to the preset average code rate and the preset estimated video time.
5. The video data uploading method of claim 1, wherein estimating the size of the video data to be uploaded by the camera at this time comprises:
estimating the data size of a single GOP according to a preset code rate upper limit, a preset time length of the single GOP and a preset data redundancy coefficient of the single GOP; the data redundancy coefficient is greater than 1;
estimating the number of GOPs according to the preset actual video recording time length and the preset time length of a single GOP;
and according to the estimated data size of the single GOP and the estimated number of the GOPs, estimating the size of the video data to be uploaded by the camera at this time.
6. The video data uploading method of claim 5, wherein uploading the video data currently generated by the camera to a video data storage device until a total amount of the video data uploaded this time meets an estimated size of the video data to be uploaded this time comprises:
if the data size of the GOP currently generated by the camera device is equal to the estimated data size of the single GOP, uploading the GOP currently generated by the camera device to a video data storage device, and if the data size of the GOP currently generated by the camera device is smaller than the estimated data size of the single GOP, filling redundant data in the GOP currently generated and uploading the data of the GOP currently generated and the redundant data together as the single GOP to the video data storage device until the total data volume of all the GOPs uploaded at this time meets the estimated size of the video data to be uploaded at this time; wherein the total data size of the current generated GOP data and the redundant data is equal to the data size of the estimated single GOP, and the redundant data is discarded data when the video is played.
7. A video data uploading apparatus, comprising:
the video data estimation module is used for estimating the size of the video data to be uploaded by the camera at this time; the uploaded video data is video data which is obtained by a camera device and forms a section of complete video file;
the request sending module is used for sending a data uploading request to the video data storage equipment so that the video data storage equipment receives the video data based on the data uploading request;
the video data uploading module is used for uploading the video data currently generated by the camera device to a video data storage device until the total volume of the uploaded video data meets the estimated size of the video data to be uploaded at this time;
the video data uploading module is specifically configured to:
uploading the GOPs currently generated by the camera device to a video data storage device until the total data volume of all the GOPs uploaded this time meets the estimated size of the video data to be uploaded this time; if the sum of the currently generated data of the last GOP to be uploaded at this time and the total data volume of all the GOPs uploaded at this time cannot meet the estimated size of the video data to be uploaded at this time, filling redundant data in front of the last uploaded GOP at this time, wherein the redundant data is discarded data during video playing.
8. A video data upload device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the video data upload method according to any one of claims 1 to 6.
9. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls a device to execute the video data uploading method according to any one of claims 1 to 6.
CN202010545962.0A 2020-06-16 2020-06-16 Video data uploading method, device, equipment and computer readable storage medium Active CN111866422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010545962.0A CN111866422B (en) 2020-06-16 2020-06-16 Video data uploading method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010545962.0A CN111866422B (en) 2020-06-16 2020-06-16 Video data uploading method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111866422A CN111866422A (en) 2020-10-30
CN111866422B true CN111866422B (en) 2022-12-09

Family

ID=72986754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010545962.0A Active CN111866422B (en) 2020-06-16 2020-06-16 Video data uploading method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111866422B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005117339A (en) * 2003-10-07 2005-04-28 Ikeno Tsuken Kk Method for monitoring video recording state of monitoring camera
CN100418071C (en) * 2005-07-08 2008-09-10 北京北大方正电子有限公司 Method for establishing medium file system
JP5949040B2 (en) * 2012-03-27 2016-07-06 沖電気工業株式会社 Network storage device and recorded data storage program
CN105573921A (en) * 2014-10-15 2016-05-11 中兴通讯股份有限公司 File storage method and device
CN109429035A (en) * 2017-08-31 2019-03-05 田保林 A kind of intelligent control method of monitoring system
CN108989724B (en) * 2018-07-26 2020-12-18 深圳市安佳威视信息技术有限公司 Embedded video camera video storage method and file search method

Also Published As

Publication number Publication date
CN111866422A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111225171B (en) Video recording method, device, terminal equipment and computer storage medium
EP3748972B1 (en) Video recording method and system
CN108076317B (en) Video data storage method and system, video access method and node
US11563992B2 (en) Video playback quality detection method and apparatus
CN107371061A (en) A kind of video stream playing method, device and equipment
CN105553939A (en) Method and device for determining blockage of streaming media
CN111866422B (en) Video data uploading method, device, equipment and computer readable storage medium
US8369456B2 (en) Data processing apparatus and method and encoding device
CN111294500B (en) Image shooting method, terminal device and medium
CN115190359A (en) Automatic conversion method and system for video playing format
US8761573B2 (en) Recording device, imaging and recording device, recording method, and program
US8649657B2 (en) Recording apparatus
US7924675B2 (en) Information recording apparatus, imaging device, information-recording controlling method, and computer program
CN112449209B (en) Video storage method and device, cloud server and computer readable storage medium
CN111405313B (en) Method and system for storing streaming media data
CN109274902B (en) Video file processing method and device
CN111356003B (en) Data writing method, system and terminal equipment
US7999853B2 (en) Moving image reproducing apparatus and processing method therefor
US20130156403A1 (en) Recording apparatus
CN117119201B (en) Compressed video transmission method, device, equipment and storage medium
CN110730239B (en) Downloading method, system, storage medium and terminal based on safe electric quantity
US10354695B2 (en) Data recording control device and data recording control method
CN114125453A (en) Video transmission method, system, device and medium
CN116170632A (en) Sound compensation method and device
US20180225049A1 (en) Media recording systems

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