CN112312137A - Video transmission method and device, electronic equipment and storage medium - Google Patents

Video transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112312137A
CN112312137A CN202011162751.5A CN202011162751A CN112312137A CN 112312137 A CN112312137 A CN 112312137A CN 202011162751 A CN202011162751 A CN 202011162751A CN 112312137 A CN112312137 A CN 112312137A
Authority
CN
China
Prior art keywords
video
network bandwidth
real
target video
frame
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
CN202011162751.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.)
Tangqiao Technology Hangzhou Co ltd
TechBridge Inc
Original Assignee
Tangqiao Technology Hangzhou 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 Tangqiao Technology Hangzhou Co ltd filed Critical Tangqiao Technology Hangzhou Co ltd
Priority to CN202011162751.5A priority Critical patent/CN112312137A/en
Publication of CN112312137A publication Critical patent/CN112312137A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • 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/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention discloses a video transmission method, a video transmission device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining the current real-time network bandwidth; adjusting the code rate of a video encoder according to the real-time network bandwidth and a preset expected network bandwidth; compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video; and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end. The technical scheme of the embodiment of the invention ensures the real-time transmission of the video between the video sending end and the video server and can ensure the video picture quality.

Description

Video transmission method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a video transmission method and device, electronic equipment and a storage medium.
Background
Video real-time transmission is widely applied to various industries, and a network carrying video transmission may encounter abnormal conditions such as interference, congestion and the like at any time. How is real-time transmission of video pictures still guaranteed in case of a network transmission channel becoming poor? At present, there are various measures to cope with the above problem, and in practice, measures to appropriately increase video transmission delay or reduce video picture quality are often used.
However, in the application scenarios such as remote inquiry or remote control in the medical industry, the requirements on the real-time performance of video transmission and the quality of video pictures are high, and the corresponding means of increasing video transmission delay or reducing the quality of video pictures cannot be applied to the relevant application scenarios in the medical industry.
Disclosure of Invention
Embodiments of the present invention provide a video transmission method, an apparatus, an electronic device, and a storage medium, which ensure real-time transmission of a video between a video sending end and a video server and can ensure video picture quality.
In a first aspect, an embodiment of the present invention provides a video transmission method, where the method includes:
determining the current real-time network bandwidth;
adjusting the code rate of a video encoder according to the real-time network bandwidth and a preset expected network bandwidth;
compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video;
and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
In a second aspect, an embodiment of the present invention further provides a video transmission apparatus, where the apparatus includes:
the determining module is used for determining the current real-time network bandwidth;
the adjusting module is used for adjusting the code rate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth;
the compression module is used for compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video;
and the sending module is used for sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a video transmission method as in any one of the embodiments of the invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the video transmission method according to any one of the embodiments of the present invention.
According to the video transmission method provided by the embodiment of the invention, when the current real-time network bandwidth is determined to be incapable of matching with the target video to be transmitted, the code rate of a video encoder is adjusted according to the real-time network bandwidth and the preset expected network bandwidth; compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video; and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end, thereby preferentially ensuring the real-time transmission of the video and simultaneously ensuring the picture quality of the video to a greater extent.
Drawings
The above and other features, advantages and aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of a video transmission method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a video transmission architecture according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a video transmission method according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating another video transmission method according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video transmission apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
Example one
Fig. 1 is a flowchart illustrating a video transmission method according to an embodiment of the present invention. The method is applied to a video sending end, in particular to an application scene that the video sending end sends videos to a video server. Referring to fig. 2, a schematic diagram of a video transmission architecture specifically includes: alice serving as a video sending end transmits a video to be sent to a video server RTC _ server through a network Path1, and the video server RTC _ server transmits the received video to a video receiving end Bob through a network Path 2. Preferably, in this embodiment, the video sending end may be a camera device used in the medical industry, and the video receiving end may be any electronic device with a video playing function, such as a personal computer, a mobile phone, and a smart television.
The technical solution provided by this embodiment mainly aims at how to ensure real-time transmission of video and picture quality of video when the network of the network Path1 is weak. The video transmission method may be performed by a video transmission apparatus, which may be implemented in the form of software and/or hardware, and is generally integrated with a video transmitting end.
As shown in fig. 1, a video transmission method provided in an embodiment of the present invention includes the following steps:
step 110, determining the current real-time network bandwidth.
Wherein, determining the current real-time network bandwidth comprises:
and determining the current real-time network bandwidth based on the received information of the historical video fed back by the video server.
The receiving information comprises at least one of the following: delay information, packet loss information, and retransmission request information. And the video sending end calculates the current real-time network bandwidth through a set algorithm based on the receiving information fed back by the video server.
Optionally, the current real-time network bandwidth may also be determined by existing network bandwidth evaluation software.
Specifically, the bandwidth refers to the amount of data that can be transmitted in a unit time, and if the current real-time network bandwidth is low, the smoothness of the video cannot be guaranteed, which means that the video is jammed and a smooth video picture cannot be displayed.
And step 120, adjusting the code rate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth.
Specifically, the adjusting the code rate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth includes:
and if the real-time network bandwidth is lower than the preset expected network bandwidth, reducing the code rate of the video encoder.
When the preset expected network bandwidth is initialized, the network bandwidth is determined according to the acquisition capability of a camera at a video transmitting end (specifically, the resolution of an acquired video image) and parameters such as the resolution, the frame rate and the like of the video image required by a video receiving end, and the network bandwidth is usually an ideal bandwidth capable of meeting the requirements of the video receiving end. If the current real-time network bandwidth is lower than the preset expected network bandwidth, it indicates that the video cannot be smoothly transmitted through the current real-time network bandwidth, and if no measure is taken, the video at the video receiving end is blocked, in order to ensure the flow and the real-time performance of the video picture, in the technical scheme of this embodiment, if the real-time network bandwidth is lower than the preset expected network bandwidth, the code rate of the video encoder is preferentially reduced, and the real-time performance of the video transmission and the smoothness of the video picture are ensured by sacrificing some picture quality (specifically, picture definition). It can be understood that the code rate of the video encoder is not reduced too much, so that the video is processed based on the reduced code rate and is not perceived by naked eyes when the video is played at the video receiving end.
And step 130, compressing the target video by the video encoder based on the adjusted code rate to obtain the compressed target video.
The code rate refers to how many bits are needed to represent video data after compression coding per second, that is, the data amount of an image displayed per second after compression, and under the condition that a video playing screen is determined (that is, the resolution of a video is determined), the higher the code rate is, the clearer the video picture is, the smaller the code rate is, and the more fuzzy the video picture is. If the real-time network bandwidth is lower than the preset expected network bandwidth, the code rate of the video encoder is preferentially reduced to reduce the data volume of the compressed image displayed per second, and the real-time transmission and the smoothness of the image are ensured by reducing the data volume transmitted per second.
And step 140, sending the compressed target video to a video server through a network, so that the video server sends the compressed target video to the video receiving end.
According to the video transmission method provided by the embodiment, when it is determined that the current real-time network bandwidth cannot be matched with the target video to be transmitted, the code rate of a video encoder is adjusted according to the real-time network bandwidth and the preset expected network bandwidth; compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video; and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end, thereby preferentially ensuring the real-time transmission of the video and simultaneously ensuring the picture quality of the video to a greater extent.
Example two
Fig. 3 is a schematic flow chart of a video transmission method according to a second embodiment of the present invention, where on the basis of the above-described embodiment, the present embodiment further optimizes the scheme, specifically, if the real-time transmission of the video cannot be guaranteed after the code rate is reduced, a frame dropping operation is further performed on the target video, and the frame rate of the target video is reduced by the frame dropping operation, so that the data amount transmitted per second is reduced, the purpose of transmitting the video in real time is achieved, and at the same time, the picture quality is not greatly lost.
As shown in fig. 3, the video transmission method includes the following steps:
step 310, determining the current real-time network bandwidth.
And step 320, adjusting the code rate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth.
And 330, if the adjusted code rate reaches a lower limit threshold value and the data volume of the compressed target video obtained by compressing the target video based on the adjusted code rate by the video encoder cannot be adapted to the current real-time network bandwidth, performing frame dropping operation on the target video to reduce the video transmission frame rate.
The lower limit threshold is preset according to business experience, and is usually the lowest bit rate for ensuring the video picture quality, and the ensuring of the video picture quality means that the change of the picture quality caused by the adjustment of the bit rate cannot be perceived by naked eyes.
Further, the performing a frame loss operation on the target video includes:
determining a first video frame rate according to the real-time network bandwidth and the video resolution subscribed by the video receiving end;
determining a target frame rate according to the first video frame rate and the original frame rate;
determining a frame loss ratio based on the target frame rate and the original frame rate;
and executing frame loss operation on the target video according to the frame loss ratio.
The first video frame rate may be determined by looking up a table according to the real-time network bandwidth and the video resolution subscribed by the video receiving end, for example, a corresponding relationship between the real-time network bandwidth, the video resolution, and the video frame rate shown in table 1 is preset according to a service experience, and the corresponding relationship indicates a video frame rate required for ensuring the resolution when the network bandwidth is limited.
Table 1: relation table between video resolution, real-time network bandwidth and video frame rate
Figure BDA0002744764330000071
Figure BDA0002744764330000081
Wherein [1500kpbs, - ] indicates that the network bandwidth is at least 1500 kpbs.
And determining a target frame rate according to the first video frame rate and the original frame rate, specifically, determining the lower one of the first video frame rate and the original frame rate as the target frame rate.
And determining a frame loss ratio based on the target frame rate and the original frame rate, specifically, drop _ ratio is 1- (fps _ out/fps _ in), wherein drop _ ratio represents the frame loss ratio, fps _ out represents the target frame rate, and fps _ in represents the original frame rate.
Further, the performing a frame loss operation on the target video according to the frame loss ratio includes:
determining the number of frame loss intervals according to the frame loss ratio;
and performing frame loss operation on the target video according to the frame loss interval number.
For example, the frame loss ratio is 10%, then every 10 frames are lost.
The specific implementation mode can be as follows:
1) the initialization variable initial value frame _ index ═ 0, and drop _ array [ ] ═ 0}, where frame _ index denotes the number of video frames and drop _ array [ ] denotes the array storing video frame numbers. Every time the frame loss ratio drop _ ratio changes, the value of the array drop _ array [100] is updated, 0 indicating no drop and 1 indicating a drop. Step ═ routup (1/drop _ ratio); where routup () is a rounding-up function, e.g., routup (2.8) ═ 3.
2) Traversing drop _ array [ ], if frame _ index% step is 0, then drop _ array [ frame _ index ] is 1; if drop _ array [ frame _ index ] ═ 1, it means that the frame (video frame numbered frame _ index) is dropped, otherwise it means that no frame is dropped.
3) The number frame _ index of the update frame is (frame _ index + 1)% 100;
4) returning frame loss results
For example, dropping one every 4 frames, the value of drop _ array [ frame _ index ] is:
0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
the smooth frame loss algorithm can ensure the continuity of the video picture to the maximum extent and ensure better picture effect in a weak network environment.
It can be understood that adjusting the bit rate of the video encoder is an operation that is easy to implement, and does not consume too many system resources, the calculation cost of the frame dropping operation is high, and more system resources are consumed, but the bit rate reduction will lose a certain picture quality, so that the comprehensive consideration is that when the real-time network bandwidth is not very bad, the strategy of reducing the bit rate is preferentially adopted, and when the real-time network bandwidth continues to become worse and the bit rate cannot continue to be reduced (namely the bit rate is reduced to the preset lower limit threshold), the video is processed by overlapping the operation of smoothly dropping frames, thereby ensuring the video picture quality while ensuring the real-time performance of video transmission, simultaneously ensuring the operation performance of the system, reducing the consumption of the system resources as much as possible, and improving the stability of the system operation.
Step 340, compressing the target video obtained after the frame dropping operation is executed by the video encoder based on the adjusted code rate to obtain a compressed target video;
and 350, sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
The technical solution of this embodiment is further optimized on the basis of the above embodiment, and specifically, if the real-time transmission of the video cannot be guaranteed after the code rate is reduced, the smooth frame dropping operation is further performed on the target video, and the frame rate of the target video is reduced by the frame dropping operation, so that the data amount transmitted per second is reduced, the purpose of real-time video transmission is achieved, and meanwhile, the picture quality is not greatly lost, and the continuity of the video picture can be guaranteed to the maximum extent by performing the frame dropping operation on the target video through the smooth frame dropping algorithm, so as to achieve the purpose of guaranteeing a better picture effect in the weak network environment.
On the basis of the technical solution of the foregoing embodiment, referring to a flow diagram of another video transmission method shown in fig. 4, specifically, a video camera (which may be understood as a video sending end) collects a video frame, the collected video frame reaches a video server through video adaptation-video coding-video transmission, the video server feeds back receiving information according to a receiving condition of a video, a network bandwidth evaluation module evaluates a current real-time network bandwidth based on the receiving information fed back by the video server, and then determines whether to adjust a code rate of an encoder and perform a smooth frame dropping operation on a target video through the video adaptation module according to an evaluation result. Specifically, if the real-time network bandwidth is lower than the preset expected network bandwidth, the code rate of a video encoder is reduced, if the reduced code rate reaches a lower threshold, and the data volume of a compressed target video obtained by compressing a video to be transmitted through the video encoder based on the adjusted code rate cannot be adapted to the current real-time network bandwidth, a smooth frame dropping operation is performed on the video to be transmitted through a video adaptation module to reduce the video transmission frame rate, and the video obtained after performing the frame dropping operation is compressed through the video encoder based on the adjusted code rate to obtain the compressed target video; and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
EXAMPLE III
Fig. 5 is a video transmission apparatus according to a third embodiment of the present invention, including: a determination module 510, an adjustment module 520, a compression module 530, and a transmission module 540;
the determining module 510 is configured to determine a current real-time network bandwidth; an adjusting module 520, configured to adjust a code rate of a video encoder according to the real-time network bandwidth and a preset expected network bandwidth; a compressing module 530, configured to perform compression processing on the target video based on the adjusted code rate through the video encoder, so as to obtain a compressed target video; a sending module 540, configured to send the compressed target video to a video server through a network, so that the video server sends the compressed target video to the video receiving end.
On the basis of the above technical solution, the adjusting module 520 is specifically configured to: and if the real-time network bandwidth is lower than the preset expected network bandwidth, reducing the code rate of the video encoder.
On the basis of the above technical solution, the apparatus further includes: and the frame dropping module is used for executing frame dropping operation on the target video to reduce the video transmission frame rate if the adjusted code rate reaches a lower limit threshold value and the data volume of the compressed target video cannot be adapted to the current real-time network bandwidth before the target video is compressed by the video encoder based on the adjusted code rate.
On the basis of the above technical solution, the frame loss module includes:
the first determining unit is used for determining a first video frame rate according to the real-time network bandwidth and the video resolution subscribed by the video receiving end;
the second determining unit is used for determining a target frame rate according to the first video frame rate and the original frame rate;
a third determining unit, configured to determine a frame loss ratio based on the target frame rate and the original frame rate;
and the execution unit is used for executing frame loss operation on the target video according to the frame loss ratio.
On the basis of the above technical solutions, the execution unit includes:
a determining subunit, configured to determine the number of frame loss intervals according to the frame loss ratio;
and the execution subunit is used for executing frame loss operation on the target video according to the frame loss interval number.
On the basis of the above technical solutions, the determining module 510 is specifically configured to: and determining the current real-time network bandwidth based on the received information of the historical video fed back by the video server.
On the basis of the above technical solutions, the received information includes at least one of the following: delay information and packet loss information.
According to the technical scheme of the embodiment of the invention, when the current real-time network bandwidth is determined to be incapable of matching the target video to be transmitted, the code rate of a video encoder is adjusted according to the real-time network bandwidth and the preset expected network bandwidth; compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video; and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end, thereby preferentially ensuring the real-time transmission of the video and simultaneously ensuring the picture quality of the video to a greater extent.
The video transmission device provided by the embodiment of the invention can execute the video transmission method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the terminal device or server of fig. 6) 400 suitable for implementing embodiments of the present invention is shown. The terminal device in the embodiments of the present invention may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 6 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, an embodiment of the invention includes a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of embodiments of the invention when executed by the processing apparatus 401.
The terminal provided by the embodiment of the present invention and the video transmission method provided by the above embodiment belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present invention can be referred to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment.
EXAMPLE five
An embodiment of the present invention provides a computer storage medium, on which a computer program is stored, which, when executed by a processor, implements the video transmission method provided by the above-described embodiment.
It should be noted that the computer readable medium of the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining the current real-time network bandwidth;
adjusting the code rate of a video encoder according to the real-time network bandwidth and a preset expected network bandwidth;
compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video;
and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, 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 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.
The units described in the embodiments of the present invention may be implemented by software or hardware. Where the name of a cell does not in some cases constitute a limitation on the cell itself, for example, an editable content display cell may also be described as an "editing cell".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), application specific desired products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents is encompassed without departing from the spirit of the disclosure. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A video transmission method is applied to a video sending end and is characterized by comprising the following steps:
determining the current real-time network bandwidth;
adjusting the code rate of a video encoder according to the real-time network bandwidth and a preset expected network bandwidth;
compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video;
and sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
2. The method of claim 1, wherein the adjusting the bitrate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth comprises:
and if the real-time network bandwidth is lower than the preset expected network bandwidth, reducing the code rate of the video encoder.
3. The method of claim 1, wherein before the compressing, by the video encoder, the target video based on the adjusted bitrate, further comprising:
and if the adjusted code rate reaches a lower limit threshold value and the data volume of the compressed target video cannot be adapted to the current real-time network bandwidth, performing frame loss operation on the target video to reduce the video transmission frame rate.
4. The method of claim 3, wherein performing a frame loss operation on the target video comprises:
determining a first video frame rate according to the real-time network bandwidth and the video resolution subscribed by the video receiving end;
determining a target frame rate according to the first video frame rate and the original frame rate;
determining a frame loss ratio based on the target frame rate and the original frame rate;
and executing frame loss operation on the target video according to the frame loss ratio.
5. The method of claim 4, wherein said performing a frame loss operation on said target video according to said frame loss ratio comprises:
determining the number of frame loss intervals according to the frame loss ratio;
and performing frame loss operation on the target video according to the frame loss interval number.
6. The method of claim 1, wherein determining the current real-time network bandwidth comprises:
and determining the current real-time network bandwidth based on the received information of the historical video fed back by the video server.
7. The method of claim 6, wherein the receiving information comprises at least one of: delay information and packet loss information.
8. A video transmission apparatus, comprising:
the determining module is used for determining the current real-time network bandwidth;
the adjusting module is used for adjusting the code rate of the video encoder according to the real-time network bandwidth and the preset expected network bandwidth;
the compression module is used for compressing the target video based on the adjusted code rate through the video encoder to obtain the compressed target video;
and the sending module is used for sending the compressed target video to a video server through a network so that the video server sends the compressed target video to the video receiving end.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the video transmission method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the video transmission method of any one of claims 1-7 when executed by a computer processor.
CN202011162751.5A 2020-10-27 2020-10-27 Video transmission method and device, electronic equipment and storage medium Pending CN112312137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011162751.5A CN112312137A (en) 2020-10-27 2020-10-27 Video transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011162751.5A CN112312137A (en) 2020-10-27 2020-10-27 Video transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112312137A true CN112312137A (en) 2021-02-02

