Background
Video monitoring is an important component of a three-dimensional social security prevention and control system, the video monitoring technology is more and more widely applied to the field of social public security, and particularly, the video monitoring technology has increasingly prominent functions in the working practices of maintenance stability, anti-terrorism outburst, security and prevention, investigation and solution solving, service of the masses and the like, and has strong advantages in the construction of an all-weather and all-dimensional security prevention and control system. The video monitoring technology has the important functions of finding crimes, preventing crimes, deterring crimes, locking targets, providing clues, fixing evidences and the like through the functions of displaying field images of a monitored area and replaying historical scenes in real time, so that the decision is more scientific and the command is more accurate, the comprehensive analysis and judgment of information can be better enhanced, and the work deployment, the force direction and the working mode are more scientific.
At present, the city video monitoring system in China carries out classified construction and hierarchical management, and according to the properties of video image acquisition points at different positions and areas, one type of video monitoring point positions are arranged at the image acquisition points of street roads and road sections of intersections, a unified video monitoring private network is required to be accessed, and video images are monitored and stored in real time for 24 hours by a public security organization. The second type of video monitoring points are image acquisition points of key units, key parts, key places and residential districts, and video images of the second type of video monitoring points are monitored and stored in real time for 24 hours by construction application units. The three types of video monitoring points are image acquisition points installed in other social industries and units, and video images of the three types of video monitoring points are mainly stored and searched locally.
With the coming of the mobile era, a mobile system is fused with a police command system, a handheld individual system, a video conference system, an image investigation system and the like, but at present, a mobile phone suitable for intercepting and downloading monitoring video images does not exist, and the requirements of browsing, viewing and extracting the video monitoring video images can be met, because:
(1) the video monitoring system is not accessed to a public network, only a private network or an internal network is used, some private network or internal network systems are not even opened with wifi, only wired access is allowed, and the existing mobile phone does not have a rj45 interface for wired access to the Ethernet and cannot be accessed to the Ethernet; (2) the video monitoring storage devices are numerous, common video monitoring storage devices can be classified into two categories, namely DVR and NVR, each category has various brands and models, and the mobile phone can meet the requirements of timeliness and comprehensiveness of work only by realizing connection and downloading of all types, brands and models of devices; (3) the existing mobile phone system can not play the video file formats stored in all the video monitoring storage devices in a compatible manner.
Disclosure of Invention
In view of this, the invention provides a mobile phone system for intercepting and downloading monitoring video images based on an android system, and browsing, intercepting and downloading of various video monitoring images is realized at an android mobile phone client.
In order to achieve the purpose, the technical scheme of the invention is realized as follows: a mobile phone system for intercepting and downloading surveillance video images, comprising: the mobile phone is provided with an operating system, and is arranged in the mobile phone:
the communication module comprises a wifi sub-module and is used for accessing an internal network of the video monitoring system through wifi;
the software module for identifying the monitoring video equipment obtains the brand model information of the monitoring video storage equipment by acquiring and analyzing the configuration file of the video monitoring system;
the preset information module is used for storing the user names and the default values of the passwords of various monitoring video storage devices;
a customized adaptation software module for selecting an adaptation implementation mechanism according to the identified monitoring video storage device;
and the video stream downloading and operating software module is used for acquiring the video stream by using the adaptive implementation mechanism and the user name and the password in the preset information module and operating the video stream.
Furthermore, the communication module further comprises an ethernet function supporting submodule, and a hardware device supporting the ethernet function is arranged corresponding to the ethernet function submodule and is used for directly accessing to the intranet of the video monitoring system under the condition without wifi.
Furthermore, the sub-module supporting the ethernet function integrally supports a USB OTG driver and an ethernet module device driver, and realizes conversion of USB and ethernet data protocol data on a physical layer.
Further, the hardware device includes: the USB conversion Ethernet interface control device internally integrates a USB transceiver circuit supporting USB1.0 and more than 1.0 version protocols and an SIE controller circuit, and also internally integrates an 10/100M Ethernet module and a memory control module based on IEEE802.3 and IEEE802.3u protocols.
Preferably, the USB interface in the USB conversion ethernet interface control device is a type-c interface, and the USB interface of the mobile phone is also a type-c interface.
Furthermore, the software module for identifying and monitoring video equipment comprises an acquisition unit, which is used for searching and acquiring a configuration file of the equipment; the monitoring video storage device further comprises an analysis unit used for analyzing the configuration file and identifying the type and specific model of the monitoring video storage device according to the configuration.
Furthermore, the implementation mechanism of the customized adaptation software module completes the information acquisition and establishment of the video stream downloading channel according to the device parameters of the configuration file.
Further, the downloading and operating video stream software module writes the video stream into the local according to time or name, and then performs play control operation on the local video stream file, and the downloading and operating video stream software module is internally provided with all the play programs in the format of the monitoring video file.
Compared with the prior art, the invention has the following advantages:
(1) the invention can enable the mobile phone to access the video monitoring system intranet at the mobile phone client, and the mobile phone can be connected through a wire even if the intranet does not have wifi;
(2) the invention can realize the identification of various video monitoring devices after networking and the browsing, interception and downloading of the monitoring video images;
(3) the invention can realize the function of playing the video formats of all the video monitoring devices by the mobile phone.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The invention will be described in detail below with reference to the drawings and in connection with an android system handset embodiment.
The implementation method of the invention comprises the following steps:
1. an Ethernet function (program and hardware) is added to the mobile phone android system;
2. connecting: the mobile phone system is connected with the internal network of the monitoring system and can read the monitoring video of any video monitoring equipment;
3. downloading: the mobile phone system downloads videos for the video images stored in the video monitoring equipment in a wireless or wired mode.
The mobile phone side needs to integrate and support a USB OTG driver and an ethernet module device driver, and implement a conversion service of USB and ethernet data protocol data on a physical layer.
In addition, the conversion from USB data to Ethernet data is realized by an external USB conversion Ethernet interface control circuit, a USB transceiver circuit supporting USB1.0, 1.1 and 2.0 protocols and an SIE controller circuit are integrated in the external control circuit, and the external control circuit can be interfaced with a USB HOST controller and can perform data conversion; meanwhile, an 10/100M Ethernet module and an efficient memory control module based on IEEE802.3 and IEEE802.3u protocols are integrated in the chip.
As shown in figure 1 for the system architecture of the present invention,
in the working process of the invention, the specific process of identifying the video monitoring equipment comprises the following steps:
1.1 initializing SDK
HCNetSDK.getInstance().NET_DVR_Init();
1.2: logging in equipment according to the IP, the port, the user name and the password;
1.3: the scanning equipment acquires configuration information;
1.4: and distinguishing the video monitoring storage equipment and the specific model according to the configuration judgment.
The types and differences of the video monitoring storage devices are as follows:
video surveillance storage devices are currently classified into NVRs and DVRs, and from a surface structure perspective, the difference between NVRs and DVRs is that there is a separate, common port for video input and output and network connection. Essentially, one of the most fundamental factors distinguishing DVRs from NVRs is whether a "digitizing" DVR compresses, converts, and stores analog video signals in its hard disk.
By "digital" of a DVR, it is meant that the compression and storage techniques are for digital signals, rather than directly transmitting digitally encoded video images. The DVR must be deployed near the analog camera. Instead, NVRs can store digital images directly from the IP network. NVR is therefore largely different from DVR which encodes and stores analog video captured by an analog camera in a hard disk, whereas NVR directly records digital video that the camera has already encoded. Therefore, NVR has no video interface, and its input and output data are both IP data and compression-encoded video.
The above-mentioned devices are identified for customized adaptation, and the implementation mechanisms inside different devices are different, for example: acquiring a channel, the channel name and the like; after the realization mechanism is adapted, the downloading of the video can be completed.
The specific process of downloading the video comprises the following steps:
2.1 obtaining the video stream, the method for obtaining the video stream may be performed according to an application layer Protocol, such as Real Time Streaming Protocol (RTSP) or other protocols, where the RTSP is taken as an example, and the RTSP is a network application Protocol, and is specially used for the video communication system to control the Streaming media server. The protocol is used to create and control media sessions between terminals. The client of the media server issues VCR commands, such as play, record and pause, to facilitate real-time control of the media stream from the server to the client (video on demand) or from the client to the server (voice recording).
And 2.2, the obtained video stream is written into a mobile phone end for local storage, playing, control and the like. The video file NET _ DVR _ GetFileByName can be downloaded according to the file name and the time
After the video is written into the local of the mobile phone, operations such as pausing, playing, fast forwarding (X1, X2, X4, X8 and X16 times speed), screenshot, cutting a video clip, dragging a progress bar to quickly position to a certain playing time period and the like can be carried out on the specific video, the video clip which is cut at present can enter an image management module, and the previous cut image and the cut video clip can be viewed at the position.
The specific functional points are as follows:
1. setting a server;
2. selecting a channel;
3. filtering the time;
4. playing back the video;
5. playing,
6. Pausing
7. Fast forward
8. Fast backing
9. Acceleration
10. Screenshot
11. Cropping video
12. Video download
13. Correlation management
14. Intelligent processing
15. And (5) working by butting with the platform.
The method flow chart of the embodiment of the invention is shown in fig. 2, and the corresponding technology is developed as follows:
butt joint of concrete technology
Get the playing port by player. getport, the port can apply for 16 at most, apply for when using and needing to use, use up and release in time, otherwise the video of the back can't be played.
Setstreamopenmode is set using player, setstreamplaymode, which can be set for playback of a stream as needed by time, and thus set.
Openstream is used, the current play library already supports headless stream, and the header length may be zero. If the code stream does not have a header, the code stream must be the code stream coded by the Haikang equipment, and the data size from the beginning part of the file to the correct I frame which can be analyzed needs to be less than 10K
Setdisplaybuf sets the maximum buffer frame number of a play buffer, which is very important and can directly influence the fluency and the delay of play, and the larger the buffer is, the more fluent the play is, and the larger the delay is at the same time.
Setdecodcb is used to set a decode callback function, which is called before Play, set a callback function, replacing the display section in the player, and is automatically disabled at Stop and needs to be reset before Play is called next. The decoding part does not control the speed, and as long as the user returns from the callback function, the decoder will decode the next part of data.
Setting a capture callback function by using Player.setDisplayCB; note that to return as soon as possible, if the callback is to be stopped, the callback function pointer displayCB may be set to NULL. Once the callback function is set, it is valid until closeStream. The function can be called and recalled at any time to trigger in the clock thread, time-consuming operation cannot occur, otherwise, clock pulse is disturbed, and display is influenced.
Play is started by using player, the size of a played video frame is adjusted according to a holder window, and a full screen display is needed as long as the holder window is enlarged to the full screen.
Input data is input using player, it is necessary to input data after the stream is started.
Stop playing by using player, call secondary function to stop playing after video playing last frame
Close stream using player. close stream, this function needs to be called to close stream when playback is stopped.
Release the playing port by using player, when the playing is finished or the playing port is not needed to be used, the function needs to be called to release the playing port, otherwise, the applied port number can not be played continuously after exceeding the upper limit
The hcnmetsdk.net _ DVR _ PlayBackByTime _ V40 method is used to establish a connection and bind the SurfaceView, and the hcnmetsdk.net _ DVR _ PlayBackControl _ V40 method is used to start downloading the data stream of the server video and play on the SurfaceView. The method of HCNetSDK, NET _ DVR _ GetPlayBackPos is used for monitoring the progress of the downloading stream.
The scheme is an implementation scheme based on an android system mobile phone, if the scheme is based on an apple system mobile phone, the scheme is that an intranet of a video monitoring system is connected through wifi, and the networking post-processing steps are the same as those of the android system mobile phone.
The invention is suitable for public network mobile phones and private network mobile phones in all markets.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.