CN114071242A - Video playing method, video pushing device and electronic equipment - Google Patents

Video playing method, video pushing device and electronic equipment Download PDF

Info

Publication number
CN114071242A
CN114071242A CN202111356268.5A CN202111356268A CN114071242A CN 114071242 A CN114071242 A CN 114071242A CN 202111356268 A CN202111356268 A CN 202111356268A CN 114071242 A CN114071242 A CN 114071242A
Authority
CN
China
Prior art keywords
video
video stream
target
browser
initial
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.)
Pending
Application number
CN202111356268.5A
Other languages
Chinese (zh)
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.)
Chongqing Cisai Tech Co Ltd
Original Assignee
Chongqing Cisai Tech 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 Chongqing Cisai Tech Co Ltd filed Critical Chongqing Cisai Tech Co Ltd
Priority to CN202111356268.5A priority Critical patent/CN114071242A/en
Publication of CN114071242A publication Critical patent/CN114071242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a video playing method, a video pushing device and electronic equipment, wherein the method comprises the following steps: receiving a video playing request sent by a terminal device through a browser for a target camera, wherein the target camera is used for collecting an original video; sending a video acquisition request to the monitoring video equipment where the target camera is located, so that the monitoring video equipment can acquire an initial video stream of the target camera according to the video acquisition request; acquiring the initial video stream sent by the monitoring video equipment; converting the initial video stream into a target video stream supported by the browser; and sending the target video stream to the terminal equipment so that the terminal equipment can play the target video stream through the browser.

Description

