CN108307202B - Real-time video transcoding sending method and device and user terminal - Google Patents

Real-time video transcoding sending method and device and user terminal Download PDF

Info

Publication number
CN108307202B
CN108307202B CN201810187947.6A CN201810187947A CN108307202B CN 108307202 B CN108307202 B CN 108307202B CN 201810187947 A CN201810187947 A CN 201810187947A CN 108307202 B CN108307202 B CN 108307202B
Authority
CN
China
Prior art keywords
transcoding
video
real
network port
data packet
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
CN201810187947.6A
Other languages
Chinese (zh)
Other versions
CN108307202A (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.)
Guangzhou Tuppy Network Technology Co Ltd
Original Assignee
Guangzhou Tuppy Network Technology 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 Guangzhou Tuppy Network Technology Co Ltd filed Critical Guangzhou Tuppy Network Technology Co Ltd
Priority to CN201810187947.6A priority Critical patent/CN108307202B/en
Publication of CN108307202A publication Critical patent/CN108307202A/en
Application granted granted Critical
Publication of CN108307202B publication Critical patent/CN108307202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • 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
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • 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
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

the invention discloses a real-time video transcoding sending method, which is applied to a user terminal and a cloud server and comprises the following steps: encapsulating the input transcoding code stream according to a preset stream encapsulation format to obtain a video stream data packet; according to the intercommunication condition of a local area network where a user terminal is located and the Internet, the video stream data packet is sent through a first network port or a second network port, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet; and sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access. The invention also discloses a real-time video transcoding transmitting device, a user terminal and a computer storage medium. The technical scheme provided by the invention solves the problem of real-time video remote transmission and monitoring under the condition that the local area network is isolated or not isolated, and increases the system compatibility and the practicability.

Description