Family

ID=74330887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011162751.5A Pending CN112312137A (en) 2020-10-27 2020-10-27 Video transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112312137A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468764A (en) * 2021-01-28 2021-03-09 浙江华创视讯科技有限公司 Method, system, server and storage medium for streaming media adaptive transmission
CN113489745A (en) * 2021-07-29 2021-10-08 百果园技术(新加坡)有限公司 Video data transmitting method, device, equipment and storage medium
CN113992967A (en) * 2021-10-25 2022-01-28 北京字节跳动网络技术有限公司 Screen projection data transmission method and device, electronic equipment and storage medium
CN115037727A (en) * 2022-08-10 2022-09-09 深圳海卫通网络科技有限公司 Broadband blocking processing method and device for shipborne satellite communication video transmission
CN115103235A (en) * 2022-06-21 2022-09-23 咪咕互动娱乐有限公司 Data transmission method, device, equipment and medium
CN115130852A (en) * 2022-06-24 2022-09-30 重庆长安新能源汽车科技有限公司 Data transmission quality evaluation method, device, equipment and medium for Internet of vehicles equipment
CN115209189A (en) * 2022-09-15 2022-10-18 广州迈聆信息科技有限公司 Video stream transmission method, system, server and storage medium
CN117528084A (en) * 2024-01-04 2024-02-06 书行科技(北京)有限公司 Video coding method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130094592A1 (en) * 2011-10-04 2013-04-18 Texas Instruments Incorporated Virtual Memory Access Bandwidth Verification (VMBV) in Video Coding
CN103686221A (en) * 2013-12-31 2014-03-26 北京大洋润博科技有限公司 Audio/video smooth broadcasting method adaptive to public wireless network
CN106231353A (en) * 2016-07-22 2016-12-14 北京小米移动软件有限公司 VoIP communication means and device
CN107623851A (en) * 2017-09-01 2018-01-23 苏州科达科技股份有限公司 Video code flow transmission control unit and control method
CN109688425A (en) * 2019-01-11 2019-04-26 北京三体云联科技有限公司 Live data plug-flow method
CN111405362A (en) * 2020-04-23 2020-07-10 成都极米科技股份有限公司 Video output method, video output device, video equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130094592A1 (en) * 2011-10-04 2013-04-18 Texas Instruments Incorporated Virtual Memory Access Bandwidth Verification (VMBV) in Video Coding
CN103686221A (en) * 2013-12-31 2014-03-26 北京大洋润博科技有限公司 Audio/video smooth broadcasting method adaptive to public wireless network
CN106231353A (en) * 2016-07-22 2016-12-14 北京小米移动软件有限公司 VoIP communication means and device
CN107623851A (en) * 2017-09-01 2018-01-23 苏州科达科技股份有限公司 Video code flow transmission control unit and control method
CN109688425A (en) * 2019-01-11 2019-04-26 北京三体云联科技有限公司 Live data plug-flow method
CN111405362A (en) * 2020-04-23 2020-07-10 成都极米科技股份有限公司 Video output method, video output device, video equipment and computer readable storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468764B (en) * 2021-01-28 2021-05-04 浙江华创视讯科技有限公司 Method, system, server and storage medium for streaming media adaptive transmission
CN112468764A (en) * 2021-01-28 2021-03-09 浙江华创视讯科技有限公司 Method, system, server and storage medium for streaming media adaptive transmission
CN113489745A (en) * 2021-07-29 2021-10-08 百果园技术(新加坡)有限公司 Video data transmitting method, device, equipment and storage medium
CN113489745B (en) * 2021-07-29 2024-04-05 百果园技术(新加坡)有限公司 Video data transmission method, device, equipment and storage medium
CN113992967B (en) * 2021-10-25 2022-11-01 北京字节跳动网络技术有限公司 Screen projection data transmission method and device, electronic equipment and storage medium
CN113992967A (en) * 2021-10-25 2022-01-28 北京字节跳动网络技术有限公司 Screen projection data transmission method and device, electronic equipment and storage medium
CN115103235A (en) * 2022-06-21 2022-09-23 咪咕互动娱乐有限公司 Data transmission method, device, equipment and medium
CN115103235B (en) * 2022-06-21 2023-10-20 咪咕互动娱乐有限公司 Data transmission method, device, equipment and medium
CN115130852A (en) * 2022-06-24 2022-09-30 重庆长安新能源汽车科技有限公司 Data transmission quality evaluation method, device, equipment and medium for Internet of vehicles equipment
CN115037727B (en) * 2022-08-10 2022-11-11 深圳海卫通网络科技有限公司 Broadband blocking processing method and device for shipborne satellite communication video transmission
CN115037727A (en) * 2022-08-10 2022-09-09 深圳海卫通网络科技有限公司 Broadband blocking processing method and device for shipborne satellite communication video transmission
CN115209189B (en) * 2022-09-15 2023-03-10 广州迈聆信息科技有限公司 Video stream transmission method, system, server and storage medium
CN115209189A (en) * 2022-09-15 2022-10-18 广州迈聆信息科技有限公司 Video stream transmission method, system, server and storage medium
CN117528084A (en) * 2024-01-04 2024-02-06 书行科技(北京)有限公司 Video coding method, device, equipment and storage medium
CN117528084B (en) * 2024-01-04 2024-03-26 书行科技(北京)有限公司 Video coding method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112312137A (en) Video transmission method and device, electronic equipment and storage medium
CN112312229A (en) Video transmission method and device, electronic equipment and storage medium
US10419787B2 (en) Dynamic programming across multiple streams
US7783773B2 (en) Glitch-free media streaming
CN113992967B (en) Screen projection data transmission method and device, electronic equipment and storage medium
CN111147606B (en) Data transmission method, device, terminal and storage medium
CN112954354B (en) Video transcoding method, device, equipment and medium
CN113115067A (en) Live broadcast system, video processing method and related device
CN111225209B (en) Video data plug flow method, device, terminal and storage medium
CN112954402B (en) Video display method, apparatus and storage medium
CN110781150A (en) Data transmission method and device and electronic equipment
CN113905257A (en) Video code rate switching method and device, electronic equipment and storage medium
CN113891132A (en) Audio and video synchronization monitoring method and device, electronic equipment and storage medium
CN113794942A (en) Method, apparatus, system, device and medium for switching view angle of free view angle video
CN113542856A (en) Reverse playing method, device, equipment and computer readable medium for online video
CN115767149A (en) Video data transmission method and device
CN113242446B (en) Video frame caching method, video frame forwarding method, communication server and program product
CN112153322B (en) Data distribution method, device, equipment and storage medium
CN114979762A (en) Video downloading and transmission method, device, terminal equipment, server and medium
CN108377400A (en) A kind of image transmitting optimization method, system and its apparatus
CN112887742B (en) Live stream processing method, device, equipment and storage medium
CN115134641B (en) Screen projection method and device and electronic equipment
CN114173134B (en) Video encoding method, apparatus, electronic device, and computer-readable medium
CN117857849A (en) Bandwidth allocation method, device, equipment and storage medium
Kim et al. Context-aware multimedia quality adaptation for smart streaming

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: 20210202

RJ01 Rejection of invention patent application after publication