Video playing method, video pushing device and electronic equipment
Technical Field
The application relates to the technical field of video pushing, in particular to a video playing method, a video pushing device and electronic equipment.
Background
With the enhancement of safety awareness of people, cameras to be used for monitoring are arranged in most areas. The real-time situation of each area can be known more conveniently through the monitoring camera. However, in the prior art, to play a video stream collected by a monitoring camera on a browser, a plug-in is generally required to be installed on a terminal device. In the prior art, the implementation mode increases the playing difficulty of the monitoring video, and has specific limitations on the selection and model of the browser, so that the use scene of monitoring is also limited.
Disclosure of Invention
In view of this, an object of the present application is to provide a video playing method, a video pushing device and an electronic device. The problem that the monitored use scene is limited can be solved.
In a first aspect, an embodiment of the present application provides a video playing method, a video pushing device, and an electronic device, including:
receiving a video playing request sent by a terminal device through a browser for a target camera, wherein the target camera is used for collecting an original video;
sending a video acquisition request to a monitoring video recording device where the target camera is located, so that the monitoring video recording device can acquire an initial video stream of the target camera according to the video acquisition request;
acquiring the initial video stream sent by the monitoring video equipment;
converting the initial video stream into a target video stream supported by the browser;
and sending the target video stream to the terminal equipment so that the terminal equipment can play the target video stream through the browser.
In an optional implementation manner, the sending a video acquisition request to a surveillance video recording device where the target camera is located includes:
judging whether a video playing request sent by the terminal equipment is received for the first time;
if a video playing request sent by the terminal equipment is received for the first time, generating a video acquiring message to a push service;
and sending a video acquisition request to the monitoring video equipment where the target camera is located through the push service.
In an optional embodiment, the converting the initial video stream into the target video stream supported by the browser includes:
converting the initial video stream into a target video stream of an HTTP-FLV protocol.
In an optional embodiment, the method further comprises:
receiving a playing stopping request sent by the terminal equipment through the browser;
judging whether the current video push is allowed to be interrupted or not;
and if the current video pushing is allowed to be interrupted, sending a video acquisition stopping request to a monitoring video recording device so that the monitoring video recording device stops pulling the initial video stream acquired by the target camera.
In an optional embodiment, the determining whether to allow the interruption of the current video push includes:
judging whether a playing stopping request is sent by the terminal equipment in the terminal equipment which plays the video corresponding to the target camera at present;
if the terminal equipment does not send the playing stopping request, the current video push is not allowed to be interrupted; and if the terminal equipment does not send the playing stopping request, allowing the interruption of the current video push.
In a second aspect, an embodiment of the present application provides a video pushing method, including:
receiving a video acquisition request sent by a server;
acquiring an initial video stream of a target camera according to the video acquisition request;
and sending the initial video stream to the server so that the server converts the initial video stream into a target video stream supported by a browser and plays the target video stream by the browser.
In an optional embodiment, the acquiring an initial video stream of a target camera according to the video acquisition request includes:
generating a video processing thread for pulling an initial video stream of a target camera required by the video acquisition request;
pulling the initial video stream of the target camera through the video processing thread.
In a third aspect, an embodiment of the present application provides a video playing apparatus, including:
the first receiving module is used for receiving a video playing request of a target camera sent by a terminal device through a browser, and the target camera is used for collecting an original video;
a first sending module, configured to send a video acquisition request to a video monitoring device where the target camera is located, so that the video monitoring device acquires an initial video stream of the target camera according to the video acquisition request;
a first obtaining module, configured to obtain the initial video stream sent by the surveillance video device;
the conversion module is used for converting the initial video stream into a target video stream supported by the browser;
and the second sending module is used for sending the target video stream to the terminal equipment so that the terminal equipment can play the target video stream through the browser.
In a fourth aspect, an embodiment of the present application provides a video pushing apparatus, including:
the second receiving module is used for receiving a video acquisition request sent by the server;
the second acquisition module is used for acquiring the initial video stream of the target camera according to the video acquisition request;
and a third sending module, configured to send the initial video stream to the server, so that the server converts the initial video stream into a target video stream supported by a browser, and the target video stream is played by the browser.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory storing machine-readable instructions executable by the processor, the machine-readable instructions, when executed by the processor, performing the steps of the method of the first aspect, any of the possible implementations of the first aspect, the second aspect, or any of the possible implementations of the second aspect described above, when the electronic device is run.
In a sixth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps of the method in the first aspect, any of the possible implementations of the first aspect, the second aspect, or any of the possible implementations of the second aspect.
The video playing method, the video pushing device, the electronic equipment and the computer readable storage medium provided by the embodiment of the application adopt the intermediate processing of the server, the video stream acquired by the camera can be played even if the terminal equipment is in an external network state, further, the server converts the video before sending the video to the terminal equipment, and the video stream can be directly played after being received by the browser. Based on the processing, plug-ins do not need to be installed on the terminal equipment, so that the selection and the model of the browser are limited, the diversity of the use scene is ensured, the use difficulty of a user is not increased, and the development workload and the development cost of software are reduced.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic diagram of interaction of an operating environment of a video playing method provided in an embodiment of the present application;
fig. 2 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a video playing method according to an embodiment of the present application;
fig. 4 is a schematic functional block diagram of a video playback device according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a video pushing method according to an embodiment of the present application;
fig. 6 is a schematic functional block diagram of a video pushing apparatus according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The format of a video stream acquired by a general camera is an RTSP data stream format, and image data in the RTSP data stream format all need to be installed with a plug-in on a terminal device when being played through a browser. Therefore, in order to enable the browser to play the video stream collected by the camera, a corresponding plug-in needs to be designed for each type of browser, so that the real-time picture collected by the camera can be seen on each type of browser. Thus, the work flow of developers is increased invisibly, and the burden of terminal equipment for operating the browser is also increased.
In order to solve the above problem, the video playing method and the video pushing method provided in the embodiments of the present application can convert a video stream into a video stream that can be supported by a browser of a terminal device in a server. The following is a description of the video playing method and the video pushing method provided in the embodiments of the present application through several embodiments.
To facilitate understanding of the present embodiment, first, an interaction of an operating environment for executing the video playing method disclosed in the embodiment of the present application is described.
Fig. 1 is a schematic diagram illustrating interaction among the server 110, the terminal device 120, and the monitoring and video recording device 130 according to the embodiment of the present application.
The server 110 is communicatively coupled to one or more terminal devices 120 via a network for data communication or interaction. The server 110 is communicatively coupled to one or more surveillance video recording devices 130 via a network for data communication or interaction.
The server 110 may be a web server, a database server, or the like. The terminal device 120 may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), or the like. The video surveillance equipment 130 is used for one or more camera connections to obtain video streams captured by the cameras.
In this embodiment, a browser may be run in the terminal device 120, and the relevant service provided by the server 110 may be accessed through the browser. Due to the FLV.JS component in the browser, the FLV.JS component can pull the video stream provided by the server through the http-flv protocol and play the video in the browser.
The video surveillance equipment 130 may have a video service module running therein for recording the video stream of the camera. The video service module may be an FFmpeg service module, which may be used to record digital audio and video, may also be used to convert digital audio and video, and may convert video and audio into a video stream.
As shown in fig. 2, is a block schematic diagram of an electronic device. The electronic device 200 may include a memory 211, a processor 213. It will be understood by those skilled in the art that the structure shown in fig. 2 is merely illustrative and is not intended to limit the structure of the electronic device 200. For example, electronic device 200 may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The above-mentioned elements of the memory 211 and the processor 213 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processor 213 described above is used to execute the executable modules stored in the memory.
The Memory 211 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 211 is configured to store a program, and the processor 213 executes the program after receiving an execution instruction, and the method performed by the electronic device 200 defined by the process disclosed in any embodiment of the present application may be applied to the processor 213, or implemented by the processor 213.
The processor 213 may be an integrated circuit chip having signal processing capability. The Processor 213 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In this embodiment, the server 110, the terminal device 120, and the monitoring and video recording device 130 shown in fig. 1 may include each component in the electronic device 200 shown in fig. 2, and of course, the server 110, the terminal device 120, and the monitoring and video recording device 130 shown in fig. 1 may further include more or less components than the electronic device 200 shown in fig. 2. For example, the terminal device 120 may further include a display unit, a positioning unit, and the like.
The electronic device 200 in this embodiment may be configured to perform each step in each method provided in this embodiment. The following describes the implementation process of the video playing method and the video pushing method through several embodiments.
Please refer to fig. 3, which is a flowchart illustrating a video playing method according to an embodiment of the present application. The video playing method in this embodiment may be applied to a server. The specific flow shown in fig. 3 will be described in detail below.
And step 310, receiving a video playing request for the target camera, which is sent by the terminal device through the browser.
The target camera is used for collecting an original video.
Optionally, the browser of the terminal device may access a surveillance video viewing web page provided by the server. The browser can log in a monitoring video viewing webpage provided by the server through a user account.
Illustratively, the surveillance video viewing web page may present a plurality of camera options available for viewing. When any camera option is selected, a video playing request for the camera can be started to be sent to the server.
Step 320, sending a video acquisition request to the monitoring video recording device where the target camera is located, so that the monitoring video recording device can acquire the initial video stream of the target camera according to the video acquisition request.
In this embodiment, the server may implement communication with the browser and the monitoring video device of the terminal device through the service module that implements bidirectional communication with the browser.
Illustratively, the server may communicate with the monitoring video device through a SocketIO server, and illustratively, the server and the monitoring video device may implement websocket connection through a websocket protocol.
The SocketIO is a set of specifications supporting real-time, bidirectional and event-driven communication between a server and a client. The socketIO can realize data interaction with other devices based on a Websocket protocol.
For example, a SocketIO client may operate in the monitoring video device, and the monitoring video device may communicate with a SocketIO server in the server through the SocketIO client. The socketIO client can receive the websocket message transmitted by the socketIO server.
In order to avoid repeated acquisition of the video stream of the surveillance video device and repeated operation of the server, before acquiring the video stream from the surveillance video device, it may be determined whether the server currently receives a video playing request of the target camera for the first time, based on which step 320 may include steps 321 to 323.
Step 321, determining whether a video playing request sent by the terminal device is received for the first time.
If the video playing request sent by the terminal device is received for the first time, step 322 is executed.
If the video playing request sent by the terminal equipment is not received for the first time, a playable address can be sent to the terminal equipment, so that a browser of the terminal equipment can play the video stream of the target camera.
For example, it may be determined whether a video playing request sent by the terminal device is received for the first time by determining whether a push service in the server is currently pulling a video stream of the target camera.
Optionally, the server may further record the number of times that each camera is accessed by the browser and the number of browsers currently accessing each camera, and may determine whether a video playing request sent by the terminal device is received for the first time according to the number of times that each camera is accessed by the browser and the number of browsers currently accessing each camera. For example, when the number of times that the target camera is accessed by the browser is zero, it may be determined that the video playing request sent by the terminal device is received for the first time, or when the number of browsers currently accessing the cameras is zero, it may be determined that the video playing request sent by the terminal device is received for the first time.
Step 322, generating a video acquisition message to the push service.
The push service may be the SocketIO server described above.
Step 323, sending a video acquisition request to the monitoring video recording device where the target camera is located through the push service.
Step 330, obtaining the initial video stream sent by the monitoring video device.
Illustratively, the initial video stream may be an RTMP (Real Time Messaging Protocol) video stream.
Step 340, converting the initial video stream into a target video stream supported by the browser.
Alternatively, step 340 may be implemented as: the initial video stream is converted into a target video stream of the HTTP-FLV protocol.
Illustratively, the target video stream is a video stream obtained by encoding through the H264 encoding protocol or the H265 encoding protocol.
Step 350, sending the target video stream to the terminal device, so that the terminal device can play the target video stream through the browser.
Illustratively, after the browser of the terminal device receives the target video stream, the browser can display the pictures acquired by the target camera in real time.
Based on the user requirement, the terminal equipment can also be stopped from playing the video picture of the target camera. The video playing method provided by this embodiment may further include the following steps.
And step 360, receiving a play stop request sent by the terminal device through the browser.
In step 370, it is determined whether the current video push is allowed to be interrupted.
If the interruption of the current video push is allowed, step 380 is executed.
Alternatively, step 370 may be implemented as: and judging whether a playing stopping request is not sent by the terminal equipment in the terminal equipment which plays the video corresponding to the target camera currently.
If the terminal equipment does not send the playing stopping request, the current video push is not allowed to be interrupted; and if the terminal equipment does not send the playing stopping request, allowing the interruption of the current video push.
Step 380, sending a video acquisition stopping request to the monitoring video recording device, so that the monitoring video recording device stops pulling the initial video stream collected by the target camera.
In the video playing method provided by the embodiment of the application, for a browser of a terminal device, a received target video stream sent by a server is a converted video stream, and the video stream is a video stream that can be directly played in the browser, so that the video stream of a camera can be played without installing a plug-in. Furthermore, the video stream of the camera can be played without installing plug-ins for each browser, so that the cost of designing the plug-ins required for playing the video of the camera can be reduced, and the resource requirement in the terminal equipment can be reduced.
Based on the same application concept, a video playing apparatus corresponding to the video playing method is also provided in the embodiments of the present application, and since the principle of the apparatus in the embodiments of the present application for solving the problem is similar to that in the embodiments of the video playing method, the implementation of the apparatus in the embodiments of the present application may refer to the description in the embodiments of the method, and repeated details are not repeated.
Please refer to fig. 4, which is a schematic diagram of functional modules of a video playback device according to an embodiment of the present application. Each module in the video playing apparatus in this embodiment is configured to execute each step in the foregoing method embodiment. The video playing device comprises: a first receiving module 410, a first transmitting module 420, a first obtaining module 430, a converting module 440 and a second transmitting module 450; wherein,
a first receiving module 410, configured to receive a video playing request sent by a terminal device through a browser to a target camera, where the target camera is used to collect an original video;
a first sending module 420, configured to send a video acquisition request to a monitoring video recording device where the target camera is located, so that the monitoring video recording device acquires an initial video stream of the target camera according to the video acquisition request;
a first obtaining module 430, configured to obtain the initial video stream sent by the surveillance video device;
a conversion module 440, configured to convert the initial video stream into a target video stream supported by the browser;
a second sending module 450, configured to send the target video stream to the terminal device, so that the terminal device plays the target video stream through the browser.
In one possible implementation, the first sending module 420 is configured to:
judging whether a video playing request sent by the terminal equipment is received for the first time;
if a video playing request sent by the terminal equipment is received for the first time, generating a video acquiring message to a push service;
and sending a video acquisition request to the monitoring video equipment where the target camera is located through the push service.
In one possible implementation, the conversion module 440 is configured to:
the initial video stream is converted into a target video stream of the HTTP-FLV protocol.
In a possible implementation manner, the video playing apparatus may further include:
a receiving module, configured to receive a play stop request sent by the terminal device through the browser;
the judging module is used for judging whether the current video push is allowed to be interrupted or not;
and the fourth sending module is used for sending a video acquisition stopping request to the monitoring video recording equipment if the current video pushing is allowed to be interrupted, so that the monitoring video recording equipment stops pulling the initial video stream acquired by the target camera.
In a possible implementation, the determining module is configured to:
judging whether a playing stopping request is sent by the terminal equipment in the terminal equipment which plays the video corresponding to the target camera at present;
if the terminal equipment does not send the playing stopping request, the current video push is not allowed to be interrupted; and if the terminal equipment does not send the playing stopping request, allowing the interruption of the current video push.
Please refer to fig. 5, which is a flowchart illustrating a video push method according to an embodiment of the present application. The method in the embodiment can be applied to monitoring video equipment. The specific flow shown in fig. 5 will be described in detail below.
Step 510, receiving a video acquisition request sent by a server.
For example, the monitoring video recording device may receive, through the SocketIO client, a video acquisition request sent by the server.
And step 520, acquiring an initial video stream of the target camera according to the video acquisition request.
In this embodiment, step 520 may include step 521 and step 522.
Step 521, generating a video processing thread for pulling the initial video stream of the target camera required by the video acquisition request.
A determination may be made prior to step 521 as to whether a video processing thread is present.
The video processing thread is used for analyzing image data collected by the target camera.
If a video processing thread exists, step 522 is performed by the video processing thread.
And if the video processing thread does not exist, creating the video processing thread.
In step 522, the initial video stream of the target camera is pulled by the video processing thread.
Illustratively, the video processing thread may use FFMPEG to implement a RTSP (Real Time Streaming Protocol) video stream that pulls the target camera and convert the RTSP video stream into an RTMP video stream.
Step 530, sending the initial video stream to the server, so that the server converts the initial video stream into a target video stream supported by the browser, and the target video stream is played by the browser.
The server converts the received RTMP video stream into a video stream of the HTTP-FLV protocol supported by the browser.
When the video stream pushing of the target camera needs to be interrupted, the method may further include: receiving a video acquisition stopping request sent by a server; and after receiving the video acquisition stopping request, stopping the video processing thread from pulling the video stream of the target camera, and destroying the video processing thread.
In the video pushing method provided by the embodiment of the application, the video stream can be sent to the server, and the server pushes the video stream to the browser of the terminal device, so that the resource consumption of the monitoring video equipment can be reduced, and the terminal device of the external network can play the video stream acquired by the camera.
Based on the same application concept, a video push apparatus corresponding to the video push method is further provided in the embodiments of the present application, and since the principle of the apparatus in the embodiments of the present application to solve the problem is similar to that in the embodiments of the video push method, the apparatus in the embodiments of the present application may be implemented as described in the embodiments of the method, and repeated details are omitted.
Please refer to fig. 6, which is a schematic diagram of functional modules of a video push apparatus according to an embodiment of the present application. Each module in the video pushing apparatus in this embodiment is configured to perform each step in the foregoing method embodiment. The video push apparatus includes: a second receiving module 610, a second obtaining module 620 and a third sending module 630; wherein,
a second receiving module 610, configured to receive a video acquisition request sent by a server;
a second obtaining module 620, configured to obtain an initial video stream of the target camera according to the video obtaining request;
a third sending module 630, configured to send the initial video stream to the server, so that the server converts the initial video stream into a target video stream supported by a browser, and the target video stream is played by the browser.
In a possible implementation, the second obtaining module 620 is configured to:
generating a video processing thread for pulling an initial video stream of a target camera required by the video acquisition request;
and pulling the initial video stream of the target camera through the video processing thread.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the video playing method or the video pushing method in the foregoing method embodiment are executed.
The video playing method and the computer program product of the video pushing method provided in the embodiments of the present application include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the video playing method or the video pushing method in the embodiments of the methods, which may be specifically referred to in the embodiments of the methods described above, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
This function, if implemented in the form of a software function module and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. 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 … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and all the changes or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A video playback method, comprising:
receiving a video playing request sent by a terminal device through a browser for a target camera, wherein the target camera is used for collecting an original video;
sending a video acquisition request to a monitoring video recording device where the target camera is located, so that the monitoring video recording device can acquire an initial video stream of the target camera according to the video acquisition request;
acquiring the initial video stream sent by the monitoring video equipment;
converting the initial video stream into a target video stream supported by the browser;
and sending the target video stream to the terminal equipment so that the terminal equipment can play the target video stream through the browser.
2. The method of claim 1, wherein the sending a video acquisition request to a video surveillance device in which the target camera is located comprises:
judging whether a video playing request sent by the terminal equipment is received for the first time;
if a video playing request sent by the terminal equipment is received for the first time, generating a video acquiring message to a push service;
and sending a video acquisition request to the monitoring video equipment where the target camera is located through the push service.
3. The method of claim 1, wherein the converting the initial video stream into the target video stream supported by the browser comprises:
converting the initial video stream into a target video stream of an HTTP-FLV protocol.
4. The method of claim 1, further comprising:
receiving a playing stopping request sent by the terminal equipment through the browser;
judging whether the current video push is allowed to be interrupted or not;
and if the current video pushing is allowed to be interrupted, sending a video acquisition stopping request to a monitoring video recording device so that the monitoring video recording device stops pulling the initial video stream acquired by the target camera.
5. The method of claim 4, wherein the determining whether to allow interruption of the current video push comprises:
judging whether a playing stopping request is sent by the terminal equipment in the terminal equipment which plays the video corresponding to the target camera at present;
if the terminal equipment does not send the playing stopping request, the current video push is not allowed to be interrupted; and if the terminal equipment does not send the playing stopping request, allowing the interruption of the current video push.
6. A video push method, comprising:
receiving a video acquisition request sent by a server;
acquiring an initial video stream of a target camera according to the video acquisition request;
and sending the initial video stream to the server so that the server converts the initial video stream into a target video stream supported by a browser and plays the target video stream by the browser.
7. The video pushing method according to claim 6, wherein the obtaining an initial video stream of a target camera according to the video obtaining request includes:
generating a video processing thread for pulling an initial video stream of a target camera required by the video acquisition request;
pulling the initial video stream of the target camera through the video processing thread.
8. A video playback apparatus, comprising:
the first receiving module is used for receiving a video playing request of a target camera sent by a terminal device through a browser, and the target camera is used for collecting an original video;
a first sending module, configured to send a video acquisition request to a video monitoring device where the target camera is located, so that the video monitoring device acquires an initial video stream of the target camera according to the video acquisition request;
a first obtaining module, configured to obtain the initial video stream sent by the surveillance video device;
the conversion module is used for converting the initial video stream into a target video stream supported by the browser;
and the second sending module is used for sending the target video stream to the terminal equipment so that the terminal equipment can play the target video stream through the browser.
9. A video push apparatus, comprising:
the second receiving module is used for receiving a video acquisition request sent by the server;
the second acquisition module is used for acquiring the initial video stream of the target camera according to the video acquisition request;
and a third sending module, configured to send the initial video stream to the server, so that the server converts the initial video stream into a target video stream supported by a browser, and the target video stream is played by the browser.
10. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, the machine-readable instructions when executed by the processor performing the steps of the method of any of claims 1 to 7 when the electronic device is run.
CN202111356268.5A 2021-11-16 2021-11-16 Video playing method, video pushing device and electronic equipment Pending CN114071242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111356268.5A CN114071242A (en) 2021-11-16 2021-11-16 Video playing method, video pushing device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111356268.5A CN114071242A (en) 2021-11-16 2021-11-16 Video playing method, video pushing device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114071242A true CN114071242A (en) 2022-02-18