Real-time video transcoding sending method and device and user terminal
Technical Field
the present invention relates to the field of communications, and in particular, to a method and an apparatus for transmitting a real-time video transcoding, and a user terminal.
background
With the rapid development of science and technology, in order to meet the requirements of video users to the maximum extent, a video real-time transmission technology is continuously developed, on one hand, a camera is also developed to a current high-definition digital camera from an original analog camera, on the other hand, the camera is subjected to real-time acquisition and processing of video data, then the video data are uploaded to a cloud server, and the video real-time transmission of the video data which are downloaded to one or more background user sides through the cloud server is also a mainstream at present.
The use of a large number of high-definition digital cameras leads to a rapid increase in the output video code stream, the cost of the transmission bandwidth is higher, and a common commercial camera usually adopts the peltier system (PAL system), that is, the output single-channel video code stream transmits 25 frames of pictures per second, and usually occupies about 2M or more of the transmission bandwidth. To realize remote real-time transmission of multiple video camera streams, the real-time transmission of video is usually accelerated by increasing the bandwidth, which is also very expensive.
In addition, for some video monitoring of merchants or companies, the video monitoring is generally deployed in an intranet environment and can be accessed in a local area network, but the external network cannot necessarily be accessed, and particularly, when the local area network is isolated, remote real-time monitoring cannot be directly realized, so that the application scene of the existing video monitoring system is often limited by the intercommunication condition of the local area network and the external network and can only be applied to a certain network condition, for example, when the local area network can access the external network, the video monitoring system can be uploaded to a cloud server to realize remote monitoring, and when the local area network is isolated, the video monitoring system is only applied to video monitoring in the intranet.
disclosure of Invention
In view of the above problems, the present invention provides a method, an apparatus and a user terminal for transcoding a real-time video.
In order to solve the above problems, the present invention provides a method for transmitting a real-time video stream transcoding, which is applied to a user terminal and a cloud server, and comprises:
Encapsulating the input transcoding code stream according to a preset stream encapsulation format to obtain a video stream data packet;
According to the intercommunication condition of a local area network where a user terminal is located and the Internet, the video stream data packet is sent through a first network port or a second network port, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet;
and sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access.
Further, the "sending the video stream data packet through the first network port or the second network port according to the intercommunication between the local area network where the user terminal is located and the internet" includes:
if the video stream data packets are communicated with the cloud server, the video stream data packets are selected to be sent to the cloud server through the first internet access; and if the video stream data packet is not communicated with the cloud server, the video stream data packet is selected to be sent to the cloud server through the second network port.
Further, the "interworking between the local area network where the user terminal is located and the internet" includes:
And detecting the intercommunication condition of the local area network and the Internet by checking the gateway address of the local area network and testing whether the gateway address can access the Internet.
Further, the preset transmission protocol is an RTMP protocol.
In addition, the present invention also provides a real-time video transcoding transmitting apparatus, which is applied to a user terminal and a cloud server, and includes:
The packaging unit is used for packaging the input transcoding code stream according to a preset stream packaging format to obtain a video stream data packet;
the network port management unit is used for selecting a first network port or a second network port to send the video stream data packet according to the intercommunication condition between a local area network where the user terminal is located and the Internet, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet;
And the sending unit is used for sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access.
Further, the network port management unit is configured to detect an interworking condition between the local area network and the internet, and if interworking occurs, select to send the video stream data packet to a cloud server through the first network port; and if the video stream data packet is not communicated with the cloud server, the video stream data packet is selected to be sent to the cloud server through the second network port.
further, the sending unit sends the video stream data packet to the cloud server through an RTMP protocol.
further, the real-time video transcoding transmitting apparatus further includes:
the acquisition module is used for acquiring video image signals output by the analog and digital cameras in real time;
And the transcoding module is used for transcoding the video image signal in real time and obtaining the transcoded code stream.
In addition, the invention also provides a user terminal, which comprises a memory and a processor, wherein the memory is used for storing the real-time video transcoding sending program, and the processor runs the real-time video transcoding sending program so as to enable the user terminal to execute the real-time video transcoding sending method.
Furthermore, the present invention also provides a computer storage medium, in which a computer program is stored, and the computer program controls the computer storage medium to execute the real-time video transcoding transmitting method as described above.
The real-time video transcoding sending method, the device and the user terminal provided by the invention are not limited by whether the local area network where the user terminal is located is communicated with the Internet or not, are suitable for real-time video remote transmission and monitoring under the condition that the local area network where the user terminal is located is not isolated or isolated, and increase the system compatibility and the practicability.
drawings
in order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 is a flowchart illustrating a real-time video stream transcoding method according to a first embodiment of the present invention;
Fig. 2 is a flowchart illustrating a real-time video stream transcoding method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a real-time video stream transcoding and transmitting apparatus according to the present invention;
Fig. 4 is a schematic structural diagram of an acquisition module of the real-time video stream transcoding transmitting apparatus according to the present invention;
fig. 5 is a schematic structural diagram of a transcoding module of the apparatus for transcoding a real-time video stream according to the present invention;
Fig. 6 is a schematic structural diagram of a portal management unit of the apparatus for real-time transcoding and transmitting a video stream according to the present invention.
Description of the main element symbols:
An acquisition module-100; a transcoding module-200; a packaging unit-300; a network port management unit-400; a transmitting unit-500;
An analog acquisition unit-110; a digital acquisition unit-120;
An image frame acquisition unit-210; a frame extraction processing unit-220; an encoding unit-230;
A first portal-410; a second port-420; management unit-430.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the real-time video stream transcoding method is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The following detailed description of embodiments of the invention refers to the accompanying drawings.
the real-time video transcoding sending method is suitable for a video transcoding sending system, and transcoding code streams obtained after real-time video transcoding are subjected to corresponding format packaging processing and sent to a cloud server for a background user to perform remote monitoring or viewing and other operations.
Example 1
Fig. 1 is a flowchart illustrating a real-time video stream transcoding transmitting method according to a first embodiment of the present invention. The method provided by the invention is applied to the user terminal and the cloud server, and comprises the following steps:
And S100, encapsulating the input transcoding code stream according to a preset stream encapsulation format to obtain a video stream data packet.
The method includes the steps that format encapsulation needs to be carried out on an input transcoding code stream before the input transcoding code stream is sent to a cloud server, the preset stream encapsulation format adopts an FLV (flash video) encapsulation format, and video stream data packets in the FLV format are obtained through encapsulation according to the FLV encapsulation format, wherein the preset video stream format encapsulation can also be in an RMVB format, an MKV format (MKV, Multimedia Container), an MPEG2-TS format and the like.
and S200, sending the video stream data packet through a first network port or a second network port according to the intercommunication condition of the local area network where the user terminal is located and the Internet, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet.
the local area network is an internal network including a camera and a video monitoring user terminal, the internet is other wide area networks except the local area network, generally referred to as external networks, and the cloud server is in the internet. The first network port is connected with the local area network, the second network port is connected with the internet, and the priority of the first network port is preset to be higher than that of the second network port. If the local area network is communicated with the internet, the internet can be accessed through both the first network port and the second network port, and the video stream data packet is preferentially sent to the cloud server through the first network port according to the preset priority, while the second network port is reserved for standby so as to reduce the power consumption of the system, and at the moment, the first network port is not only responsible for communicating with the camera in the local area network to acquire the video image signal of the camera in real time, but also responsible for sending the video stream data packet to the cloud server. If the local area network is not intercommunicated with the Internet, the local area network is isolated and cannot send data to an external network through the first network port, so that the video stream data packet is sent to the cloud server through the second network port, and the first network port is still connected with the local area network and is used for collecting video image signals of the camera.
The intercommunication condition of the local area network and the internet can be determined by checking the gateway address of the local area network and testing whether the gateway address can normally access an external network website, if so, the intercommunication of the local area network and the internet is indicated, otherwise, the intercommunication of the local area network and the internet is not indicated.
And S300, sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access.
the preset transmission Protocol is a Real Time Message Protocol (RTMP Protocol) and belongs to an application layer Protocol. In the process of transmitting media data by the RTMP protocol, firstly establishing RTMP connection based on a transmission layer connection through 'handshaking', then encapsulating the media data into messages and dividing the messages into message blocks, and finally sending the divided message blocks out through the TCP protocol. The transport layer protocol is a Transmission Control Protocol (TCP), which is a connection-oriented, reliable transport layer communication protocol based on byte streams.
In this embodiment, sending the video stream packet to the cloud server based on the RTMP protocol and the selected internet access specifically includes: and performing RTMP connection with the cloud server, packaging the video stream data packet into a message, dividing the message into message blocks, and finally sending the divided message blocks to the cloud server through a TCP (transmission control protocol). And the cloud server receives and recombines the messages, and then the video stream data can be recovered by decapsulating the messages.
the real-time video transcoding sending method provided by the invention can select the corresponding network port to send the video stream data packet according to the intercommunication condition of the local area network where the camera is positioned and the Internet without being limited by whether the local area network is isolated or not, thereby increasing the system compatibility and the practicability.
Example 2
Fig. 2 is a diagram illustrating a real-time video transcoding transmitting method according to a second embodiment of the present invention. Based on the first embodiment, the second embodiment further includes the following steps:
Step S10: raw image data of an input video is acquired.
The input video comprises an analog video image signal output by an analog camera and a digital video image signal output by a digital camera, and the original image data is obtained by acquiring the video image signal in real time and carrying out corresponding processing.
Specifically, the analog video image signal is acquired in real time and is subjected to corresponding digital processing to obtain digital original image data, where the digital processing specifically may include: sampling, quantization, coding, data separation processing of gray level and color of the image, and the like.
For a digital video image signal output by a digital camera or a network camera in a local area network, an RTSP Protocol (Real Time Streaming Protocol) may be adopted to collect the digital video image signal, which may specifically include: and acquiring the IP address of the digital camera or the network camera, establishing a transmission layer protocol-based connection with the camera, acquiring an RTSP video stream, and performing protocol analysis and coding format decoding on the acquired RTSP video stream to acquire original image data.
step S20: and performing corresponding transcoding processing on the original image data to obtain a transcoded code stream.
the corresponding transcoding process specifically includes: obtaining an original image frame from the original image data; extracting the original image frame according to a preset frame extraction rule to obtain an extracted image frame; selecting corresponding frames from the extracted image frames as key frames according to a preset frame interval, and taking other frames as common frames; and performing compression coding on the key frames and the common frames according to a preset compression coding algorithm to obtain the transcoding code stream.
The preset frame extraction rule adopts equal-interval frame extraction, specifically, an interval value is obtained by rounding the ratio of the input frame rate of the input video to the target frame rate, and the original image frames are extracted at equal intervals according to the interval value. The preset decimation frame principle can include, but is not limited to, equal interval decimation frames, and can also include progressive interval decimation frames, random decimation frames, and the like.
the preset inter-frame distance refers to the number of frames between two preset key frames. The key frame comprises a complete picture, and other frames are not required to be relied on to complete image reconstruction. The extracted image frames are from original image frames which are independent from each other, so that key frames selected from the extracted image frames all comprise complete pictures, and the position of the next key frame is determined according to the preset frame interval. In this embodiment, the first frame of the extracted image frames is selected as the first key frame, and corresponding other frames are selected from the extracted image frames as the second to nth key frames according to the preset inter-frame distance. The key frames and the common frames are compressed and encoded according to a preset compression encoding algorithm to obtain a transcoding code stream, wherein the obtained transcoding code stream is also called a sequence, generally consists of 1I frame and a plurality of P frames or consists of 1I frame, a plurality of P frames and B frames, and starts from the I frame until the next I frame arrives.
The I frame is also called an intra-frame prediction coding frame and is obtained by carrying out compression coding on intra-frame space redundant information on the key frame, and a complete image can be reconstructed by only using the data of the I frame during decoding. The P frame is obtained by inter-frame compression coding the normal frame with the I frame as a reference, wherein the P frame is also called a forward predictive coding frame, and is obtained by compressing data of the frame according to different points between the frame and an adjacent previous frame (I frame or P frame), and a complete picture needs to be reconstructed with reference to image information of the previous frame (I frame or P frame) during decoding. The B frame is also called a bidirectional predictive coding frame, and compresses data of a frame according to a difference between an adjacent previous frame (I frame or P frame), the frame and a next frame (P frame), and a complete picture needs to be reconstructed with reference to image information of the previous frame (I frame or P frame) and the next frame (P frame) when decoding.
in the embodiment, an H.264 compression coding algorithm is adopted to perform intraframe compression coding on the key frame to obtain an I frame; and performing interframe compression coding on the common frame by taking the I frame as a reference to obtain a P frame, wherein the I frame and the P frame form the transcoding code stream. The common frame in this embodiment may be encoded into a P frame or a B frame, so that the transcoded bit stream is composed of an I frame, a P frame, and a B frame. The compression coding algorithm is not limited to the h.264 algorithm, but may be an MPEG-4 algorithm, an h.265 algorithm, or a hybrid algorithm combining the above listed algorithms, and the like. And then, step S100, step S200 and step S300 are executed to send the transcoded code stream to the cloud server.
According to the invention, the video image signals are collected, the corresponding original image data are obtained, then the frame extraction transcoding processing is carried out on the original image data, and the transcoded code stream after the frame extraction transcoding is sent to the cloud server, so that the system compatibility and the practicability are increased, the transmission frame rate is reduced, and the video transmission bandwidth cost is reduced.
Example 3
Fig. 3 is a schematic structural diagram of a real-time video stream transcoding transmitting device according to the present invention. The real-time video stream transcoding and transmitting device comprises: encapsulation unit 300, portal management unit 400, and sending unit 500. The apparatus for transcoding and sending a real-time video stream provided by this embodiment further includes: an acquisition module 100 and a transcoding module 200.
The acquisition module 100 is used for acquiring a video image signal of a local camera in real time, and referring to fig. 4, the acquisition module 100 specifically includes: an analog acquisition unit 110 and a digital acquisition unit 120. After establishing physical connection with an analog camera through a coaxial cable, the analog acquisition unit 110 directly performs video real-time acquisition on an analog video image signal and obtains original image data in a digital form through corresponding digital processing; the digital collecting unit 120 collects the digital video image signal of the digital camera or the network camera in the local area network through the RTSP protocol. The acquisition module 100 may also acquire and process multiple corresponding video image signals through multiple analog or digital acquisition channels, respectively.
The acquisition module 100 may further include only an analog acquisition unit 110 or a digital acquisition unit 120, so as to perform single-path or multi-path video acquisition on the corresponding cameras.
the transcoding module 200 is configured to perform corresponding transcoding processing on the original image data obtained by the acquisition module 100, and referring to fig. 5, the transcoding module 200 includes: an image frame acquiring unit 210, a frame extracting processing unit 220 and an encoding unit 230. The video transcoding process of this embodiment is: the image frame acquiring unit 210 reads the original image data from the acquisition module 100 to acquire original image frames of each frame and sends the original image frames to the frame extracting unit 220 for frame extracting. The frame extraction processing unit 220 extracts the original image frames according to an equal-interval frame extraction rule to obtain extracted image frames, where the equal-interval frame extraction rule is to obtain interval values by rounding a ratio of an input frame rate to a target frame rate of the video, and extract the original image frames at equal intervals according to the interval values. The encoding unit 230 performs compression encoding on the extracted image frame according to a preset compression encoding algorithm to obtain a transcoding code stream. In the embodiment, an H.264 compression coding algorithm is adopted to perform compression coding on the extracted image frame and finally obtain an H.264 transcoding code stream.
The transcoding module 200 may also adopt other transcoding methods, for example, frame extraction is performed on the acquired video data according to a preset frame extraction rule, and then the extracted frame data is completely decoded and re-encoded, so as to achieve the purpose of frame-dropping transcoding of the video. The preset frame extraction rule may not be limited to equal-interval frame extraction, but may also be a random frame or progressive frame extraction. The preset compression encoding algorithm may not be limited to the h.264 algorithm, but may also be an MPEG-4 algorithm, an h.265 algorithm, or the like.
The encapsulating unit 300 is configured to encapsulate the input transcoded bit stream according to a preset stream encapsulation format to obtain a video stream packet. In this embodiment, the transcoded bit stream is encapsulated into an FLV video stream packet by using an FLV encapsulation format.
The port management unit 400 is configured to select, according to an interworking condition between the local area network where the camera is located and the internet, to send the video stream data packet through a first port or a second port, where the first port is connected to the local area network and the second port is connected to the internet.
Referring to fig. 6, the portal management unit 400 includes a first portal 410, a second portal 420 and a management unit 430, where the first portal 410 is used for connecting to the lan, the second portal 420 is used for connecting to the internet, and the management unit 430 is used for detecting an interworking condition between the lan and the internet and selecting the first portal or the second portal to send the video stream packet according to a detection result.
The sending unit 500 is configured to send the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access. In this embodiment, an RTMP protocol is used to send the video stream packet to the cloud server.
The real-time video transcoding sending device provided by the invention can select the corresponding network port to send the video streaming data packet according to the intercommunication condition of the local area network where the user terminal is located and the Internet without being limited by whether the local area network is isolated or not, and the system compatibility and the practicability are improved.
The invention also provides a user terminal which comprises a memory and a processor, wherein the memory is used for storing the real-time video transcoding sending program, and the processor runs the real-time video transcoding sending program so as to enable the user terminal to execute the real-time video transcoding sending method.
The invention also provides a computer storage medium, in which a computer program is stored, and the computer program controls the computer storage medium to make a computer execute the real-time video transcoding sending method as described above when running.
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 invention. 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 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, each functional module or unit in each embodiment of the present invention 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.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. 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.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention 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 invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A real-time video transcoding sending method is applied to a user terminal and a cloud server, and is characterized by comprising the following steps:
Acquiring a video image signal of a camera and acquiring original image data corresponding to the video image signal;
Obtaining an original image frame from the original image data; extracting the original image frame according to a preset frame extraction rule to obtain an extracted image frame; selecting corresponding frames from the extracted image frames as key frames according to a preset frame interval, and taking other frames as common frames; performing compression coding on the key frames and the common frames according to a preset compression coding algorithm to obtain a transcoding code stream;
packaging the transcoding code stream according to a preset stream packaging format to obtain a video stream data packet;
according to the intercommunication condition of a local area network where a user terminal is located and the Internet, the video stream data packet is sent through a first network port or a second network port, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet;
If the communication is carried out, the video stream data packet is selected to be sent through the first network port; if not, selecting to send the video stream data packet through the second network port;
And sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access.
2. the method for transcoding and transmitting a real-time video according to claim 1, wherein the step of "according to the interworking between the local area network where the user terminal is located and the internet" comprises:
and detecting the intercommunication condition of the local area network and the Internet by checking the gateway address of the local area network and testing whether the gateway address can access the Internet.
3. The method for transcoding and transmitting real-time video according to claim 1, wherein the predetermined transmission protocol is an RTMP protocol.
4. a real-time video transcoding transmitting device is applied to a user terminal and a cloud server, and is characterized by comprising:
The acquisition module is used for acquiring a video image signal of a camera and acquiring original image data corresponding to the video image signal;
The transcoding module is used for obtaining an original image frame through the original image data; extracting the original image frame according to a preset frame extraction rule to obtain an extracted image frame; selecting corresponding frames from the extracted image frames as key frames according to a preset frame interval, and taking other frames as common frames; performing compression coding on the key frames and the common frames according to a preset compression coding algorithm to obtain a transcoding code stream;
the packaging unit is used for packaging the transcoding code stream according to a preset stream packaging format to obtain a video stream data packet;
the network port management unit is used for selecting a first network port or a second network port to send the video stream data packet according to the intercommunication condition between a local area network where the user terminal is located and the Internet, wherein the first network port is connected with the local area network, and the second network port is connected with the Internet;
If the communication is carried out, the video stream data packet is selected to be sent through the first network port; if not, selecting to send the video stream data packet through the second network port;
and the sending unit is used for sending the video stream data packet to a cloud server according to a preset transmission protocol and the selected internet access.
5. The real-time video transcoding transmitting apparatus according to claim 4,
The sending unit sends the video stream data packet to the cloud server through an RTMP protocol.
6. a user terminal comprising a memory for storing a real-time video transcoding transmitting program and a processor for executing the real-time video transcoding transmitting program to cause the user terminal to perform the real-time video transcoding transmitting method according to any one of claims 1 to 3.
7. a computer storage medium, wherein a computer program is stored in the computer storage medium, and the computer program controls the computer storage medium to execute the real-time video transcoding transmitting method according to any one of claims 1 to 3.
CN201810187947.6A 2018-03-07 2018-03-07 Real-time video transcoding sending method and device and user terminal Active CN108307202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810187947.6A CN108307202B (en) 2018-03-07 2018-03-07 Real-time video transcoding sending method and device and user terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810187947.6A CN108307202B (en) 2018-03-07 2018-03-07 Real-time video transcoding sending method and device and user terminal

