Management system and method for carrying out network streaming media live broadcast by local area network camera
Technical Field
The invention relates to the technical field of live video, in particular to a management system and a method for carrying out network streaming media live broadcast by a local area network camera.
Background
Many schools, training centers, amusement centers and other areas with dense personnel and high mobility are generally provided with a plurality of video monitoring cameras, the cameras are all in the same local area network and are not in relation with a public network, people outside the local area network cannot directly check all video sources in the local area network in real time, for example, parents want to check the learning condition of children in schools, although the cameras are arranged in the teachers, the cameras cannot be connected for use, the number of video resources in the local area network is very large, and the value cannot be exerted to the maximum extent due to the fact that the cameras cannot be fully and effectively utilized.
In order to solve the technical problems, two technical schemes are mainly provided, one is to perform DDNS parameter configuration on the cameras in the local area network to realize the integrated management of the cameras, which requires professional technicians to configure DDNS parameters, and has the disadvantages of troublesome operation, low success rate, serious packet loss rate and low intelligence degree; secondly, the connection to the front-end video user is realized through a P2P module in the camera, the access process is simply to directly input parameters such as a direct playing address and the like, functions such as integrated management, distribution optimization and the like are not formed, most video sources in the live broadcast industry are connected through a PC (personal computer) such as a USB (universal serial bus) port and the like, a video or mobile-end camera is mainly obtained through a native interface of a front-end operating system and pushed to a forwarding server to be distributed to the front-end video user, because most front-end users directly play the video sources of various manufacturers, a video integrating party is required to perform software scheme integration of various manufacturers, the integrated result is often used as a playing window of a final front end in the form of a browser plug-in, and the plug-in is basically forbidden in the existing browser (such as ActiveX and the like), the functions of the plug-in are greatly limited, and in addition, because of the technical limitation of the, the playing mode is also limited, and multi-user access cannot be realized simultaneously.
Disclosure of Invention
The invention aims to provide a management system and a method for carrying out network streaming media live broadcast by a local area network camera, which are used for integrating and managing video resources in a local area network and optimizing the experience of front-end video users.
The invention is realized by the following steps: a management system for a local area network camera to carry out network streaming media live broadcast comprises a management client, a server management background and a video user playing front end;
the management client comprises a plurality of cameras and a video grouping management client, the video grouping management client automatically searches for the cameras in the local area network after logging in, configures relevant parameters of a target camera through an ONVIF protocol interface, and acquires an RTSP video source of the cameras on the basis of the ONVIF protocol;
the server side management background provides an HTTP API maintenance camera grouping interface, a grouping inner camera management interface and a user playing media stream interface, and is used for maintaining online grouping of video user playing front ends and starting or closing the push service of the cameras;
the video grouping management client uses a system registration grouping account to log in a server end management background through TCP long connection, reports the searched information of the plurality of cameras and processes the pushing service for opening and closing the cameras sent by the server end management background; the video grouping management client side pushes the acquired RTSP video source to a streaming media server and returns a playing address to a server side management background;
the video user playing front end is used for submitting a playing request to the server management background, and pulling and playing the stream from the streaming media server according to a playing address returned from the server management background.
The anti-theft link is a random code generated by the video grouping management client, and the server management background verifies the random code.
And the server side management background starts or closes the push service of the cameras according to the open time configuration of the cameras in the group.
The server side management background further comprises a detection module for detecting whether the video source of the camera is watched by someone, the push service of the camera is in a closed state by default, if the video source of the camera is watched by someone, the push service is automatically started, and if the video source of the camera is not watched by someone within a certain time, the server side management background automatically closes the push service of the corresponding camera.
The server side management background further comprises a rectification configuration module used for intelligently selecting a standard code stream meeting the requirements of the management system in the RTSP video source of the camera.
The local area network is internally provided with a host, and the video grouping management client is installed on the host.
The RTSP video source of the camera comprises a main code stream and a sub code stream.
The server side management background is also used for maintaining the playing state of the video user at the front playing end of the video user.
Wherein, the video user playing front end is an HTML5 front end.
The other technical scheme of the invention is as follows: a management method of the management system, comprising the steps of:
(1) opening a video grouping management client and logging in; the video grouping management client automatically searches for a camera in a local area network after logging in, configures related parameters of a target camera through an ONVIF protocol interface, and acquires an RTSP video source of the camera on the basis of the ONVIF protocol;
(2) the video grouping management client reports the searched information of the plurality of cameras; the server side manages the background to group the cameras;
(3) the video user submits a playing request to a server management background through a video user playing front end;
(4) the server side management background informs the video grouping client side to start a push service;
(5) the video grouping management client pushes the acquired RTSP video source to a streaming media server and returns a playing address to a server management background;
(6) and the server side management background returns the playing address to the video user playing front end, and the video user playing front end uses the obtained playing address to pull and play the stream from the streaming media server.
The camera provided by the invention is a camera supporting an ONVIF international standard protocol.
The maintenance camera grouping interface, the intra-grouping camera management interface and the user playing media stream interface are all HTTP API interfaces.
The video grouping of the invention means that the cameras of each local area network are generally divided into one group, and the cameras of different local area networks are necessarily divided into different groups. Generally, a small-scale school, training center, amusement center and the like only have one local area network, and a large-scale local area network generally has more than one local area network, for example, in the case of a plurality of buildings and the like, one local area network can be arranged in each building. When the number of cameras in a local area network is too many, clients can be grouped according to actual field conditions, for example, in the same local area network, the clients can be divided into a first floor, a second floor, a third floor and the like according to geographic positions, and can be divided into a small class, a middle class, a large class, a dormitory, a dining room and the like according to functions.
The invention has the beneficial effects that: the management system for the local area network camera to carry out network streaming media live broadcast is characterized in that based on an ONVIF (Internet video over fiber) international standard protocol supported by most cameras in the market, a large number of video sources in the traditional local area network are connected to a public network by combining a network streaming media live broadcast system, the video sources are connected to the network streaming media live broadcast system in an abutting joint mode, the video sources are fully and effectively utilized, the value is exerted to a greater extent, and flexible management is realized according to specific requirements of enterprises in various industries; the method has the advantages that any configuration is not needed in the cameras, the operation is very simple, and the group information of each camera in the local area network can be directly obtained by installing and logging in the video grouping management client; the cameras in the local area network can be remotely and directly added, modified, deleted and managed, convenience and rapidness are realized, and functions of integrated management, distribution optimization and the like are formed; because the network streaming media live broadcast system is directly fused, the full-platform playing is realized, the plug-in is not needed, and the video experience of the video user is greatly improved.
Drawings
Fig. 1 is a schematic diagram of a management system for live webcasting with a local area network camera according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As an embodiment of the management system for performing live streaming media by using the local area network camera, as shown in fig. 1, the management system includes a management client, a server management background, and a video user playing front end;
the management client comprises a plurality of cameras and a video grouping management client, the video grouping management client automatically searches for the cameras in the local area network after logging in, configures relevant parameters of a target camera through an ONVIF protocol interface, and acquires an RTSP video source of the cameras on the basis of the ONVIF protocol;
the server side management background provides an HTTP API maintenance camera grouping interface, a grouping inner camera management interface and a user playing media stream interface, and is used for maintaining online grouping of video user playing front ends and starting or closing the push service of the cameras;
the video grouping management client uses a system registration grouping account to log in a server end management background through TCP long connection, reports the searched information of the plurality of cameras and processes the pushing service for opening and closing the cameras sent by the server end management background; the video grouping management client side pushes the acquired RTSP video source to a streaming media server and returns a playing address to a server side management background;
the video user playing front end is used for submitting a playing request to the server management background, and pulling and playing the stream from the streaming media server according to a playing address returned from the server management background.
The video grouping management client configures related parameters of a target camera through an ONVIF protocol interface, and is a video uniform coding standard for a network streaming media live broadcast system.
The server side management background provides a maintenance camera grouping interface used for registering grouping, modifying grouping and canceling grouping, and the camera management interface in the grouping is used for adding cameras in the grouping, modifying camera shooting in the grouping and deleting cameras in the grouping.
The video grouping management client automatically searches the cameras in the local area network in real time, and when the cameras are added to the local area network, the cameras can be quickly searched without manual control of adding; when the local area network deletes the camera, the corresponding camera of the video grouping management client can not be displayed any more because the corresponding camera cannot be searched.
In this embodiment, a host is disposed in the lan, and the video packet management client is installed on the host, that is, packet management in the lan is completely implemented by software without adding any hardware device.
In this embodiment, the broadcast address is further added with an anti-theft link, the anti-theft link is a random code generated by the video packet management client, and the server management background verifies the random code. The playing address has the function of encrypting the anti-theft link, and a third-party tool is prevented from illegally capturing information by a mode of managing background random code verification by the video packet management client and the server, so that the information safety of resources is guaranteed, and the flow is prevented from being stolen.
In this embodiment, the RTSP video source of the camera includes a main stream and a sub stream, and performs normal, standard-definition and high-definition video playing according to the actual requirements of the video user.
In this embodiment, the server-side management background further includes a rectification configuration module, configured to intelligently select a standard code stream that meets the requirements of the management system from the RTSP video sources of the video camera. No matter the code stream of the accessed video source is large or small, the rectification configuration module is used for rectification configuration, so that the value which is not higher than the standard code stream of the management system and is closest to the standard code stream can be automatically selected, the requirements of users are further ensured, the flow of the server and the users is saved, various camera resources in various forms in the market are integrated, the system breakdown caused by excessive resource consumption of the management system is effectively prevented, and the stability of the system is ensured. 720P is preferably selected as a standard code stream by the management system, and after rectification configuration is carried out by the rectification configuration module, a code stream which is closest to 720P but not higher than 720P is selected. Even if some cameras have 1080P, 2K or even 4K code streams, only 720P and below code streams closest to 720P are selected.
In this embodiment, the video user playback front end is an HTML5 front end.
In this embodiment, the server-side management background is further configured to maintain a playing state of a video user at a front-end video user for playing, for example, start playing and quit playing, so as to ensure video experience of the video user.
In this embodiment, the server-side management background starts or closes the push service of the cameras according to the open time configuration of the cameras in the group, and realizes flexible management according to the specific requirements of enterprises in various industries.
The server side management background further comprises a detection module used for detecting whether the video source of the camera is watched by someone, the push service of the camera is in a closing state by default, if the video source of the camera is watched by someone, the push service is automatically started, and if the video source of the camera is not watched by someone within a certain time, the server side management background automatically closes the push service of the corresponding camera. The intelligent on-off flow optimization is realized, the detection technology is adopted, the plug flow is automatically opened when someone sees the plug flow, the plug flow is automatically closed when nobody sees the plug flow, the server and the user flow are saved, and the efficient operation of the system is guaranteed.
The management method of the management system comprises the following steps:
(1) opening a video grouping management client and logging in; the video grouping management client automatically searches for a camera in a local area network after logging in, configures related parameters of a target camera through an ONVIF protocol interface, and acquires an RTSP video source of the camera on the basis of the ONVIF protocol;
(2) the video grouping management client reports the searched information of the plurality of cameras; the server side manages the background to group the cameras;
(3) the video user submits a playing request to a server management background through a video user playing front end;
(4) the server side management background informs the video grouping client side to start a push service;
(5) the video grouping management client pushes the acquired RTSP video source to a streaming media server and returns a playing address to a server management background;
(6) and the server side management background returns the playing address to the video user playing front end, and the video user playing front end uses the obtained playing address to pull and play the stream from the streaming media server.
The management system for the local area network camera to carry out network streaming media live broadcast is characterized in that based on an ONVIF (Internet video over fiber) international standard protocol supported by most cameras in the market, a large number of video sources in the traditional local area network are connected to a public network by combining a network streaming media live broadcast system, the video sources are connected to the network streaming media live broadcast system in an abutting joint mode, the video sources are fully and effectively utilized, the value is exerted to a greater extent, and flexible management is realized according to specific requirements of enterprises in various industries; the method has the advantages that any configuration is not needed in the cameras, the operation is very simple, and the group information of each camera in the local area network can be directly obtained by installing and logging in the video grouping management client; the cameras in the local area network can be remotely and directly added, modified, deleted and managed, convenience and rapidness are realized, and functions of integrated management, distribution optimization and the like are formed; because the network streaming media live broadcast system is directly fused, the full-platform playing is realized, the plug-in is not needed, and the video experience of the video user is greatly improved.
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 and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.