Family

ID=80272926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111356268.5A Pending CN114071242A (en) 2021-11-16 2021-11-16 Video playing method, video pushing device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114071242A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114727152A (en) * 2022-03-21 2022-07-08 慧之安信息技术股份有限公司 Cross-platform multi-browser compatible monitoring video real-time preview method
CN114760486A (en) * 2022-03-16 2022-07-15 深圳市宏电技术股份有限公司 Live broadcasting method, device, equipment and storage medium
CN115942001A (en) * 2022-12-01 2023-04-07 青岛民航凯亚系统集成有限公司 Cross-platform video transcoding and stream pushing method for airport supervision

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108149A (en) * 2013-02-27 2013-05-15 深圳市中兴移动通信有限公司 Video call and monitoring achieving method based on hypertext markup language (HTML) 5
CN104639900A (en) * 2015-02-03 2015-05-20 广西智询信息科技有限公司 RTMP-to-M3U8 video slicing system and method
CN105898137A (en) * 2015-12-15 2016-08-24 乐视移动智能信息技术(北京)有限公司 Image collection and information push methods, image collection and information push devices and mobile phone
CN107995187A (en) * 2017-11-30 2018-05-04 上海哔哩哔哩科技有限公司 Video main broadcaster, live broadcasting method, terminal and system based on HTML5 browsers
CN109218756A (en) * 2018-09-28 2019-01-15 广州市协衡网络科技有限公司 A kind of order method of camera shooting and video, device, server and storage medium
CN110121112A (en) * 2019-05-14 2019-08-13 重庆商勤科技有限公司 A kind of video playing control method based on browser, system and device
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN110661752A (en) * 2018-06-29 2020-01-07 广州弘度信息科技有限公司 Plug-in-free real-time video playing system and method
CN111131849A (en) * 2019-12-26 2020-05-08 视联动力信息技术股份有限公司 Streaming media live broadcast method and device and computer readable storage medium
CN111225222A (en) * 2018-11-26 2020-06-02 北京奇虎科技有限公司 Video stream playing method, device and system based on screen data of RTMP (real time Messaging protocol)
CN111372128A (en) * 2020-03-11 2020-07-03 北京旷视科技有限公司 Video playing method and device, computer equipment and readable storage medium
CN112422508A (en) * 2020-10-19 2021-02-26 武汉烽火众智数字技术有限责任公司 Method and system for playing video in browser webpage
CN112866199A (en) * 2020-12-31 2021-05-28 北京优锘科技有限公司 Method for viewing device supporting GB/T28181 protocol in main stream browser
CN113225538A (en) * 2021-05-12 2021-08-06 青岛创新奇智科技集团有限公司 Monitoring video playing method and device and service equipment

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103108149A (en) * 2013-02-27 2013-05-15 深圳市中兴移动通信有限公司 Video call and monitoring achieving method based on hypertext markup language (HTML) 5
CN104639900A (en) * 2015-02-03 2015-05-20 广西智询信息科技有限公司 RTMP-to-M3U8 video slicing system and method
CN105898137A (en) * 2015-12-15 2016-08-24 乐视移动智能信息技术(北京)有限公司 Image collection and information push methods, image collection and information push devices and mobile phone
CN107995187A (en) * 2017-11-30 2018-05-04 上海哔哩哔哩科技有限公司 Video main broadcaster, live broadcasting method, terminal and system based on HTML5 browsers
CN110661752A (en) * 2018-06-29 2020-01-07 广州弘度信息科技有限公司 Plug-in-free real-time video playing system and method
CN109218756A (en) * 2018-09-28 2019-01-15 广州市协衡网络科技有限公司 A kind of order method of camera shooting and video, device, server and storage medium
CN111225222A (en) * 2018-11-26 2020-06-02 北京奇虎科技有限公司 Video stream playing method, device and system based on screen data of RTMP (real time Messaging protocol)
CN110121112A (en) * 2019-05-14 2019-08-13 重庆商勤科技有限公司 A kind of video playing control method based on browser, system and device
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN111131849A (en) * 2019-12-26 2020-05-08 视联动力信息技术股份有限公司 Streaming media live broadcast method and device and computer readable storage medium
CN111372128A (en) * 2020-03-11 2020-07-03 北京旷视科技有限公司 Video playing method and device, computer equipment and readable storage medium
CN112422508A (en) * 2020-10-19 2021-02-26 武汉烽火众智数字技术有限责任公司 Method and system for playing video in browser webpage
CN112866199A (en) * 2020-12-31 2021-05-28 北京优锘科技有限公司 Method for viewing device supporting GB/T28181 protocol in main stream browser
CN113225538A (en) * 2021-05-12 2021-08-06 青岛创新奇智科技集团有限公司 Monitoring video playing method and device and service equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760486A (en) * 2022-03-16 2022-07-15 深圳市宏电技术股份有限公司 Live broadcasting method, device, equipment and storage medium
CN114727152A (en) * 2022-03-21 2022-07-08 慧之安信息技术股份有限公司 Cross-platform multi-browser compatible monitoring video real-time preview method
CN114727152B (en) * 2022-03-21 2023-01-10 慧之安信息技术股份有限公司 Cross-platform multi-browser compatible monitoring video real-time preview method
CN115942001A (en) * 2022-12-01 2023-04-07 青岛民航凯亚系统集成有限公司 Cross-platform video transcoding and stream pushing method for airport supervision

