CN106559632B - Multimedia file storage method and device - Google Patents

Multimedia file storage method and device Download PDF

Info

Publication number
CN106559632B
CN106559632B CN201510645141.3A CN201510645141A CN106559632B CN 106559632 B CN106559632 B CN 106559632B CN 201510645141 A CN201510645141 A CN 201510645141A CN 106559632 B CN106559632 B CN 106559632B
Authority
CN
China
Prior art keywords
current frame
event
priority
determining
resolution
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
CN201510645141.3A
Other languages
Chinese (zh)
Other versions
CN106559632A (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 fluorite Network Co.,Ltd.
Original Assignee
Hangzhou Ezviz Network 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 Ezviz Network Co Ltd filed Critical Hangzhou Ezviz Network Co Ltd
Priority to CN201510645141.3A priority Critical patent/CN106559632B/en
Publication of CN106559632A publication Critical patent/CN106559632A/en
Application granted granted Critical
Publication of CN106559632B publication Critical patent/CN106559632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention discloses a method and a device for storing a multimedia file, wherein the method is applied to image acquisition equipment and comprises the following steps: the method comprises the steps of determining an event corresponding to a current frame according to multimedia information of the current frame aiming at each frame in a multimedia file to be stored, determining a priority corresponding to the current frame according to a preset corresponding relation between the event and the priority, determining a coding parameter corresponding to the current frame according to a preset corresponding relation between the priority and the coding parameter, and coding and storing the frame by adopting the coding parameter. In the embodiment of the invention, the event corresponding to the current frame is determined according to the multimedia information of the current frame of the multimedia file, the corresponding priorities of different events are different, and the corresponding coding parameters are also different, so that the self-adaptive storage of the multimedia file is realized, the data volume of the multimedia file is reduced, and the service life of a unit for storing the multimedia information in the image acquisition equipment is prolonged.

Description

Multimedia file storage method and device
Technical Field
The invention relates to the technical field of audio and video processing, in particular to a method and a device for storing a multimedia file.
Background
With the rapid development of national economy, the number of vehicles running on roads is rapidly increased, and the traffic pressure is doubled. In order to monitor vehicles on a road, image capturing devices are deployed at different locations on the road. In addition, the image acquisition equipment can also be used in other monitoring areas to acquire corresponding monitoring data. The monitoring data is typically stored in the image acquisition device in the form of a multimedia file. The image acquisition equipment is provided with an SD card, and the multimedia file is stored in the SD card. When the SD card is full, the multimedia files stored in the SD card can be exported, and the SD can store the monitored multimedia files.
At present, the image capturing device generally operates for 24 hours by 7 days, so the data volume of the multimedia file acquired by the image capturing device will be very large, and the SD card with the general storage capacity will be full of 2 to 3 days. The storage times of the SD card are limited, and the life of the SD card will be terminated after the maximum storage times are reached. The same problem occurs for the units storing multimedia information in other electronic devices, so how to prolong the life of the storage units storing multimedia information in the electronic devices becomes a more important problem.
Disclosure of Invention
The embodiment of the invention discloses a method and a device for storing a multimedia file, which are used for prolonging the service life of a storage unit for storing multimedia information in electronic equipment.
In order to achieve the above object, an embodiment of the present invention discloses a method for storing a multimedia file, which is applied to an electronic device, and the method includes:
determining an event corresponding to a current frame according to multimedia information of the current frame aiming at each frame in a multimedia file to be stored;
determining the priority corresponding to the current frame according to the corresponding relation between the preset event and the priority;
and determining the coding parameters corresponding to the current frame according to the corresponding relation between the preset priority and the coding parameters, and coding and storing the multimedia file by adopting the coding parameters.
Further, the determining, according to the multimedia information of the current frame, an event corresponding to the current frame includes:
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of the current frame; or the like, or, alternatively,
determining an event corresponding to the current frame according to the sound intensity corresponding to the audio information of the current frame; or the like, or, alternatively,
and determining the event corresponding to the current frame according to the illumination intensity in the video information of the current frame.
Further, the determining, according to the sound intensity corresponding to the audio information of the current frame, an event corresponding to the current frame includes:
identifying the sound intensity in the audio information of the current frame, and judging the sound intensity interval where the sound intensity is located;
and determining the event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event.
Further, the determining, according to the illumination intensity in the video information of the current frame, an event corresponding to the current frame includes:
identifying the illumination intensity in the video information of the current frame, and judging an illumination intensity interval where the illumination intensity is located;
and determining the event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event.
Further, the determining, according to whether an object entering the monitoring area exists in the video information of the current frame, an event corresponding to the current frame includes:
and determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and whether the object meets a preset condition.
Further, the determining, according to whether an object entering the monitoring area exists in the video information of the current frame, an event corresponding to the current frame includes:
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of the current frame and the distance between the object and the image acquisition equipment; or the like, or, alternatively,
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of the current frame and the size of the area occupied by the object in the current frame; or the like, or, alternatively,
and determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the area of the object in the current frame.
Further, when the number of the objects entering the monitoring area is more than two, determining the size of the area occupied by the objects in the current frame includes:
and determining the size of the area occupied by the object in the current frame according to the sum of the areas occupied by each object in the current frame.
Further, the encoding parameters include at least one of:
resolution and frame rate.
Further, the determining, according to the preset correspondence between the priority and the coding parameter, the coding parameter corresponding to the current frame includes:
when the encoding parameter is the resolution at the fixed frame rate, determining the resolution corresponding to the current frame according to the corresponding relation between the preset priority and the resolution;
and when the coding parameter is the frame rate under the fixed resolution, determining the frame rate corresponding to the current frame according to the corresponding relation between the preset priority and the frame rate.
The embodiment of the invention provides a storage device of a multimedia file, which is applied to electronic equipment and comprises:
the event determining module is used for determining an event corresponding to the current frame according to the multimedia information of the current frame aiming at each frame in the multimedia file to be stored;
the priority determining module is used for determining the corresponding priority of the current frame according to the corresponding relation between the preset event and the priority;
and the coding storage module is used for determining the coding parameters corresponding to the current frame according to the corresponding relation between the preset priority and the coding parameters, and coding and storing the multimedia file by adopting the coding parameters.
Further, the event determining module is specifically configured to determine an event corresponding to the current frame according to whether an object entering the monitored area exists in the video information of the current frame; or, determining an event corresponding to the current frame according to the sound intensity corresponding to the audio information of the current frame; or, determining the event corresponding to the current frame according to the illumination intensity in the video information of the current frame.
Further, the event determining module is specifically configured to identify a sound intensity in the audio information of the current frame, and determine a sound intensity interval in which the sound intensity is located; and determining the event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event.
Further, the event determining module is specifically configured to identify the illumination intensity in the video information of the current frame, and determine an illumination intensity interval in which the illumination intensity is located; and determining the event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event.
Further, the event determining module is specifically configured to determine an event corresponding to the current frame according to whether an object entering the monitored area exists in the video information of the current frame and whether the object meets a preset condition.
Further, the event determining module is specifically configured to determine an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and a distance from the object to the image acquisition device; or, determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the size of the area occupied by the object in the current frame; or, determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the area of the object in the current frame.
Further, when the number of the objects entering the monitoring area is more than two, the event determining module is specifically configured to determine the size of the area occupied by each object in the current frame according to the sum of the areas occupied by each object in the current frame.
Further, when the encoding parameter is a resolution at a fixed frame rate, the encoding storage module is specifically configured to determine a resolution corresponding to the current frame according to a preset correspondence between a priority and the resolution;
when the encoding parameter is a frame rate at a fixed resolution, the encoding storage module is specifically configured to determine a frame rate corresponding to the current frame according to a preset correspondence between the priority and the frame rate.
The embodiment of the invention discloses a method and a device for storing a multimedia file, wherein the method is applied to image acquisition equipment and comprises the following steps: the method comprises the steps of determining an event corresponding to a current frame according to multimedia information of the current frame aiming at each frame in a multimedia file to be stored, determining a priority corresponding to the current frame according to a preset corresponding relation between the event and the priority, determining a coding parameter corresponding to the current frame according to a preset corresponding relation between the priority and the coding parameter, and coding and storing the frame by adopting the coding parameter. In the embodiment of the invention, the event corresponding to the current frame is determined according to the multimedia information of the current frame of the multimedia file, the corresponding priorities of different events are different, and the corresponding coding parameters are also different, so that the self-adaptive storage of the multimedia file is realized, the data volume of the multimedia file is reduced, and the service life of a storage unit for storing the multimedia information in the electronic equipment is prolonged.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a storage process of a multimedia file according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of each zone defined in a monitored zone provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a storage device for multimedia files according to an embodiment of the present invention.
Detailed Description
In order to reduce the data volume of a multimedia file and prolong the service life of a storage unit for storing multimedia information in electronic equipment, the embodiment of the invention provides a method and a device for storing the multimedia file.
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.
Fig. 1 is a process for storing a multimedia file according to an embodiment of the present invention, where the process includes the following steps:
s101: and determining an event corresponding to the current frame according to the multimedia information of the current frame aiming at each frame in the multimedia file to be stored.
The storage method of the multimedia file provided by the embodiment of the invention is suitable for electronic equipment, and the electronic equipment can be image acquisition equipment, a video camera, a camera and the like, and can also be equipment such as a mobile phone, a personal computer, a tablet personal computer and the like.
The multimedia information of the current frame includes audio information of the current frame and video information of the current frame. When determining the event corresponding to the current frame, the event corresponding to the current frame may be determined only according to the video information of the current frame, may also be determined only according to the audio information of the current frame, or may also be determined according to the video information and the audio information of the current frame at the same time.
In order to determine the event corresponding to the current frame, the condition corresponding to the event may be set in advance according to each event, and when the event corresponding to the current frame is determined, the event corresponding to the current frame is determined according to the condition satisfied by the multimedia information of the current frame. For example, the condition corresponding to the first event is that no object in the video information enters the monitored area, and the condition corresponding to the second event is that an object entering the monitored area exists in the video information. And if the current frame is identified to have the object entering the monitoring area, such as a person or a vehicle, the current frame is determined to correspond to a second event. When the corresponding condition is set for each event, all the conditions can be preferably covered, so that the corresponding event can also include all the situations appearing in the multimedia information, and the encoding and storing precision of the multimedia file is higher.
In order to realize the adaptive storage of the multimedia file, at least two events can be set in the embodiment of the invention, and each event sets a corresponding priority. When setting an event, tracking a target person according to the requirement of the target person, for example, in criminal investigation, setting a corresponding event according to whether a person entering a monitoring area exists in each frame, and if the dressing feature or the facial feature of the target person is further known, further setting the corresponding event according to the corresponding feature.
Specifically, when determining an event corresponding to a current frame by identifying video information of the current frame, a motion detection technology may be used to perform feature identification in the video information, and a specific detection process belongs to the prior art, which is not described in detail in the embodiments of the present invention.
S102: and determining the priority corresponding to the current frame according to the corresponding relation between the preset event and the priority.
Each event corresponds to a respective priority. When setting, the corresponding relation between the event and the priority can be set according to the requirement, if a certain event is a required event, the priority corresponding to the event is set to be higher, otherwise, the priority corresponding to the event is set to be lower. For example, if there is no object entering the monitored area and the event is not a desired event, the event is set to have a lower priority, and if there is a moving vehicle in the monitored area and someone is in the vehicle, the event is set to have a higher priority.
S103: and determining the coding parameters corresponding to the current frame according to the corresponding relation between the preset priority and the coding parameters, and coding and storing the multimedia file by adopting the coding parameters.
In order to effectively prolong the service life of a unit for storing multimedia files in the electronic equipment, the corresponding relation between the priority and the coding parameters is preset. In the embodiment of the present invention, the encoding parameter may be a resolution, a frame rate, or both a resolution and a frame rate, but may also be other encoding parameters. When the correspondence between the priority and the coding parameter is set, the size of the data amount of the coded current frame corresponding to different priorities may be considered to be different.
In the embodiment of the present invention, it may be set that the event corresponding to the higher priority may be required by the user, the encoding parameter corresponding to the higher priority may be larger, and the encoding parameter corresponding to the lower priority may be smaller. Alternatively, it may be set that the lower the priority is, the corresponding event may be required by the user, and the lower the priority is, the smaller the corresponding encoding parameter may be, and conversely, the higher the priority is, the larger the corresponding encoding parameter may be. The size here is relative to the coding parameters of each frame in the prior art.
In the embodiment of the invention, the event corresponding to the current frame is determined according to the multimedia information of the current frame of the multimedia file, the corresponding priorities of different events are different, and the corresponding coding parameters are also different, so that the self-adaptive storage of the multimedia file is realized, the data volume of the multimedia file is reduced, and the service life of a storage unit for storing the multimedia information in the electronic equipment is prolonged.
In the embodiment of the present invention, the encoding parameters include: at least one of a resolution and a frame rate.
When the encoding parameter is a resolution, resolutions corresponding to different priorities are different, and the higher the priority is, the higher the corresponding resolution is, the lower the priority is, the smaller the corresponding resolution is. The resolution is the resolution at a fixed frame rate. For example, the higher the priority, the higher the resolution, that is, at a fixed frame rate, the higher the priority, the higher the resolution, that is, at 25 frames per second, the resolution increases with the higher the priority, the resolution corresponding to the first priority is 352x288, the resolution corresponding to the second priority is 704x576, the resolution corresponding to the third priority is 1920x720, the resolution corresponding to the fourth priority is 1920x1080, the resolution corresponding to the fifth priority is 3840x2160, and the resolution corresponding to the sixth priority is 7680x 4320.
When the encoding parameter is a frame rate, the frame rates corresponding to different priorities are different, and the higher the priority is, the higher the corresponding frame rate is, the lower the priority is, the smaller the corresponding frame rate is. The frame rate is a fixed resolution. For example, the higher the priority, the higher the corresponding frame rate, that is, the fixed resolution, the higher the priority, the higher the frame rate, that is, the resolution is 1280x720, or other fixed value, the frame rate increases with the higher the priority, the frame rate corresponding to the first priority is 2 frames per second, the frame rate corresponding to the second priority is 6 frames per second, the frame rate corresponding to the third priority is 10 frames per second, the frame rate corresponding to the fourth priority is 14 frames per second, the frame rate corresponding to the fifth priority is 18 frames per second, and the frame rate corresponding to the sixth priority is 22 frames per second.
The encoding parameters may also include resolution and frame rate, and when the resolution and frame rate are included, the data amount corresponding to the current frame is increased after the encoding parameters corresponding to different priorities encode the current frame. For example, when the higher the priority is, the higher the coding parameter corresponding to the priority is, the higher the data amount corresponding to the current frame is, the first priority corresponds to a frame rate of 10 seconds per frame, the resolution is 704x576, the second priority corresponds to a frame rate of 20 frames per second, the resolution is 704x576, the third priority corresponds to a frame rate of 10 seconds per frame, the resolution is 1280x720, the fourth priority corresponds to a frame rate of 20 frames per second, the resolution is 1280x720, the fifth priority corresponds to a frame rate of 25 frames per second, the resolution is 1280x720, the sixth priority corresponds to a coding parameter of 25 frames per second, and the resolution is 1080 x.
In an embodiment of the present invention, determining the event corresponding to the current frame according to the multimedia information of the current frame includes:
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of the current frame; or the like, or, alternatively,
determining an event corresponding to the current frame according to the sound intensity corresponding to the audio information of the current frame; or the like, or, alternatively,
and determining the event corresponding to the current frame according to the illumination intensity in the video information of the current frame.
In the embodiment of the present invention, it is known whether each object enters the monitored area, and the process is not described in the embodiment of the present invention. This situation also exists in the following embodiments, and thus the description is not repeated.
Specifically, when determining the event corresponding to each current frame, the event may be determined according to the video information of the current frame, or may be determined according to the audio information of the current frame. When the determination is made according to the video information of the current frame, the event corresponding to the current frame may be determined according to whether an object entering the monitored area exists in the video information or according to the illumination intensity in the video information.
For example, when there is no moving person or moving vehicle in the current frame, the event corresponding to the current frame is the first event, and when there is a moving person or moving vehicle in the current frame, the event corresponding to the current frame is the second event. The first event corresponds to a first priority, the second event corresponds to a second priority, the encoding parameter corresponding to the first priority adopts a resolution of 352x288 when the frame rate is 25 frames per second, and the encoding parameter corresponding to the second priority adopts a resolution of 1920x1080 when the frame rate is 25 frames per second.
When determining an event corresponding to a current frame according to the illumination intensity in the video information, the illumination intensity of a certain area in the video information can be used as the illumination intensity of the current frame, and specifically, the illumination intensity of a certain area fixed in the current frame can be used as the illumination intensity of the current frame; or when the illumination intensity of the current frame is determined, the area with the illumination intensity may also be identified, and the illumination intensity of the current frame is determined according to the illumination intensity of the area, for example, when a vehicle enters the video picture at night, the illumination intensity of the vehicle lamp illumination area of the vehicle is greater than the illumination intensity of other areas, and then the illumination intensity of the vehicle lamp illumination area may be used as the illumination intensity of the current frame. When the event corresponding to the current frame is determined according to the illumination intensity in the video information, the average illumination intensity of the current frame can be used as the illumination intensity of the current frame.
In order to ensure the adaptivity of multimedia file storage, reduce the data volume of the multimedia file, prolong the service life of a storage unit for storing multimedia information in the electronic equipment, and realize the smooth transition of the data volume corresponding to each frame in the stored multimedia file, when the event corresponding to the current frame is determined according to the illumination intensity in the video information of the current frame, the illumination intensities with different sizes can be preset to correspond to different events according to the size of the illumination intensity. The determining, according to the illumination intensity in the video information of the current frame, an event corresponding to the current frame includes:
identifying the illumination intensity in the video information of the current frame, and judging an illumination intensity interval where the illumination intensity is located;
and determining the event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event.
Specifically, the illumination intensity intervals can be divided according to the unit lux of the illumination intensity, and different intervals correspond to different events, for example, illumination intensity of 0-20 lux corresponds to a first event, illumination intensity of 20-50 lux corresponds to a second event, illumination intensity of 50-100 lux corresponds to a third event, illumination intensity of more than 100 lux corresponds to a fourth event, and the like. The priorities corresponding to different events are different, the first event corresponds to a first priority, the resolution of the first event is 352x288 when the frame rate of the first event is 25 frames per second, the second event corresponds to a second priority, the resolution of the second event is 704x576 when the corresponding encoding parameter of the second event is 25 frames per second, the third event corresponds to a third priority, the resolution of the third event is 1920x1080 when the corresponding encoding parameter of the third event is 25 frames per second, the fourth event corresponds to a fourth priority, and the resolution of the fourth event is 3840x2160 when the corresponding encoding parameter of the fourth event is 25 frames per second.
When determining the event corresponding to the current frame according to the corresponding sound intensity in the audio information of the current frame, in order to ensure the adaptivity of the multimedia file storage, reduce the data volume of the multimedia file, and achieve the smooth transition of the data volume corresponding to each frame in the currently stored multimedia file, the sound intensities of different decibels may be preset to correspond to different events according to the sound intensity. The determining, according to the sound intensity corresponding to the audio information of the current frame, an event corresponding to the current frame includes:
identifying the sound intensity in the audio information of the current frame, and judging the sound intensity interval where the sound intensity is located;
and determining the event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event.
For example, sound intensity of 0-40 dB corresponds to a first event, sound intensity of 40-50 dB corresponds to a second event, sound intensity of 50-70 dB corresponds to a third event, sound intensity of more than 70 dB corresponds to a fourth event, and so on. The priorities corresponding to different events are different, the first event corresponds to a first priority, the resolution of the first event is 352x288 when the frame rate of the first event is 25 frames per second, the second event corresponds to a second priority, the resolution of the second event is 704x576 when the corresponding encoding parameter of the second event is 25 frames per second, the third event corresponds to a third priority, the resolution of the third event is 1920x1080 when the corresponding encoding parameter of the third event is 25 frames per second, the fourth event corresponds to a fourth priority, and the resolution of the fourth event is 3840x2160 when the corresponding encoding parameter of the fourth event is 25 frames per second.
In another embodiment of the present invention, the determining, according to whether there is an object entering the monitored area in the video information of the current frame, an event corresponding to the current frame includes:
and determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and whether the object meets a preset condition.
In order to ensure the adaptivity of the storage of the multimedia file, reduce the data volume of the multimedia file and realize the smooth transition of the data volume corresponding to each frame in the currently stored multimedia file, when determining the event corresponding to the current frame according to whether the video information of the current frame has an object entering the monitoring area, if the video information of the current frame has the object entering the monitoring area, the event corresponding to the current frame can be determined according to whether the object meets the preset condition.
Specifically, for example, 6 events may be preset, which are a first event, a second event, a third event, a fourth event, a fifth event, and a sixth event, where the first event corresponds to the first priority, the second event corresponds to the second priority, the third event corresponds to the third priority, the fourth event corresponds to the fourth priority, the fifth event corresponds to the fifth priority, and the sixth event corresponds to the sixth priority. And the preset coding parameters corresponding to the first priority are minimum, the preset coding parameters corresponding to the sixth priority are maximum, and the coding parameters are sequentially increased according to the sequence of the priorities from the first to the sixth.
The first event is that no object entering the monitored area exists in the video information, the second event is that a moving vehicle exists in the video information, the color of the moving vehicle is not identifiable, or the color of the moving vehicle is not specific, such as not red; the third event is that a moving vehicle exists in the video information, the color of the moving vehicle is a specific color, such as red, and the fourth event is that the moving vehicle with the specific color exists in the video information, and people get off the vehicle; the fifth event is that a moving vehicle with a specific color exists in the video information, a person gets off the vehicle, and the person getting off the vehicle is a male; the sixth event is that a moving vehicle with a specific color exists in the video information, and a person gets off the vehicle, the person getting off the vehicle is a male, the age group is middle age, glasses are worn, and the like. The moving vehicle is identified in the multimedia information, the color of the moving vehicle, whether the vehicle is provided with a person to get off, the gender and age of the person to get off, whether the person wears glasses and the like can be identified by the prior art, and the specific process is not described in detail in the embodiment of the invention.
In another embodiment of the present invention, in order to ensure adaptivity of multimedia file storage, reduce a data amount of a multimedia file, prolong a life of a storage unit storing multimedia information in an electronic device, and implement smooth transition of the data amount corresponding to each frame in the stored multimedia file, determining an event corresponding to a current frame according to whether an object entering a monitoring area exists in video information of the current frame includes:
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of the current frame and the distance between the object and the image acquisition equipment; or the like, or, alternatively,
determining an event corresponding to the current frame according to whether an object entering a monitoring area exists in the video information of each frame and the size of the area occupied by the object in the current frame; or the like, or, alternatively,
and determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the area of the object in the current frame.
Specifically, the event corresponding to the current frame is determined according to whether an object entering the monitoring area exists in the video information of the current frame and the distance between the object and the image acquisition device, because the closer the object is to the image acquisition device, the clearer the information of the acquired object. Therefore, the closer the object is to the image acquisition device, the larger the corresponding encoding parameter is.
For example, when there is no object entering the monitored area in the video information, the object corresponds to a first event, the first event corresponds to a first priority, and the first priority corresponds to an encoding parameter with a frame rate of 25 frames per second and a resolution of 352x 288; when an object entering a monitoring area exists in the video information and the object is more than 10 meters away from the image acquisition equipment, the object corresponds to a second event, the second event corresponds to a second priority, the encoding parameter corresponding to the second priority is that when the frame rate is 25 frames per second, the resolution is 704x 576; when an object entering a monitoring area exists in the video information and the object is 8-10 meters away from the image acquisition equipment, the object corresponds to a third event, the third event corresponds to a third priority, the encoding parameter corresponding to the third priority is that when the frame rate is 25 frames per second, the resolution is 1280x 720; when an object entering a monitoring area exists in the video information and the object is 6-8 meters away from the image acquisition equipment, the object corresponds to a fourth event, the fourth event corresponds to a fourth priority, and when the frame rate of an encoding parameter corresponding to the fourth priority is 25 frames per second, the resolution is 1920x 1080; when an object entering a monitoring area exists in the video information and the object is 4-6 meters away from the image acquisition equipment, the object corresponds to a fifth event, the fifth event corresponds to a fifth priority, the encoding parameter corresponding to the fifth priority is that when the frame rate is 25 frames per second, the resolution is 3840x 1080; when an object entering a monitoring area exists in the video information and the object is 2-4 meters away from the image acquisition equipment, the object corresponds to a sixth event, the sixth event corresponds to a sixth priority, the encoding parameter corresponding to the sixth priority is that when the frame rate is 25 frames per second, the resolution is 3840x 2160; when an object entering a monitoring area exists in the video information and the object is 0-2 meters away from the image acquisition equipment, the object corresponds to a seventh event, the seventh event corresponds to a seventh priority, the encoding parameter corresponding to the seventh priority is that when the frame rate is 25 frames per second, the resolution is 7680x 4320.
The determination of the distance between each object and the image acquisition device belongs to the prior art, and the process is not described in detail in the embodiment of the present invention.
When a plurality of objects entering a monitoring area appear in a current frame, in order to determine the coding parameters of the current frame, when the objects entering the monitoring area include more than two objects, determining the size of the area occupied by the objects in the current frame includes:
and determining the size of the area occupied by the object in the current frame according to the sum of the areas occupied by each object in the current frame.
For example, if a plurality of moving vehicles or moving persons appear in the current frame, the event corresponding to the current frame may be determined according to the sum of areas of the areas occupied by each moving vehicle or each moving person in the picture of the current frame. The larger the sum of the areas occupied by the objects entering the monitoring area in the current frame is, the higher the priority corresponding to the corresponding events is; the higher the priority is, the larger the corresponding encoding parameter is, thereby reducing the data volume of the multimedia file and prolonging the service life of a storage unit for storing the multimedia file in the electronic equipment.
The size of the sum of the areas occupied by each object in each frame is determined, which belongs to the prior art, and the process is not described in detail in the embodiment of the invention.
When determining an event corresponding to a current frame according to whether an object entering a monitoring area exists in video information of the current frame and the area where the object is located in the current frame, because the position of the image acquisition device is fixed, the corresponding monitoring area is fixed, each area can be determined in the monitoring area, and the position of each area is also fixed. According to the importance degree of each area, the corresponding event when the object entering the monitoring area is positioned in the area can be preset. Specifically, when an object entering the monitoring area is located in the area with a higher importance degree, the higher the priority corresponding to the corresponding event is, the higher the priority is, the larger the corresponding encoding parameter is; when the object entering the monitoring area is located in an area with lower importance degree, the lower the priority corresponding to the corresponding event, the lower the priority, the smaller the corresponding encoding parameter.
A schematic view of each region determined in the monitored region is shown in fig. 2, in which the image capturing device is located within region 6, so region 6 is the most important region and region 1 is the least important region. For criminal investigation work, if a specific illegal act occurring region is known, the region can also be used as a region with the highest importance degree, and the importance degree of other regions is set according to the relationship between the region and other regions or whether other regions relate to corresponding illegal acts.
The above-described embodiment of the present invention is explained with reference to fig. 2. For example, when there is no object entering the monitoring area in the video information, the video information corresponds to a first event, the first event corresponds to a first priority, the encoding parameter corresponding to the first priority is a resolution 1280x720, and the frame rate is 2 frames per second; when an object entering a monitoring area exists in the video information and the object is located in an area 1, the object corresponds to a second event, the second event corresponds to a second priority, the encoding parameter corresponding to the second priority is 1280x720, and the frame rate is 6 frames per second; when an object entering a monitoring area exists in the video information and the object is located in an area 2, the object corresponds to a third event, the third event corresponds to a third priority, the encoding parameter corresponding to the third priority is a resolution 1280x720, and the frame rate is 10 frames per second; when an object entering a monitoring area exists in the video information and the object is located in an area 3, the object corresponds to a fourth event, the fourth event corresponds to a fourth priority, the encoding parameter corresponding to the fourth priority is 1280x720, and the frame rate is 14 frames per second; when an object entering a monitoring area exists in the video information and the object is located in an area 4, the object corresponds to a fifth event, the fifth event corresponds to a fifth priority, the encoding parameter corresponding to the fifth priority is 1280x720, and the frame rate is 18 frames per second; when an object entering a monitoring area exists in the video information and the object is located in an area 5, the object corresponds to a sixth event, the sixth event corresponds to a sixth priority, the encoding parameter corresponding to the sixth priority is 1280x720, and the frame rate is 20 frames per second; when an object entering the monitored area exists in the video information and the object is located in the area 6, the object corresponds to a seventh event, the seventh event corresponds to a seventh priority, the encoding parameter corresponding to the seventh priority is 1280x720, and the frame rate is 22 frames per second.
In the embodiment of the present invention, when determining an event corresponding to a current frame, the event may be determined according to any of the embodiments described above, or may be determined according to a combination of the embodiments described above, and when determining an event corresponding to a current frame, the event with a higher priority is referred to as a corresponding event. For example, if there is no object entering the monitored area in the current frame, it is determined that the current frame corresponds to the first event according to the video information, but there may be a moving vehicle at this time, and although the moving vehicle does not appear in the monitored area, its horn is sounded, and it is determined that the current frame corresponds to the second event according to the audio information, it may be determined that the current frame corresponds to the second event.
According to the embodiment of the invention, the event corresponding to the current frame is determined according to the multimedia information of the current frame of the multimedia file, the corresponding coding parameters are different due to different priorities corresponding to different events, so that the self-adaptive storage of the multimedia file is realized, the data volume of the multimedia file is reduced, the network resources can be saved during the playback of the multimedia file, and the storage mode can store more frames of multimedia files, reduce the writing and erasing times of the multimedia information, so that the service life of a storage unit for storing the multimedia information in the electronic equipment is prolonged.
Fig. 3 is a schematic structural diagram of a storage device for multimedia files according to an embodiment of the present invention, applied to an electronic device, the storage device including:
an event determining module 31, configured to determine, for each frame in a multimedia file to be stored, an event corresponding to a current frame according to multimedia information of the current frame;
a priority determining module 32, configured to determine a priority corresponding to the current frame according to a corresponding relationship between a preset event and the priority;
and the coding storage module 33 is configured to determine a coding parameter corresponding to the current frame according to a corresponding relationship between a preset priority and the coding parameter, and code and store the multimedia file by using the coding parameter.
In the embodiment of the present invention, the encoding parameters include: at least one of a resolution and a frame rate.
When the encoding parameter is a resolution, resolutions corresponding to different priorities are different, and the higher the priority is, the higher the corresponding resolution is, the lower the priority is, the smaller the corresponding resolution is. The resolution is the resolution at a fixed frame rate. For example, the higher the priority, the higher the resolution, that is, at a fixed frame rate, the higher the priority, the higher the resolution, that is, at 25 frames per second, the resolution increases with the higher the priority, the resolution corresponding to the first priority is 352x288, the resolution corresponding to the second priority is 704x576, the resolution corresponding to the third priority is 1920x720, the resolution corresponding to the fourth priority is 1920x1080, the resolution corresponding to the fifth priority is 3840x2160, and the resolution corresponding to the sixth priority is 7680x 4320.
When the encoding parameter is a frame rate, the frame rates corresponding to different priorities are different, and the higher the priority is, the higher the corresponding frame rate is, the lower the priority is, the smaller the corresponding frame rate is. The frame rate is a fixed resolution. For example, the higher the priority, the higher the corresponding frame rate, that is, the fixed resolution, the higher the priority, the higher the frame rate, that is, the resolution is 1280x720, or other fixed value, the frame rate increases with the higher the priority, the frame rate corresponding to the first priority is 2 frames per second, the frame rate corresponding to the second priority is 6 frames per second, the frame rate corresponding to the third priority is 10 frames per second, the frame rate corresponding to the fourth priority is 14 frames per second, the frame rate corresponding to the fifth priority is 18 frames per second, and the frame rate corresponding to the sixth priority is 22 frames per second.
The encoding parameters may also include resolution and frame rate, and when the resolution and frame rate are included, the data amount corresponding to the current frame is increased after the encoding parameters corresponding to different priorities encode the current frame. For example, when the higher the priority is, the higher the coding parameter corresponding to the priority is, the higher the data amount corresponding to the current frame is, the first priority corresponds to a frame rate of 10 seconds per frame, the resolution is 704x576, the second priority corresponds to a frame rate of 20 frames per second, the resolution is 704x576, the third priority corresponds to a frame rate of 10 seconds per frame, the resolution is 1280x720, the fourth priority corresponds to a frame rate of 20 frames per second, the resolution is 1280x720, the fifth priority corresponds to a frame rate of 25 frames per second, the resolution is 1280x720, the sixth priority corresponds to a coding parameter of 25 frames per second, and the resolution is 1080 x.
In an embodiment of the present invention, the event determining module 31 is specifically configured to determine an event corresponding to a current frame according to whether an object entering a monitoring area exists in video information of the current frame; or, determining an event corresponding to the current frame according to the sound intensity corresponding to the audio information of the current frame; or, determining the event corresponding to the current frame according to the illumination intensity in the video information of the current frame.
In an embodiment of the present invention, the event determining module 31 is specifically configured to identify a sound intensity in the audio information of the current frame, and determine a sound intensity interval where the sound intensity is located; and determining the event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event.
In a specific embodiment of the present invention, the event determining module 31 is specifically configured to identify a size of illumination intensity in the video information of the current frame, and determine an illumination intensity interval where the illumination intensity is located; and determining the event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event.
In an embodiment of the present invention, the event determining module 31 is specifically configured to determine the event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and whether the object meets a preset condition.
In a specific embodiment of the present invention, the event determining module 31 is specifically configured to determine an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and a distance between the object and the image acquisition device; or, determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the size of the area occupied by the object in the current frame; or, determining an event corresponding to the current frame according to whether an object entering the monitoring area exists in the video information of the current frame and the area of the object in the current frame.
When the number of the objects entering the monitoring area is more than two, the event determining module 31 is specifically configured to determine the size of the area occupied by each object in the current frame according to the sum of the areas occupied by each object in the current frame.
When the encoding parameter is a resolution at a fixed frame rate, the encoding storage module 33 is specifically configured to determine a resolution corresponding to the current frame according to a preset correspondence between a priority and the resolution;
when the encoding parameter is a frame rate at a fixed resolution, the encoding storage module 33 is specifically configured to determine a frame rate corresponding to the current frame according to a preset correspondence between the priority and the frame rate.
The embodiment of the invention discloses a method and a device for storing a multimedia file, wherein the method is applied to image acquisition equipment and comprises the following steps: the method comprises the steps of determining an event corresponding to a current frame according to multimedia information of the current frame aiming at each frame in a multimedia file to be stored, determining a priority corresponding to the current frame according to a preset corresponding relation between the event and the priority, determining a coding parameter corresponding to the current frame according to a preset corresponding relation between the priority and the coding parameter, and coding and storing the frame by adopting the coding parameter. In the embodiment of the invention, the event corresponding to the current frame is determined according to the multimedia information of the current frame of the multimedia file, the corresponding priorities of different events are different, and the corresponding coding parameters are also different, so that the self-adaptive storage of the multimedia file is realized, the data volume of the multimedia file is reduced, and the service life of a storage unit for storing the multimedia information in the electronic equipment is prolonged.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (7)

1. A method for storing multimedia files is applied to electronic equipment, and the method comprises the following steps:
aiming at each frame in the multimedia file to be stored, identifying the sound intensity in the audio information of the current frame, and judging the sound intensity interval where the sound intensity is located; determining an event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event; or identifying the illumination intensity in the video information of the current frame, and judging the illumination intensity interval where the illumination intensity is located; determining an event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event; or determining an event corresponding to the current frame according to whether the video information of the current frame contains the specified object and the distance between the object and the image acquisition equipment; or determining an event corresponding to the current frame according to whether the video information of the current frame contains the specified object and the size of the area occupied by the object in the current frame;
determining the priority corresponding to the current frame according to the corresponding relation between the preset event and the priority;
and determining the coding parameters corresponding to the current frame according to the corresponding relation between the preset priority and the coding parameters, and coding and storing the multimedia file by adopting the coding parameters.
2. The method of claim 1, wherein when the object comprises more than two, determining the size of the area occupied by the object in the current frame comprises:
and determining the size of the area occupied by the object in the current frame according to the sum of the areas occupied by each object in the current frame.
3. The method of any of claims 1-2, wherein the encoding parameters include at least one of:
resolution and frame rate.
4. The method according to claim 3, wherein the determining the coding parameters corresponding to the current frame according to the correspondence between the preset priority and the coding parameters comprises:
when the encoding parameter is the resolution at the fixed frame rate, determining the resolution corresponding to the current frame according to the corresponding relation between the preset priority and the resolution;
and when the coding parameter is the frame rate under the fixed resolution, determining the frame rate corresponding to the current frame according to the corresponding relation between the preset priority and the frame rate.
5. A multimedia file storage apparatus, applied to an electronic device, the apparatus comprising:
the event determining module is used for identifying the sound intensity in the audio information of the current frame aiming at each frame in the multimedia file to be stored and judging a sound intensity interval where the sound intensity is positioned; determining an event corresponding to the current frame according to the preset corresponding relation between each sound intensity interval and the event; or identifying the illumination intensity in the video information of the current frame, and judging the illumination intensity interval where the illumination intensity is located; determining an event corresponding to the current frame according to the preset corresponding relation between each illumination intensity interval and the event; or determining an event corresponding to the current frame according to whether the video information of the current frame contains the specified object and the distance between the object and the image acquisition equipment; or determining an event corresponding to the current frame according to whether the video information of the current frame contains the specified object and the size of the area occupied by the object in the current frame;
the priority determining module is used for determining the corresponding priority of the current frame according to the corresponding relation between the preset event and the priority;
and the coding storage module is used for determining the coding parameters corresponding to the current frame according to the corresponding relation between the preset priority and the coding parameters, and coding and storing the multimedia file by adopting the coding parameters.
6. The apparatus according to claim 5, wherein when the number of the objects is two or more, the event determining module is specifically configured to determine the size of the area occupied by each object in the current frame according to the sum of the areas occupied by the objects in the current frame.
7. The apparatus according to any one of claims 5 to 6, wherein when the encoding parameter is a resolution at a fixed frame rate, the encoding storage module is specifically configured to determine a resolution corresponding to the current frame according to a preset correspondence between a priority and the resolution;
when the encoding parameter is a frame rate at a fixed resolution, the encoding storage module is specifically configured to determine a frame rate corresponding to the current frame according to a preset correspondence between the priority and the frame rate.
CN201510645141.3A 2015-09-30 2015-09-30 Multimedia file storage method and device Active CN106559632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510645141.3A CN106559632B (en) 2015-09-30 2015-09-30 Multimedia file storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510645141.3A CN106559632B (en) 2015-09-30 2015-09-30 Multimedia file storage method and device

Publications (2)

Publication Number Publication Date
CN106559632A CN106559632A (en) 2017-04-05
CN106559632B true CN106559632B (en) 2021-02-12

Family

ID=58418199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510645141.3A Active CN106559632B (en) 2015-09-30 2015-09-30 Multimedia file storage method and device

Country Status (1)

Country Link
CN (1) CN106559632B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113132730A (en) * 2019-12-30 2021-07-16 北京积加科技有限公司 Intelligent video data compression method and device based on multi-frame content
CN112104840B (en) * 2020-09-09 2022-10-04 深圳市有方科技股份有限公司 Video acquisition method and mobile baseband workstation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1906942A (en) * 2004-01-29 2007-01-31 三星电子株式会社 Monitoring system and method for using the same
CN101556727A (en) * 2008-04-10 2009-10-14 上海宇嵌电子科技有限公司 Electronic device for energy-saving and environment-protecting regulation and control and safe preservation to household environment
CN102045544A (en) * 2010-11-10 2011-05-04 无锡中星微电子有限公司 Video monitoring system and video data transmission method thereof

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050024487A1 (en) * 2003-07-31 2005-02-03 William Chen Video codec system with real-time complexity adaptation and region-of-interest coding
US7805382B2 (en) * 2005-04-11 2010-09-28 Mkt10, Inc. Match-based employment system and method
CN100538756C (en) * 2007-06-11 2009-09-09 诺必施科技(厦门)有限公司 A kind of reflection identification alarm system and alarm method
WO2009135033A1 (en) * 2008-04-30 2009-11-05 Zeevee, Inc. System and method for local broadcasting
CN101742294B (en) * 2008-11-14 2012-09-05 北京中星微电子有限公司 Method and device for enhancing monitoring video compression ratio
US9426477B2 (en) * 2010-02-25 2016-08-23 International Business Machines Corporation Method and apparatus for encoding surveillance video
CN103634552A (en) * 2012-08-28 2014-03-12 华为技术有限公司 Monitoring video storage method, system and central management server
CN104053009A (en) * 2013-03-15 2014-09-17 中兴通讯股份有限公司 Encoding method of monitoring video and device
CN104702897B (en) * 2013-12-10 2018-05-15 明泰科技股份有限公司 The quick history playback and the method for event latch that Internet video is made video recording
CN103826109B (en) * 2014-03-25 2017-02-08 龙迅半导体(合肥)股份有限公司 Video monitoring image data processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1906942A (en) * 2004-01-29 2007-01-31 三星电子株式会社 Monitoring system and method for using the same
CN101556727A (en) * 2008-04-10 2009-10-14 上海宇嵌电子科技有限公司 Electronic device for energy-saving and environment-protecting regulation and control and safe preservation to household environment
CN102045544A (en) * 2010-11-10 2011-05-04 无锡中星微电子有限公司 Video monitoring system and video data transmission method thereof

Also Published As

Publication number Publication date
CN106559632A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN110414313B (en) Abnormal behavior alarming method, device, server and storage medium
CN109166261B (en) Image processing method, device and equipment based on image recognition and storage medium
US7609941B2 (en) Multimedia data recording apparatus, monitor system, and multimedia data recording method
US10269123B2 (en) Methods and apparatus for video background subtraction
US10055669B2 (en) Methods and systems of determining a minimum blob size in video analytics
US20150169962A1 (en) Video synopsis method and apparatus
KR20160066068A (en) Video masking processing method and apparatus
CN105323657B (en) Imaging apparatus and method for providing video summary
CN107547941B (en) Method, device and system for storing media data
US20160210759A1 (en) System and method of detecting moving objects
CN107948605A (en) Method, apparatus, equipment and the storage medium of vehicle-mounted monitoring video data storage
CN106559632B (en) Multimedia file storage method and device
CN114679607B (en) Video frame rate control method and device, electronic equipment and storage medium
CN113111682A (en) Target object sensing method and device, sensing base station and sensing system
CN113963153A (en) Vehicle identification method, device, equipment and storage medium
US11503101B1 (en) Device and method for assigning video analytics tasks to computing devices
CN111815951A (en) Road vehicle monitoring system and method based on intelligent vision Internet of things
CN106559635A (en) A kind of player method and device of multimedia file
CN1413417A (en) Image data processing
CN109698921B (en) Recording method, device and equipment
US10810441B2 (en) Systems and methods for identifying hierarchical structures of members of a crowd
CN111064924A (en) Video monitoring method and system based on artificial intelligence
CN110889352A (en) Image blurring processing method, computer device, and computer-readable storage medium
CN110942591B (en) Driving safety reminding system and method
WO2022048129A1 (en) Object recognition method, apparatus, and system

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: 310051 Room 301, building B, building 2, No. 399, Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou fluorite Network Co.,Ltd.

Address before: 7 / F, building 1, No. 700, Dongliu Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province 310000

Patentee before: HANGZHOU EZVIZ NETWORK Co.,Ltd.

CP03 Change of name, title or address