CN112312229A - Video transmission method and device, electronic equipment and storage medium - Google Patents
Video transmission method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112312229A CN112312229A CN202011165221.6A CN202011165221A CN112312229A CN 112312229 A CN112312229 A CN 112312229A CN 202011165221 A CN202011165221 A CN 202011165221A CN 112312229 A CN112312229 A CN 112312229A
- Authority
- CN
- China
- Prior art keywords
- video
- network bandwidth
- transmitted
- determining
- strategy
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 52
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 84
- 230000009467 reduction Effects 0.000 claims abstract description 11
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000003247 decreasing effect Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/647—Control 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/64784—Data processing by the network
- H04N21/64792—Controlling the complexity of the content stream, e.g. by dropping packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/63—Control 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/647—Control 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/64723—Monitoring of network processes or resources, e.g. monitoring of network load
- H04N21/64738—Monitoring network characteristics, e.g. bandwidth, congestion level
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (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; determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted; processing the video to be transmitted based on the video processing strategy; transmitting the processed video to be transmitted to a video receiving end; the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notice to a video sending end, so that the video sending end reduces the code rate of a video encoder. The technical scheme of the embodiment of the invention realizes the real-time transmission of the video between the video server and the video receiving end and can ensure the video picture quality.
Description
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
The embodiment of the invention provides a video transmission method, a video transmission device, electronic equipment and a storage medium, which realize real-time transmission of videos between a video server and a video receiving end and can ensure the quality of video pictures.
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;
determining whether the decoding frame loss operation needs to be executed on the video to be transmitted according to the real-time network bandwidth and the resolution of the video to be transmitted;
if the video to be transmitted needs to be decoded and frame-lost, then the video to be transmitted is decoded and frame-lost, otherwise, a notification for reducing the code rate is sent to a video sending end so as to reduce the code rate of the video to be transmitted;
and coding the decoded frame-lost video to be transmitted and then sending the video to the video receiving end, or sending the video to be transmitted after the code rate is reduced to the video receiving end, so that the video sending end reduces the code rate of the video encoder.
In a second aspect, an embodiment of the present invention further provides a video transmission apparatus, where the apparatus includes:
the first determining module is used for determining the current real-time network bandwidth;
the second determining module is used for determining whether the decoding frame loss operation needs to be executed on the video to be transmitted according to the real-time network bandwidth and the resolution of the video to be transmitted;
the processing module is used for executing the decoding frame loss operation on the video to be transmitted if the decoding frame loss operation needs to be executed on the video to be transmitted, and otherwise, sending a notification of reducing the code rate to a video sending end so as to reduce the code rate of the video to be transmitted;
and the transmission module is used for coding the decoded frame-missing video to be transmitted and then transmitting the coded video to the video receiving end, or transmitting the code rate-reduced video to be transmitted 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 embodiment of the invention.
In a fourth aspect, embodiments of the present invention further provide 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.
The video transmission method provided by the embodiment of the invention determines a video processing strategy according to the current real-time network bandwidth and the resolution of a video to be transmitted; processing the video to be transmitted based on the video processing strategy; transmitting the processed video to be transmitted to a video receiving end; the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a notification of reducing the code rate to a video sending end, and the purposes of ensuring the resolution of the video and ensuring the video picture quality are achieved on the premise of ensuring the timeliness.
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 server, and particularly applied to an application scene that the video server sends videos to a video receiving end. 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 Path2 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:
Wherein, determining the current real-time network bandwidth comprises:
and determining the current real-time network bandwidth based on the historical video receiving information fed back by the video receiving end.
The receiving information comprises at least one of the following: delay information, packet loss information, and retransmission request information. And the video server calculates the current real-time network bandwidth through a set algorithm based on the receiving information fed back by the video receiving end.
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, determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted.
Specifically, the determining a video processing policy according to the real-time network bandwidth and the resolution of the video to be transmitted includes:
determining a network bandwidth range corresponding to the resolution of the video to be transmitted based on the corresponding relation between the preset network bandwidth and the video resolution;
if the real-time network bandwidth is lower than the lower threshold of the network bandwidth range, determining the video processing strategy as a decoding frame loss strategy;
and if the real-time network bandwidth is higher than the lower limit threshold of the network bandwidth range and lower than the upper limit threshold of the network bandwidth range, determining the video processing strategy as a strategy for sending a code rate reduction notification to a video sending end.
The preset correspondence between the network bandwidth and the video resolution is a correspondence set according to business experience, and represents a requirement of transmitting a video with a specific resolution on the network bandwidth on the premise of ensuring the video picture quality and the real-time performance, for example, refer to a correspondence table between the network bandwidth and the video resolution shown in table 1.
Table 1: corresponding relation table between video resolution and network bandwidth
Resolution// resolution of frame | Estlandwidth// network bandwidth |
1280*720 | (800kbps,1000kbps) |
640*360 | (600kbps,800kbps) |
The corresponding relation table means that if the resolution of the video to be transmitted is 1280 × 720, if the minimum network bandwidth required for ensuring the transmission real-time performance and the video picture quality is 1000kbps, and if the real-time network bandwidth is lower than 800kbps, a video processing strategy of decoding lost frames can be adopted, and the frame rate of the video is reduced through frame loss operation, so that the data volume transmitted per second is reduced, the purpose of transmitting the video in real time in a weak network environment is achieved, and the picture quality cannot be lost. If the real-time network bandwidth is higher than 800kbps but lower than 1000kbps, a notification of reducing the code rate can be sent to the video sending end to reduce the code rate of the video to be transmitted. 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 higher than a lower threshold (for example, 800kbps) of the network bandwidth range and lower than an upper threshold (for example, 1000kbps) of the network bandwidth range, the video processing strategy is determined to be a strategy for sending a notification of reducing the bit rate to the video sending end, so that the data volume of the compressed image displayed per second is reduced by the video sending end, and the real-time performance of transmission and the smoothness of the picture are ensured by reducing the data volume transmitted per second.
It can be understood that adjusting the bitrate 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, however, decreasing the bitrate may lose a certain picture quality, so that the video processing policy is determined to be a policy for sending a notification of decreasing bitrate to the video sending end when the real-time network bandwidth is not very poor, for example, higher than the lower threshold of the network bandwidth range and lower than the upper threshold of the network bandwidth range, and the decreased bitrate may not be too much, so that the change of the video picture generated when the video receiving end plays the video after processing the video based on the decreased bitrate is not perceived by naked eyes as the standard. If the real-time network bandwidth is poor and the code rate cannot be reduced any more (namely, the code rate is reduced to the preset lower limit threshold), the video processing strategy is determined to be a decoding frame loss strategy, so that the video transmission real-time performance is guaranteed, the video picture quality is guaranteed, the operation performance of the system is guaranteed, the consumption of system resources is reduced as much as possible, and the operation stability of the system is improved.
And step 130, processing the video to be transmitted based on the video processing strategy.
The video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notice to a video sending end, so that the video sending end reduces the code rate of a video encoder.
If the video processing strategy is a decoding frame loss strategy, the processing the video to be transmitted based on the video processing strategy comprises the following steps: carrying out smooth frame loss processing on a video to be transmitted; and if the video processing strategy is a strategy of sending a code rate reduction notice to the video sending end, reducing the code rate of the encoder through the video sending end, and further reducing the code rate of the video to be transmitted.
And step 140, transmitting the processed video to be transmitted to a video receiving end.
In the video transmission method provided by this embodiment, a video processing policy is determined according to a current real-time network bandwidth and a resolution of a video to be transmitted; processing the video to be transmitted based on the video processing strategy; transmitting the processed video to be transmitted to a video receiving end; the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a notification of reducing the code rate to a video sending end, and the purposes of ensuring the resolution of the video and ensuring the video picture quality are achieved on the premise of ensuring the timeliness.
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, this embodiment further optimizes the scheme, specifically, if the video processing policy is a decoding frame loss policy, an implementation process of performing smooth frame loss processing on a video to be transmitted is provided, and a frame rate of the video is reduced through frame loss operation, so as to reduce data amount transmitted per second, achieve a purpose of transmitting the video in real time, and at the same time, not greatly lose picture quality.
As shown in fig. 3, the video transmission method includes the following steps:
And step 320, determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted.
The first video frame rate may be determined by looking up a table according to the real-time network bandwidth and the resolution of the video to be transmitted, for example, a corresponding relationship between the real-time network bandwidth, the video resolution, and the video frame rate shown in table 2 is preset according to a service experience, and the corresponding relationship indicates a video frame rate required by the resolution guaranteed under the condition that the network bandwidth is limited.
Table 1: relation table between video resolution, real-time network bandwidth and video frame rate
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, if the video processing policy is a decoding frame loss policy, the processing the video to be transmitted based on the video processing policy further includes:
and carrying out encoding operation on the video to be transmitted after the frame loss operation is carried out.
And step 340, transmitting the processed video to be transmitted to a video receiving end.
The technical solution of this embodiment is further optimized on the basis of the foregoing embodiment, and specifically, if the video processing policy is a decoding frame loss policy, an implementation process of performing smooth frame loss processing on a video to be transmitted is provided, and a frame rate of the video is reduced by a frame loss operation, so that a data amount transmitted per second is reduced, a purpose of transmitting the video in real time is achieved, and meanwhile, picture quality is not greatly lost, and a frame loss operation performed on the video to be transmitted by a smooth frame loss algorithm can maximally ensure continuity of a video picture, thereby achieving a purpose of ensuring a better picture effect in a 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, the video server determines the current real-time network bandwidth (obtains an estimated value of the network bandwidth) according to the receiving information fed back by the video receiving end, and then performs rate control based on the real-time network bandwidth. Specifically, a network bandwidth range corresponding to the resolution of the video to be transmitted is determined based on a preset corresponding relationship between the network bandwidth and the video resolution; if the real-time network bandwidth is lower than the lower threshold of the network bandwidth range, determining the video processing strategy as a decoding frame loss strategy; and if the real-time network bandwidth is higher than the lower limit threshold of the network bandwidth range and lower than the upper limit threshold of the network bandwidth range, determining the video processing strategy as a strategy for sending a code rate reduction notification to a video sending end. If the current video processing strategy is determined to be a decoding frame loss strategy, decoding operation is carried out on the video to be transmitted, then smooth frame loss operation is carried out on the decoded video through a video adaptation module, the residual video after frame loss is encoded through a video encoding module, and finally the encoded video is sent to a video receiving end. If the current video processing strategy is determined to be the strategy for informing the video sending end to reduce the code rate, the video sending end is informed to reduce the code rate, but the resolution ratio of the video is kept, and at the moment, the video server directly transmits the received video to the video receiving end. The purpose of guaranteeing the real-time performance and the picture effect of video transmission in the weak network environment is achieved.
EXAMPLE III
Fig. 5 is a video transmission apparatus according to a third embodiment of the present invention, including: a first determining module 510, a second determining module 520, a processing module 530, and a transmitting module 540;
the first determining module 510 is configured to determine a current real-time network bandwidth; a second determining module 520, configured to determine a video processing policy according to the real-time network bandwidth and the resolution of the video to be transmitted; a processing module 530, configured to process a video to be transmitted based on the video processing policy; a transmission module 530, configured to transmit the processed video to be transmitted to a video receiving end; the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notification to a video sending end.
On the basis of the foregoing technical solution, the second determining module 520 is specifically configured to:
determining a network bandwidth range corresponding to the resolution of the video to be transmitted based on the corresponding relation between the preset network bandwidth and the video resolution;
if the real-time network bandwidth is lower than the lower threshold of the network bandwidth range, determining the video processing strategy as a decoding frame loss strategy;
and if the real-time network bandwidth is higher than the lower limit threshold of the network bandwidth range and lower than the upper limit threshold of the network bandwidth range, determining the video processing strategy as a strategy for sending a code rate reduction notification to a video sending end.
On the basis of the above technical solution, if the video processing policy is a decoding frame loss policy, the processing module 530 includes:
the first determining unit is used for determining a first video frame rate according to the real-time network bandwidth and the resolution of the video to be transmitted;
a second determining unit, configured to determine a target frame rate according to the first video frame rate and a desired frame rate;
a third determining unit, configured to determine a frame loss ratio based on the target frame rate and the desired frame rate;
and the frame loss unit is used for executing frame loss operation on the video to be transmitted according to the frame loss ratio.
On the basis of the above technical solution, the frame loss 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 video to be transmitted according to the frame loss interval number.
On the basis of the above technical solutions, the processing module 530 further includes:
and the coding unit is used for coding the video to be transmitted after the frame loss operation is executed.
On the basis of the above technical solutions, the first determining module 510 is specifically configured to: and determining the current real-time network bandwidth based on the historical video receiving information fed back by the video receiving end.
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, a video processing strategy is determined according to the current real-time network bandwidth and the resolution of the video to be transmitted; processing the video to be transmitted based on the video processing strategy; transmitting the processed video to be transmitted to a video receiving end; the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a notification of reducing the code rate to a video sending end, and the purposes of ensuring the resolution of the video and ensuring the video picture quality are achieved on the premise of ensuring the timeliness.
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;
determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted;
processing the video to be transmitted based on the video processing strategy;
transmitting the processed video to be transmitted to a video receiving end;
the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notice to a video sending end, so that the video sending end reduces the code rate of a video encoder.
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 Standard 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 server and is characterized by comprising the following steps:
determining the current real-time network bandwidth;
determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted;
processing the video to be transmitted based on the video processing strategy;
transmitting the processed video to be transmitted to a video receiving end;
the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notice to a video sending end, so that the video sending end reduces the code rate of a video encoder.
2. The method of claim 1, wherein determining a video processing policy based on the real-time network bandwidth and the resolution of the video to be transmitted comprises:
determining a network bandwidth range corresponding to the resolution of the video to be transmitted based on the corresponding relation between the preset network bandwidth and the video resolution;
if the real-time network bandwidth is lower than the lower threshold of the network bandwidth range, determining the video processing strategy as a decoding frame loss strategy;
and if the real-time network bandwidth is higher than the lower limit threshold of the network bandwidth range and lower than the upper limit threshold of the network bandwidth range, determining the video processing strategy as a strategy for sending a code rate reduction notification to a video sending end.
3. The method of claim 1, wherein if the video processing policy is a decoding frame loss policy, the processing the video to be transmitted based on the video processing policy comprises:
determining a first video frame rate according to the real-time network bandwidth and the resolution of the video to be transmitted;
determining a target frame rate according to the first video frame rate and the expected frame rate;
determining a frame loss ratio based on the target frame rate and a desired frame rate;
and executing frame loss operation on the video to be transmitted according to the frame loss ratio.
4. The method of claim 3, wherein performing a frame loss operation on the video to be transmitted according to the frame loss ratio comprises:
determining the number of frame loss intervals according to the frame loss ratio;
and performing frame loss operation on the video to be transmitted according to the frame loss interval number.
5. The method of claim 3, wherein if the video processing policy is a decoding frame loss policy, the processing the video to be transmitted based on the video processing policy further comprises:
and carrying out encoding operation on the video to be transmitted after the frame loss operation is carried out.
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 historical video receiving information fed back by the video receiving end.
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 first determining module is used for determining the current real-time network bandwidth;
the second determining module is used for determining a video processing strategy according to the real-time network bandwidth and the resolution of the video to be transmitted;
the processing module is used for processing the video to be transmitted based on the video processing strategy;
the transmission module is used for transmitting the processed video to be transmitted to a video receiving end;
the video processing strategy comprises a decoding frame loss strategy or a strategy of sending a code rate reduction notification to a video sending 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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011165221.6A CN112312229A (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 |
---|---|---|---|
CN202011165221.6A CN112312229A (en) | 2020-10-27 | 2020-10-27 | Video transmission method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112312229A true CN112312229A (en) | 2021-02-02 |
Family
ID=74331091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011165221.6A Pending CN112312229A (en) | 2020-10-27 | 2020-10-27 | Video transmission method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112312229A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473229A (en) * | 2021-06-25 | 2021-10-01 | 荣耀终端有限公司 | Method for dynamically adjusting frame loss threshold and related equipment |
CN113489745A (en) * | 2021-07-29 | 2021-10-08 | 百果园技术(新加坡)有限公司 | Video data transmitting method, device, equipment and storage medium |
CN114245198A (en) * | 2021-12-17 | 2022-03-25 | 北京达佳互联信息技术有限公司 | Media content processing method and device, electronic equipment and storage medium |
CN114286194A (en) * | 2021-12-08 | 2022-04-05 | 北京金山云网络技术有限公司 | Instant messaging video processing method and device, electronic equipment and storage medium |
CN115396696A (en) * | 2022-08-22 | 2022-11-25 | 网易(杭州)网络有限公司 | Video data transmission method, system, processing device and storage medium |
CN115442408A (en) * | 2022-09-13 | 2022-12-06 | 脉冲视觉(北京)科技有限公司 | Image data transmission processing method, device, medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686221A (en) * | 2013-12-31 | 2014-03-26 | 北京大洋润博科技有限公司 | Audio/video smooth broadcasting method adaptive to public wireless network |
US20170094295A1 (en) * | 2015-09-28 | 2017-03-30 | Cybrook Inc. | Banwidth Adjustment For Real-time Video Transmission |
CN109729439A (en) * | 2019-01-11 | 2019-05-07 | 北京三体云联科技有限公司 | Method for real-time video transmission |
CN111107297A (en) * | 2019-12-30 | 2020-05-05 | 广州市百果园网络科技有限公司 | Video transmission method, device, resource server and storage medium |
-
2020
- 2020-10-27 CN CN202011165221.6A patent/CN112312229A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686221A (en) * | 2013-12-31 | 2014-03-26 | 北京大洋润博科技有限公司 | Audio/video smooth broadcasting method adaptive to public wireless network |
US20170094295A1 (en) * | 2015-09-28 | 2017-03-30 | Cybrook Inc. | Banwidth Adjustment For Real-time Video Transmission |
CN109729439A (en) * | 2019-01-11 | 2019-05-07 | 北京三体云联科技有限公司 | Method for real-time video transmission |
CN111107297A (en) * | 2019-12-30 | 2020-05-05 | 广州市百果园网络科技有限公司 | Video transmission method, device, resource server and storage medium |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113473229A (en) * | 2021-06-25 | 2021-10-01 | 荣耀终端有限公司 | Method for dynamically adjusting frame loss threshold and related equipment |
CN113473229B (en) * | 2021-06-25 | 2022-04-12 | 荣耀终端有限公司 | Method for dynamically adjusting frame loss threshold and related equipment |
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 |
CN114286194A (en) * | 2021-12-08 | 2022-04-05 | 北京金山云网络技术有限公司 | Instant messaging video processing method and device, electronic equipment and storage medium |
CN114286194B (en) * | 2021-12-08 | 2024-05-03 | 北京金山云网络技术有限公司 | Instant messaging video processing method and device, electronic equipment and storage medium |
CN114245198A (en) * | 2021-12-17 | 2022-03-25 | 北京达佳互联信息技术有限公司 | Media content processing method and device, electronic equipment and storage medium |
CN114245198B (en) * | 2021-12-17 | 2024-02-06 | 北京达佳互联信息技术有限公司 | Method and device for processing media content, electronic equipment and storage medium |
CN115396696A (en) * | 2022-08-22 | 2022-11-25 | 网易(杭州)网络有限公司 | Video data transmission method, system, processing device and storage medium |
CN115396696B (en) * | 2022-08-22 | 2024-04-12 | 网易(杭州)网络有限公司 | Video data transmission method, system, processing device and storage medium |
CN115442408A (en) * | 2022-09-13 | 2022-12-06 | 脉冲视觉(北京)科技有限公司 | Image data transmission processing method, device, medium and electronic equipment |
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 | |
CN113992967B (en) | Screen projection data transmission method and device, electronic equipment and storage medium | |
CN111147606B (en) | Data transmission method, device, terminal and storage medium | |
CN113115067A (en) | Live broadcast system, video processing method and related device | |
CN111225209B (en) | Video data plug flow method, device, terminal and storage medium | |
CN112954354B (en) | Video transcoding method, device, equipment and medium | |
CN111629210A (en) | Data processing method and device and electronic equipment | |
CN113542856B (en) | Method, device, equipment and computer readable medium for reverse playing of online video | |
CN113259729B (en) | Data switching method, server, system and storage medium | |
CN115767149A (en) | Video data transmission method and device | |
CN116346743A (en) | Bandwidth control method, device, equipment and storage medium | |
CN114979762B (en) | Video downloading and transmitting method and device, terminal equipment, server and medium | |
CN112887742B (en) | Live stream processing method, device, equipment and storage medium | |
CN113242446B (en) | Video frame caching method, video frame forwarding method, communication server and program product | |
CN108377400A (en) | A kind of image transmitting optimization method, system and its apparatus | |
CN115134641B (en) | Screen projection method and device and electronic equipment | |
WO2024055829A1 (en) | Audio encoding method and apparatus, and device and storage medium | |
CN118138776A (en) | Video coding method, device, equipment and storage medium | |
CN112995780B (en) | Network state evaluation method, device, equipment and storage medium | |
CN114173134B (en) | Video encoding method, apparatus, electronic device, and computer-readable medium | |
CN117412140A (en) | Method and apparatus for video transmission | |
CN118233400A (en) | Self-adaptive adjustment method, device, equipment and medium for congestion window | |
WO2024217205A1 (en) | Video transmission method and apparatus, and device and storage medium | |
CN117857849A (en) | Bandwidth allocation method, device, equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210202 |