Similar Documents

Publication Publication Date Title
CN114071242A (en) Video playing method, video pushing device and electronic equipment
KR101467430B1 (en) Method and system for providing application based on cloud computing
CN109299326B (en) Video recommendation method, device and system, electronic equipment and storage medium
CN102696035A (en) Systems, methods, and program applications for selectively restricting the placeshifting of copy protected digital media content
CN112261377B (en) Web edition monitoring video playing method, electronic equipment and storage medium
KR102104409B1 (en) Image Recording system based on Open-platform and protocol-conversion method thereof
CN113225538A (en) Monitoring video playing method and device and service equipment
CN103369367A (en) System and method to improve user experience with streaming content
US20170353753A1 (en) Communication apparatus, communication control method, and communication system
CN110740386A (en) Live broadcast switching method and device and storage medium
CN112995698A (en) Video playing method, client, service platform and intelligent conference system
US20160373816A1 (en) Automation testing apparatus
CN112822435A (en) Security method, device and system allowing user to easily access
US10015395B2 (en) Communication system, communication apparatus, communication method and program
CN111866058B (en) Data processing method and system
CN111918074A (en) Live video fault early warning method and related equipment
CN116261021A (en) Video stream playing method and device, electronic equipment and storage medium
CN111093091A (en) Video processing method, server and system
CN109756756B (en) Video playing method and video playing device
CN114374869B (en) Panoramic video playing method and device and computer storage medium
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
US10904305B2 (en) Media streaming using a headless browser
CN103974087A (en) Video image file compressing system, client and method
CN113794932A (en) Method and device for playing video stream at webpage end, electronic equipment and storage medium
CN114630134B (en) Processing method and system for newly added code stream

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220218

RJ01 Rejection of invention patent application after publication