Publications (2)

Publication Number Publication Date
CN108307202A CN108307202A (en) 2018-07-20
CN108307202B true CN108307202B (en) 2019-12-13

Family

ID=62849545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810187947.6A Active CN108307202B (en) 2018-03-07 2018-03-07 Real-time video transcoding sending method and device and user terminal

Country Status (1)

Country Link
CN (1) CN108307202B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618139A (en) * 2019-01-10 2019-04-12 深圳市华金盾信息科技有限公司 A kind of intelligent video monitoring system and method for view-based access control model routing
CN110602445B (en) * 2019-08-13 2021-06-15 万翼科技有限公司 Video monitoring data acquisition method and device, computer equipment and storage medium
CN112822511A (en) * 2020-12-31 2021-05-18 深圳康佳电子科技有限公司 Video processing method, system, intelligent terminal and computer readable storage medium
CN112822029A (en) * 2021-02-03 2021-05-18 广州市保伦电子有限公司 Recording acquisition method, module and device capable of blocking external signals
CN113949848B (en) * 2021-10-18 2023-06-27 重庆紫光华山智安科技有限公司 Data transmission method, device, equipment and medium
CN114630051B (en) * 2022-03-28 2023-06-09 阿里巴巴(中国)有限公司 Video processing method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148964A (en) * 2011-04-14 2011-08-10 杭州卓沃电子商务有限公司 Three-generation (3G) mobile internet video monitoring system
CN102891899A (en) * 2012-11-08 2013-01-23 山东中孚信息产业股份有限公司 System and monitoring method of remote monitoring isolation equipment
CN203734701U (en) * 2013-11-27 2014-07-23 国家电网公司 Security zone crossing enterprise service bus transmission system
CN203827381U (en) * 2013-12-05 2014-09-10 成都烨软科技有限公司 Novel network safety equipment
CN105391613A (en) * 2015-11-19 2016-03-09 四川中鼎自动控制有限公司 Hydropower station Ethernet-type security isolation device inside-outside universal data bridge
CN205249385U (en) * 2015-11-25 2016-05-18 广州佰柏信息科技有限公司 Network camera and entrance guard remote management system
CN105657060A (en) * 2016-03-17 2016-06-08 深圳市楚邦智能技术有限公司 Intelligent equipment cloud platform management system
CN105721476A (en) * 2016-02-25 2016-06-29 深圳市亿威尔信息技术股份有限公司 Network security management system and method
CN206698341U (en) * 2016-12-15 2017-12-01 中国电子科技集团公司第十四研究所 A kind of intranet and extranet Video security monitoring device based on digital-to-analogue conversion

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9729425B2 (en) * 2012-11-29 2017-08-08 Futurewei Technologies, Inc. Transformation and unified control of hybrid networks composed of OpenFlow switches and other programmable switches

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148964A (en) * 2011-04-14 2011-08-10 杭州卓沃电子商务有限公司 Three-generation (3G) mobile internet video monitoring system
CN102891899A (en) * 2012-11-08 2013-01-23 山东中孚信息产业股份有限公司 System and monitoring method of remote monitoring isolation equipment
CN203734701U (en) * 2013-11-27 2014-07-23 国家电网公司 Security zone crossing enterprise service bus transmission system
CN203827381U (en) * 2013-12-05 2014-09-10 成都烨软科技有限公司 Novel network safety equipment
CN105391613A (en) * 2015-11-19 2016-03-09 四川中鼎自动控制有限公司 Hydropower station Ethernet-type security isolation device inside-outside universal data bridge
CN205249385U (en) * 2015-11-25 2016-05-18 广州佰柏信息科技有限公司 Network camera and entrance guard remote management system
CN105721476A (en) * 2016-02-25 2016-06-29 深圳市亿威尔信息技术股份有限公司 Network security management system and method
CN105657060A (en) * 2016-03-17 2016-06-08 深圳市楚邦智能技术有限公司 Intelligent equipment cloud platform management system
CN206698341U (en) * 2016-12-15 2017-12-01 中国电子科技集团公司第十四研究所 A kind of intranet and extranet Video security monitoring device based on digital-to-analogue conversion

Also Published As

Publication number Publication date
CN108307202A (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN108307202B (en) Real-time video transcoding sending method and device and user terminal
US11915144B2 (en) Apparatus, a method and a computer program for running a neural network
CN107211167A (en) Video is decoded
MX2013008757A (en) Adaptive bit rate control based on scenes.
WO2012152649A1 (en) Method for dynamically adapting video image parameters for facilitating subsequent applications
US10284877B2 (en) Video encoder
CN112565224B (en) Video processing method and device
CN108632679B (en) A kind of method that multi-medium data transmits and a kind of view networked terminals
CN114630051A (en) Video processing method and system
CN112235606A (en) Multi-layer video processing method, system and readable storage medium
US9948903B2 (en) Method for configuration of video stream output from a digital video camera
CN114125448B (en) Video coding method, decoding method and related devices
US20240080487A1 (en) Method, apparatus for processing media data, computer device and storage medium
CN113747191A (en) Video live broadcast method, system, equipment and storage medium based on unmanned aerial vehicle
CN113630576A (en) Adaptive video streaming system and method
CN113132686A (en) Local area network video monitoring implementation method based on domestic linux system
US10225586B2 (en) Method for transmitting video surveillance images
US8208555B2 (en) Image capturing and transmission device and image receiving and reconstruction device
CN113727073A (en) Method and system for realizing vehicle-mounted video monitoring based on cloud computing
CN113596377A (en) Monitoring video conversion device and system for satellite communication
CN110493244A (en) A kind of video capture method based on CMSP
KR102101507B1 (en) Method and Apparatus for Lossless Network Video Transmission
WO2023030070A1 (en) Coding method and apparatus, encapsulation method and apparatus, display method and apparatus, and electronic device
CN112468819A (en) Video image plug flow system and equipment
Yun et al. Edge Media Server for Real-Time 4K Video Streaming with Multiple 5G-Enabled Drones

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Real-time video transcoding transmission method, device and user terminal

Effective date of registration: 20200630

Granted publication date: 20191213

Pledgee: China Co. truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: GUANGZHOU TUPU NETWORK TECHNOLOGY Co.,Ltd.

Registration number: Y2020440000172

PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20210906

Granted publication date: 20191213

Pledgee: China Co. truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: GUANGZHOU TUPU NETWORK TECHNOLOGY Co.,Ltd.

Registration number: Y2020440000172

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Real time video transcoding transmission method, device and user terminal

Effective date of registration: 20210914

Granted publication date: 20191213

Pledgee: China Co. truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: GUANGZHOU TUPU NETWORK TECHNOLOGY Co.,Ltd.

Registration number: Y2021440000288

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230519

Granted publication date: 20191213

Pledgee: China Co. truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: GUANGZHOU TUPU NETWORK TECHNOLOGY CO.,LTD.

Registration number: Y2021440000288

PC01 Cancellation of the registration of the contract for pledge of patent right