WO2022088200A1 - 视频传输方法、装置、可移动平台及计算机可读存储介质 - Google Patents
视频传输方法、装置、可移动平台及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2022088200A1 WO2022088200A1 PCT/CN2020/125999 CN2020125999W WO2022088200A1 WO 2022088200 A1 WO2022088200 A1 WO 2022088200A1 CN 2020125999 W CN2020125999 W CN 2020125999W WO 2022088200 A1 WO2022088200 A1 WO 2022088200A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video frame
- compression ratio
- encoding
- channel bandwidth
- video
- Prior art date
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 143
- 238000000034 method Methods 0.000 title claims abstract description 66
- 230000006835 compression Effects 0.000 claims abstract description 244
- 238000007906 compression Methods 0.000 claims abstract description 244
- 238000013507 mapping Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 230000003247 decreasing effect Effects 0.000 claims description 12
- 238000004891 communication Methods 0.000 claims description 10
- 230000015556 catabolic process Effects 0.000 description 6
- 238000006731 degradation reaction Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 230000001133 acceleration Effects 0.000 description 3
- 230000033001 locomotion Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000013519 translation Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000035772 mutation Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction 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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
Definitions
- the present application relates to the technical field of wireless image transmission, and in particular, to a video transmission method, device, movable platform, and computer-readable storage medium.
- the movable platform can transmit the captured video to the terminal device through wireless communication, and the terminal device displays the received video.
- the channel quality of the wireless channel between the mobile platform and the terminal device will change with the distance between the mobile platform and the terminal device, especially between the mobile platform and the terminal device.
- the channel quality of the wireless channel is poor, which will lead to the degradation of the transmitted video quality or the transmission freeze.
- the reliability and video quality of the wireless image transmission cannot be guaranteed, and the user experience is not good.
- the embodiments of the present application provide a video transmission method, device, movable platform, and computer-readable storage medium, which aim to solve the problem of degradation of transmitted video quality or transmission freeze, and ensure the reliability of wireless image transmission. and video quality.
- an embodiment of the present application provides a video transmission method, which is applied to a movable platform, where the movable platform includes a photographing device, and the initial video frame captured by the photographing device can pass through the movable platform after being encoded.
- the wireless channel between the terminal device and the terminal device is transmitted to the terminal device, and the method includes:
- the second video frame is transmitted to the terminal device, so that the terminal device uses the first video frame as a reference video frame to decode the second video frame.
- an embodiment of the present application further provides a video transmission device, which is applied to a movable platform, where the movable platform includes a shooting device, and an initial video frame captured by the shooting device can pass through the movable platform after being encoded.
- the wireless channel between the platform and the terminal device is transmitted to the terminal device;
- the video transmission device includes a memory and a processor
- the memory is used to store computer programs
- the processor is configured to execute the computer program and implement the following steps when executing the computer program:
- the second video frame is transmitted to the terminal device, so that the terminal device uses the first video frame as a reference video frame to decode the second video frame.
- the embodiments of the present application also provide a movable platform, including:
- a power system arranged on the platform body, for providing moving power for the movable platform
- a photographing device arranged on the platform body, for photographing an initial video frame
- the above video transmission device is provided in the platform body, and is used for encoding the initial video frame captured by the photographing device and for transmitting the encoded initial video frame to the terminal device.
- an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the above-mentioned The steps of the video transmission method.
- Embodiments of the present application provide a video transmission method, device, movable platform, and computer-readable storage medium, which adjust the first encoding of the first type of video frame through the channel bandwidth of the wireless channel between the movable platform and the terminal device.
- compression ratio and then encode the first video frame to be encoded in the initial video frame captured by the photographing device according to the adjusted first encoding compression ratio to obtain the first video frame, and transmit the first video frame to the terminal device, and take the first video frame as a reference video frame, encode the second to-be-encoded video frame in the initial video frame to obtain a second video frame, and finally transmit the second video frame to the terminal device for the terminal device
- the second video frame is decoded, so that the mobile platform can adaptively adjust the coding and compression ratio based on the channel bandwidth, so as to reduce or increase the data amount of the transmitted video frame to solve the problem of transmission problems. If the video quality is degraded or the transmission is stuck, the reliability and video quality of wireless
- FIG. 1 is a schematic diagram of a scene for implementing the video transmission method provided by the embodiment of the present application
- FIG. 2 is a schematic flowchart of steps of a video transmission method provided by an embodiment of the present application.
- Fig. 3 is the sub-step schematic flow chart of the video transmission method in Fig. 2;
- FIG. 4 is a schematic flowchart of steps of another video transmission method provided by an embodiment of the present application.
- Fig. 5 is the sub-step schematic flow chart of the video transmission method in Fig. 4;
- FIG. 6 is a schematic block diagram of the structure of a video transmission apparatus provided by an embodiment of the present application.
- FIG. 7 is a schematic structural block diagram of a movable platform provided by an embodiment of the present application.
- the movable platform can transmit the captured video to the terminal device through wireless communication, and the terminal device displays the received video.
- the channel quality of the wireless channel between the mobile platform and the terminal device will change with the distance between the mobile platform and the terminal device, especially between the mobile platform and the terminal device.
- the channel quality of the wireless channel is poor, which will lead to the degradation of the transmitted video quality or the transmission freeze.
- the reliability and video quality of the wireless image transmission cannot be guaranteed, and the user experience is not good.
- the embodiments of the present application provide a video transmission method, device, movable platform, and computer-readable storage medium, which adjust the first type of video through the channel bandwidth of the wireless channel between the movable platform and the terminal device.
- the first encoding and compression ratio of the frame and then encoding the first to-be-encoded video frame in the initial video frame captured by the photographing device according to the adjusted first encoding and compression ratio to obtain the first video frame, and the first video frame transmitting to the terminal device, and using the first video frame as a reference video frame, encoding the second to-be-encoded video frame in the initial video frame to obtain a second video frame, and finally transmitting the second video frame to the terminal device , for the terminal device to use the first video frame as a reference video frame to decode the second video frame, so that the mobile platform can adaptively adjust the encoding and compression ratio based on the channel bandwidth to reduce or increase the data volume of the transmitted video frame , in order to solve the problem that the transmitted video
- FIG. 1 is a schematic diagram of a scenario for implementing the video transmission method provided by the embodiment of the present application.
- the scenario includes a movable platform 100 and a terminal device 200.
- the movable platform 100 includes a platform body 110, The power system 120 provided on the platform body 110, the photographing device 130 provided on the platform body, and the first wireless communication device (not shown in FIG. 1 ) provided in the platform body, the terminal device 200 includes a display device 210 and a first wireless communication device.
- Two wireless communication devices (not shown in FIG.
- the wireless channel between the mobile platform 100 and the terminal device 200 can be transmitted to the terminal device 200 through the wireless channel between the mobile platform 100 and the terminal device 200 after the initial video frame captured by the photographing device 130 is encoded.
- the terminal device 200 displays the encoded video frame transmitted by the movable platform 100 through the display device 210 for the user to watch.
- the display device 210 includes a display screen disposed on the terminal device 200 or a display independent of the terminal device 200, and the display independent of the terminal device 200 may include a mobile phone, a tablet computer, a personal computer, etc. Other electronic equipment with a display screen.
- the display screen includes an LED display screen, an OLED display screen, an LCD display screen, and the like.
- the movable platform 100 may further include a pan-tilt 140 disposed on the platform body 110.
- the pan-tilt 140 is used for carrying the photographing device 130.
- the pan-tilt 140 includes three-axis motors, which are a pan-axis motor and a tilt-axis motor, respectively.
- the motor and the roll axis motor are used to adjust the balance posture of the photographing device 130 mounted on the pan/tilt 420, so as to photograph high-precision and stable images anytime and anywhere.
- the movable platform 100 may further include a sensing system, and the sensing system may include one or more sensors to sense the spatial orientation, velocity, and/or acceleration of the movable platform 100 (eg, relative to multiple sensors). up to three degrees of freedom of rotation and translation), angular acceleration, attitude, position (absolute position or relative position), etc.
- the one or more sensors include GPS sensors, motion sensors, inertial sensors, proximity sensors, or image sensors.
- the sensing system may also be used to collect data on the environment in which the movable platform 100 is located, such as climatic conditions, potential obstacles to be approached, locations of geographic features, locations of man-made structures, and the like.
- the power system 120 is used to provide moving power for the movable platform 100, one or more of the power systems 120 in the horizontal direction can be rotated clockwise, and one or more of the other power systems 120 in the horizontal direction can be reversed Clockwise rotation. For example, there are as many power systems 120 rotating clockwise as there are power systems 120 rotating counterclockwise.
- the rotational rate of the power systems 120 in each horizontal direction can be varied independently to achieve the lifting and/or pushing operations caused by each power system 120 to adjust the spatial orientation, velocity, and/or acceleration of the movable platform 100 (eg, relative to up to three degrees of freedom for rotation and translation).
- the terminal device 100 includes a remote control, a ground control platform, a mobile phone, a tablet computer, a notebook computer, a PC computer, and the like.
- the movable platform can be a handheld mobile device, or a device that has a power system and moves with the power provided by the power system. Examples of mobile platforms include drones, unmanned boats, and unmanned vehicles. Therefore, the power system 120 enables the drone to take off vertically from the ground, or to land vertically on the ground, without any horizontal movement of the drone (eg, without taxiing on a runway). Optionally, the power system 120 may allow the drone to preset positions and/or turn the steering wheel in the air. One or more of the powertrains 120 may be controlled independently of the other powertrains 120 .
- one or more power systems 120 may be controlled simultaneously.
- the drone may have multiple horizontally oriented power systems 120 to track the lift and/or push of the target.
- the horizontally oriented power system 120 may be actuated to provide the drone with the ability to take off vertically, land vertically, and hover.
- the movable platform 100 further includes a video transmission device (not shown in FIG. 1 ), through which the video transmission device can adjust the channel bandwidth of the wireless channel between the movable platform 100 and the terminal device 200 according to the channel bandwidth.
- the first encoding and compression ratio of the first type of video frame according to the adjusted first encoding and compression ratio, encode the first to-be-encoded video frame in the initial video frame captured by the photographing device 130 to obtain the first video frame, and The first video frame is transmitted to the terminal device; the first video frame is used as a reference video frame, and the second to-be-encoded video frame in the initial video frame is encoded to obtain a second video frame; the second video frame is transmitted to The terminal device is used for the terminal device to use the first video frame as a reference video frame to decode the second video frame, so that the movable platform 100 can adaptively adjust the encoding and compression ratio based on the channel bandwidth, so as to reduce the Or increase the data volume of the transmitted video frame to solve the problem of the degradation
- the video transmission method provided by the embodiments of the present application will be described in detail with reference to the scene in FIG. 1 .
- the scene in FIG. 1 is only used to explain the video transmission method provided by the embodiment of the present application, but does not constitute a limitation on the application scene of the video transmission method provided by the embodiment of the present application.
- FIG. 2 is a schematic flowchart of steps of a video transmission method provided by an embodiment of the present application. It is applied to the mobile platform to solve the problem that the transmitted video quality is degraded or the transmission is stuck, and ensure the reliability and video quality of wireless image transmission.
- the video transmission method includes steps S101 to S104.
- Step S101 adjusting the first encoding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel.
- the movable platform includes a photographing device, which can be mounted on the platform of the movable platform, or can be integrated with the movable platform.
- the photographing device Through the photographing device, the environment where the movable platform is located can be photographed to obtain the initial The video frame
- the initial video frame captured by the shooting device can be transmitted to the terminal device through the wireless channel between the movable platform and the terminal device after being encoded, and the initial video frame is encoded to obtain the first type of video frame or the second type of video frame.
- the first type of video frames includes I frames
- the second type of video frames includes P frames.
- the initial video frame may be a single video frame, or may be a frame sequence composed of multiple video frames, which is not specifically limited in this embodiment of the present application.
- the manner of adjusting the first coding and compression ratio of the first type of video frame may be: When the channel bandwidth of the channel is less than the preset channel bandwidth, according to the channel bandwidth of the wireless channel between the mobile platform and the terminal device, the first coding and compression ratio of the first type of video frame is increased; When the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth, and the first coding compression ratio is greater than the preset coding compression ratio, according to the channel bandwidth of the wireless channel between the mobile platform and the terminal device, reduce the first type The first encoding compression ratio of the video frame.
- the preset channel bandwidth and the preset coding compression ratio may be set based on actual conditions, which are not specifically limited in this embodiment of the present application.
- the channel bandwidth of the wireless channel is less, and it is easy to occur that the terminal device requests the mobile platform for encoding to generate the first type of video frame, and the first type of video frame
- the corresponding amount of encoded data is large.
- the channel bandwidth is lower than the preset channel bandwidth, the transmission of the first type of video frame with a large amount of encoded data through the wireless channel is likely to cause interruption of wireless image transmission. Therefore, when the channel bandwidth is lower than When the channel bandwidth is preset, the first encoding and compression ratio of the first type of video frame is increased, so that the first type of video frame is subsequently encoded by the increased first encoding and compression ratio, thereby reducing the encoding corresponding to the first type of video frame.
- the amount of data ensures the reliability of wireless image transmission.
- the first encoding and compression ratio of the first type of video frame After reducing the first encoding and compression ratio of the first type of video frame, when the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth, if the first encoding and compression ratio after the reduction continues
- the first type of video frame is generated by encoding, although the reliability of wireless image transmission can be guaranteed, but the amount of encoded data corresponding to the first type of video frame is reduced, which will affect the quality of the video decoded by the terminal device.
- the first encoding and compression ratio of the first type of video frame is lowered so that the Subsequently, the first type of video frame is generated by encoding with the lowered first encoding and compression ratio, thereby increasing the amount of encoded data corresponding to the first type of video frame, which can improve the video decoded by the terminal device while ensuring the reliability of wireless image transmission. picture quality.
- the manner of increasing or decreasing the first encoding and compression ratio of the first type of video frame may be: Compression ratio gain value; according to the compression ratio gain value, increase or decrease the first coding compression ratio of the first type of video frame, that is, add the first coding compression ratio to the compression ratio gain value to increase the first coding ratio compression ratio, or subtract the compression ratio gain value from the first coding compression ratio to lower the first coding compression ratio.
- the memory of the movable platform stores the mapping relationship between the channel bandwidth and the compression ratio gain value. Through the mapping relationship, the compression ratio gain value corresponding to the channel bandwidth, the channel bandwidth and the compression ratio gain value can be accurately obtained. The mapping relationship between them may be set based on the actual situation, which is not specifically limited in this embodiment of the present application.
- step S101 specifically includes: sub-steps S1011 to S1012.
- Sub-step S1011 obtaining the complexity of the environment where the movable platform is located
- Sub-step S1012 Adjust the first coding compression ratio of the first type of video frame according to the channel bandwidth and the complexity of the wireless channel.
- the complexity of the environment where the movable platform is located is determined according to the images or videos collected by the camera of the movable platform, and the complexity of the environment where the movable platform is located may be the spatial complexity of the images or videos collected by the camera. degree and/or time complexity, for example, obtaining the initial video frame captured by the camera, performing Sobel filtering on the initial video frame, and then calculating the standard deviation or variance of each pixel in the filtered initial video frame, and The complexity of the environment in which the movable platform is located is determined from the standard deviation or variance of each pixel in the filtered initial video frame.
- the manner of adjusting the first encoding and compression ratio of the first type of video frame may be: When the channel bandwidth of the wireless channel between the movable platform and the terminal device is smaller than the preset channel bandwidth, and the complexity of the environment where the movable platform is located is smaller than the preset complexity, the first coding compression ratio is increased; When the channel bandwidth of the wireless channel between the platform and the terminal device is greater than or equal to the preset channel bandwidth, and the complexity of the environment where the movable platform is located is greater than or equal to the preset complexity, the first encoding and compression ratio is lowered.
- the preset complexity may be set based on an actual situation, which is not specifically limited in this embodiment of the present application.
- the channel bandwidth of the wireless channel is less, and it is easy to occur that the terminal device requests the mobile platform for encoding to generate the first type of video frame, and the first type of video frame
- the corresponding amount of encoded data is large.
- the channel bandwidth is lower than the preset channel bandwidth
- the transmission of the first type of video frame with a large amount of encoded data through the wireless channel is likely to cause interruption of wireless image transmission. Therefore, when the channel bandwidth is lower than When the channel bandwidth is preset and the complexity of the scene is less than the preset complexity, the first encoding and compression ratio of the first type of video frame can be increased, so that the first type of video can be subsequently encoded by the increased first encoding and compression ratio.
- the amount of encoded data corresponding to the video frame reduces the quality of the video decoded by the terminal device, but it can meet the needs of the current scene and ensure the reliability of wireless image transmission, which greatly improves the user experience.
- the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth, if the first encoding and compression ratio after the reduction continues.
- the first type of video frame is generated by encoding, although the reliability of wireless image transmission can be guaranteed, but the amount of encoded data corresponding to the first type of video frame is reduced, which will affect the quality of the video decoded by the terminal device.
- the degree of complexity is greater than or equal to the preset complexity, the image quality of the video decoded by the terminal device is relatively high. Therefore, the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth.
- the first encoding and compression ratio of the first type of video frame is lowered, so that the first type of video frame is subsequently generated by encoding with the lowered first encoding and compression ratio, thereby increasing the number of video frames.
- the amount of encoded data corresponding to the first type of video frame can improve the image quality of the video decoded by the terminal device while ensuring the reliability of wireless image transmission, so that the image quality of the video decoded by the terminal device can meet the image quality of the current scene. quality needs.
- the channel bandwidth of the wireless channel between the movable platform and the terminal device is less than the preset channel bandwidth, and the complexity of the scene is greater than or equal to the preset complexity, although the current scene has higher image quality requirements , but since the channel bandwidth is less than the preset channel bandwidth, if the amount of encoded data corresponding to the first type of video frame is not reduced, the wireless image transmission will be interrupted. Therefore, the channel bandwidth of the wireless channel between the mobile platform and the terminal device is less than When the channel bandwidth is preset and the complexity of the scene is greater than or equal to the preset complexity, the first encoding and compression ratio of the first type of video frame is increased, so that the first type of video is subsequently generated by encoding with the increased first encoding and compression ratio. frame to reduce the amount of encoded data corresponding to the first type of video frame and ensure the reliability of wireless image transmission.
- the first video frame of the first type of video frame is lowered by lowering the first channel bandwidth.
- Encoding compression ratio so that the first type of video frame is subsequently generated by encoding with the lowered first encoding and compression ratio, thereby increasing the amount of encoded data corresponding to the first type of video frame, which can ensure the reliability of wireless image transmission and improve the terminal.
- the quality of the video decoded by the device is greater than the preset channel bandwidth, and the complexity of the scene is less than the preset complexity
- Step S102 Encode the first to-be-encoded video frame in the initial video frame according to the adjusted first encoding and compression ratio to obtain a first video frame, and transmit the first video frame to the terminal equipment.
- the terminal device When the terminal device cannot decode the video frame transmitted by the mobile platform, the terminal device needs to send a first-type video frame generation request to the mobile platform, and when the mobile platform receives the first-type video frame sent by the terminal device. After the request is generated, the first video frame to be encoded in the initial video frame is encoded according to the adjusted first encoding and compression ratio to obtain the first video frame, and the first video frame is transmitted to the terminal device.
- the generation request of the first type of video frame carries the target frame sequence number
- the target frame sequence number includes the frame sequence number of the video frame that the terminal device needs to refer to when decoding the video or the frame sequence number of the video frame currently decoded by the terminal device.
- the sequence number can determine the first video frame to be encoded in the initial video frame.
- the target frame sequence number is the frame sequence number of the video frame that needs to be referenced when the terminal device decodes the video
- the initial video frame corresponding to the target frame sequence number is determined as The first video frame to be encoded
- the target frame serial number is the frame serial number of the video frame currently decoded by the terminal device, subtract 1 from the target frame serial number to obtain the reference frame serial number, and determine the initial video frame corresponding to the reference frame serial number. is the first video frame to be encoded.
- Step S103 using the first video frame as a reference video frame, encode a second to-be-encoded video frame in the initial video frame to obtain a second video frame.
- the first video frame is used as the reference video frame, and the second video frame to be encoded in the initial video frame is encoded to obtain the second video frame.
- the frame sequence number difference between the first to-be-encoded video frame and the second to-be-encoded video frame is less than or equal to the preset frame sequence number difference
- the second to-be-encoded video frame may be determined according to the frame sequence number of the first video frame, for example , the frame sequence number of the first video frame is added by 1 to obtain the frame sequence number to be encoded, and the initial video frame corresponding to the to-be-encoded frame sequence number is determined as the second to-be-coded video frame.
- the preset frame sequence number difference can be set based on the actual situation, which is not specifically limited in this application.
- Step S104 Transmit the second video frame to the terminal device, so that the terminal device uses the first video frame as a reference video frame to decode the second video frame.
- the second video frame is transmitted to the terminal device, and the terminal device receives the second video frame transmitted by the movable platform. Since the first video frame has been received before, and the second video frame is the first video frame A video frame is obtained by encoding for reference. Therefore, the terminal device uses the received first video frame as the reference video frame to decode the second video frame, so that the terminal device can display images.
- the video transmission method provided by the above embodiment adjusts the first encoding and compression ratio of the first type of video frame through the channel bandwidth of the wireless channel between the movable platform and the terminal device, and then compares and shoots according to the adjusted first encoding and compression ratio.
- the first video frame to be encoded in the initial video frame captured by the device is encoded to obtain the first video frame, and the first video frame is transmitted to the terminal device, and the first video frame is used as the reference video frame, and the first video frame is used as the reference video frame.
- the second video frame to be encoded in the initial video frame is encoded to obtain a second video frame, and finally the second video frame is transmitted to the terminal device, so that the terminal device uses the first video frame as a reference video frame to Decoding, so that the mobile platform can adaptively adjust the encoding and compression ratio based on the channel bandwidth, so as to reduce or increase the data volume of the transmitted video frame, so as to solve the problem of the degradation of the transmitted video quality or the transmission freeze, and ensure the wireless image transmission. reliability and video quality.
- FIG. 4 is a schematic flowchart of steps of another video transmission method provided by an embodiment of the present application.
- the video transmission method includes steps S201 to S204.
- Step S201 according to the channel bandwidth of the wireless channel, adjust the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame.
- the movable platform includes a photographing device, and the photographing device can be mounted on the platform of the movable platform, or can be integrated with the movable platform.
- the photographing device Through the photographing device, the environment where the movable platform is located can be photographed to obtain the initial The video frame, the initial video frame captured by the shooting device can be transmitted to the terminal device through the wireless channel between the movable platform and the terminal device after being encoded.
- the amount of encoded data corresponding to the first type of video frame is greater than the amount of encoded data corresponding to the second type of video frame.
- the first type of video frame includes I frames
- the second type of video frame includes P frames.
- the first coding compression ratio and the second coding compression ratio can be lowered at the same time, the first coding compression ratio and the second coding compression ratio can also be raised at the same time, or the first coding compression ratio can be raised.
- the manner of adjusting the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame may be: : When the channel bandwidth of the wireless channel between the mobile platform and the terminal device is less than the preset channel bandwidth, increase the first encoding and compression ratio of the first type of video frame, and reduce the second encoding and compression ratio of the second type of video frame or, when the channel bandwidth of the wireless channel between the movable platform and the terminal device is greater than or equal to the preset channel bandwidth, and the first encoding and compression ratio is greater than the preset encoding and compression ratio, lower the number of the first type of video frame.
- a coding compression ratio is set, and the second coding compression ratio of the second type of video frame is increased.
- the preset channel bandwidth and the preset coding compression ratio may be set based on actual conditions, which are not specifically limited in this embodiment of the present application.
- the channel bandwidth of the wireless channel is less, and it is easy to occur that the terminal device requests the mobile platform for encoding to generate the first type of video frame, and the first type of video frame
- the corresponding amount of encoded data is large.
- the channel bandwidth is lower than the preset channel bandwidth, the transmission of the first type of video frame with a large amount of encoded data through the wireless channel is likely to cause interruption of wireless image transmission. Therefore, when the channel bandwidth is lower than When the channel bandwidth is preset, the first encoding and compression ratio of the first type of video frame is increased, so that the first type of video frame is subsequently encoded by the increased first encoding and compression ratio, thereby reducing the encoding corresponding to the first type of video frame.
- the amount of data ensures the reliability of wireless image transmission.
- the second type of video frame is subsequently generated by encoding with the reduced second encoding and compression ratio, thereby increasing the number of second type video frames.
- the amount of encoded data corresponding to the second type of video frame can quickly restore the image quality of the video decoded by the terminal device.
- the first encoding and compression ratio of the first type of video frame After reducing the first encoding and compression ratio of the first type of video frame, when the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth, if the first encoding and compression ratio after the reduction continues
- the first type of video frame is generated by encoding, although the reliability of wireless image transmission can be guaranteed, but the amount of encoded data corresponding to the first type of video frame is reduced, which will affect the quality of the video decoded by the terminal device.
- the first encoding and compression ratio of the first type of video frame is lowered so that the Subsequently, the first type of video frame is generated by encoding with the lower first encoding and compression ratio, thereby increasing the amount of encoded data corresponding to the first type of video frame.
- the subsequent The second type of video frame is generated by increasing the second encoding and compression ratio, thereby reducing the amount of encoded data corresponding to the second type of video frame, which can ensure the reliability of wireless image transmission and improve the quality of the video decoded by the terminal device. image quality.
- step S201 may include: sub-steps S2011 to S2012.
- Sub-step S2011 acquiring the complexity of the environment where the movable platform is located
- Sub-step S2012 Adjust the first coding compression ratio and the second coding compression ratio according to the channel bandwidth and the complexity of the wireless channel.
- the complexity of the environment where the movable platform is located is determined according to the images or videos collected by the camera of the movable platform, and the complexity of the environment where the movable platform is located may be the spatial complexity of the images or videos collected by the camera. degree and/or time complexity.
- the first coding compression ratio and the second coding compression ratio can be lowered at the same time, or the first coding compression ratio and the second coding compression ratio can be raised at the same time, or
- the first encoding compression ratio can also be decreased while the second encoding compression ratio is increased, which is not specifically limited in this embodiment of the present application.
- the method for adjusting the first coding compression ratio and the second coding compression ratio may be: the channel bandwidth of the wireless channel is smaller than the preset channel. bandwidth, and the complexity of the environment where the mobile platform is located is less than the preset complexity, increase the first coding compression ratio and lower the second coding compression ratio; or when the channel bandwidth of the wireless channel is greater than or equal to the preset channel bandwidth , and when the complexity of the environment in which the movable platform is located is greater than or equal to the preset complexity, the first encoding and compression ratio is lowered, and the second encoding and compression ratio is increased.
- the preset complexity may be set based on an actual situation, which is not specifically limited in this embodiment of the present application.
- the channel bandwidth of the wireless channel is less, and it is easy to occur that the terminal device requests the mobile platform for encoding to generate the first type of video frame, and the first type of video frame
- the corresponding amount of encoded data is large.
- the channel bandwidth is lower than the preset channel bandwidth, the transmission of the first type of video frame with a large amount of encoded data through the wireless channel is likely to cause interruption of wireless image transmission.
- the first encoding and compression ratio of the first type of video frame can be increased to reduce the amount of encoded data corresponding to the first type of video frame, and then the amount of encoded data corresponding to the first type of video frame can be reduced.
- the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth, if the first encoding and compression ratio after the reduction continues.
- the first type of video frame is generated by encoding, although the reliability of wireless image transmission can be guaranteed, but the amount of encoded data corresponding to the first type of video frame is reduced, which will affect the quality of the video decoded by the terminal device.
- the degree of complexity is greater than or equal to the preset complexity, the image quality of the video decoded by the terminal device is relatively high. Therefore, the channel bandwidth of the wireless channel between the mobile platform and the terminal device is greater than or equal to the preset channel bandwidth.
- the first encoding and compression ratio of the first type of video frame can be lowered, so that the amount of encoded data corresponding to the first type of video frame can be restored to the initial state, and at the same time the first type of video frame can be increased.
- the second encoding and compression ratio of the second type of video frame can improve the image quality of the video decoded by the terminal device while ensuring the reliability of wireless image transmission, so that the image quality of the video decoded by the terminal device can meet the picture quality of the current scene. quality needs.
- the channel bandwidth of the wireless channel between the movable platform and the terminal device is less than the preset channel bandwidth, and the complexity of the scene is greater than or equal to the preset complexity, although the current scene has higher image quality requirements , but since the channel bandwidth is smaller than the preset channel bandwidth, if the amount of encoded data corresponding to the first type of video frame is not reduced or increased, the wireless image transmission will be interrupted.
- the channel of the wireless channel between the mobile platform and the terminal device When the bandwidth is less than the preset channel bandwidth, and the complexity of the scene is greater than or equal to the preset complexity, increase the first encoding and compression ratio of the first type of video frame to reduce the amount of encoded data corresponding to the first type of video frame and ensure wireless The reliability of image transmission, and at the same time appropriately increase the amount of encoded data of the second type of video frame to reduce the amount of encoded data corresponding to the second type of video.
- the image quality of the video can meet the image quality requirements of the current scene and improve the user experience.
- the first video frame of the first type of video frame is lowered by lowering the first channel bandwidth.
- the encoding compression ratio is used to increase the amount of encoded data corresponding to the first type of video frame.
- by reducing the second encoding and compression ratio of the second type of video to increase the amount of encoded data corresponding to the second type of video frame it is possible to ensure the wireless image quality. While improving the reliability of transmission, the image quality of the video decoded by the terminal device is improved.
- Step S202 Encode the first to-be-encoded video frame in the initial video frame according to the adjusted first encoding and compression ratio to obtain a first video frame, and transmit the first video frame to the terminal equipment.
- the terminal device When the terminal device cannot decode the video frame transmitted by the mobile platform, the terminal device needs to send a first-type video frame generation request to the mobile platform, and when the mobile platform receives the first-type video frame sent by the terminal device. After the request is generated, the first video frame to be encoded in the initial video frame is encoded according to the adjusted first encoding and compression ratio to obtain the first video frame, and the first video frame is transmitted to the terminal device.
- Step S203 Using the first video frame as a reference video frame, encode a second to-be-encoded video frame in the initial video frame according to the adjusted second encoding and compression ratio to obtain a second video frame.
- the first video frame is used as the reference video frame, and the second to-be-encoded video frame in the initial video frame is compared according to the adjusted second encoding and compression ratio Encoding is performed to obtain a second video frame, so as to adjust the amount of encoded data corresponding to the second video frame.
- the frame sequence number difference between the first to-be-encoded video frame and the second to-be-encoded video frame is less than or equal to the preset frame sequence number difference
- the second to-be-encoded video frame may be determined according to the frame sequence number of the first video frame, for example , the frame sequence number of the first video frame is added by 1 to obtain the frame sequence number to be encoded, and the initial video frame corresponding to the to-be-encoded frame sequence number is determined as the second to-be-coded video frame.
- the preset frame sequence number difference can be set based on the actual situation, which is not specifically limited in this application.
- Step S204 Transmit the second video frame to the terminal device, so that the terminal device uses the first video frame as a reference video frame to decode the second video frame.
- the second video frame is transmitted to the terminal device, and the terminal device receives the second video frame transmitted by the movable platform. Since the first video frame has been received before, and the second video frame is the first video frame A video frame is obtained by encoding for reference. Therefore, the terminal device uses the received first video frame as the reference video frame to decode the second video frame, so that the terminal device can display images.
- the target coding rate is determined according to the channel bandwidth of the wireless channel between the movable platform and the terminal device, and the current coding rate of the encoder of the movable platform is obtained; based on the target coding rate and the current coding
- the difference between the code rates controls the PID code stream controller in the movable platform to adjust the code rate of the encoder to the target code rate.
- the code flow control coefficients of the PID code flow controller include proportional control coefficients (P coefficients), integral control coefficients (I coefficients) and differential control coefficients (D coefficients).
- the fast and smooth Adjusting the coding rate of the encoder to the target coding rate can avoid the influence of mutation and jitter of the coding rate on wireless image transmission.
- the method of determining the target coding code rate may be: obtaining a mapping relationship table between the channel bandwidth and the coding code rate; according to the mapping relationship table and the channel bandwidth of the wireless channel, determining Target encoding bit rate.
- the mapping relationship table between the channel bandwidth and the coding rate may be set based on the actual situation, which is not specifically limited in this embodiment of the present application.
- the frame serial number difference between the frame serial number and the second frame serial number is used to estimate the accumulated data volume of the wireless channel; when the accumulated data volume is greater than the preset data volume, the coding rate of the encoder of the movable platform is reduced, and the When the accumulated data volume is less than or equal to the preset data volume, no processing is performed.
- the preset data amount may be set based on the actual situation, which is not specifically limited in this embodiment of the present application. When the accumulated data amount of the wireless channel is greater than the preset data amount, the encoding bit rate of the encoder of the movable platform is reduced, so as to reduce the encoded data amount of the encoded video frame and reduce the load of the wireless channel.
- the method of reducing the encoding code rate of the encoder of the movable platform may be: according to the accumulated data amount, determine the code rate gain value; The current coding rate of the encoder of the movable platform is subtracted from the code rate gain value, so as to reduce the coding rate of the encoder of the movable platform.
- the memory of the movable platform stores the mapping relationship between the accumulated data amount and the code rate gain value. The larger the accumulated data amount, the larger the code rate gain value, and the smaller the accumulated data amount, the greater the code rate gain value.
- the code rate gain value can be quickly determined through the mapping relationship and the accumulated data amount, and the mapping relationship between the accumulated data amount and the code rate gain value can be set based on the actual situation, which is not specifically limited in this embodiment of the present application.
- the coding rate of the encoder of the movable platform may also be reduced according to a preset ratio. For example, if the preset ratio is 50%, the current encoding bit rate of the encoder of the movable platform is reduced to (100%-50%) of the current encoding bit rate. For another example, if the preset ratio is 30%, the available The current encoding rate of the encoder of the mobile platform is reduced to (100%-30%) of the current encoding rate. For another example, if the preset ratio is 25%, the current encoding rate of the encoder of the mobile platform is reduced to (100%-25%) of the current encoding bit rate.
- the method of estimating the accumulated data volume of the wireless channel may be: according to the current coding rate of the encoder, determine the unit of the video frame.
- Data volume According to the unit data volume and the frame serial number difference between the first frame serial number and the second frame serial number, estimate the accumulated data volume of the wireless channel, that is, determine the product of the unit data volume and the frame serial number difference, and calculate the unit data volume.
- the product of the data amount and the frame number difference is determined as the accumulated data amount of the wireless channel.
- the memory of the movable platform stores the mapping relationship between the encoding bit rate and the unit data amount, and the unit data amount of the video frame can be determined through the mapping relationship and the current encoding bit rate of the encoder.
- a coding influence parameter is obtained, wherein the coding influence parameter includes the channel bandwidth of the wireless channel, the current system power consumption of the mobile platform, the complexity of the environment where the mobile platform is located, and/or the decoding capability of the terminal device ;
- the encoding influence parameter adjust the encoding mode and video specification of the encoder of the mobile platform.
- the coding mode and video specification of the encoder of the movable platform are adaptively adjusted by coding influence parameters, so as to improve the battery life of the movable platform and ensure the transmission reliability and universality of wireless image transmission.
- the video specification includes a first video specification and a second video specification, the first video specification includes Fullsize, the second video specification includes 2xbinning, the encoding mode includes a first encoding mode and a second encoding mode, and the encoding efficiency of the first encoding mode is greater than The encoding efficiency of the second encoding mode, the encoding mode further includes a third encoding mode, the first encoding mode includes High Efficiency Video Coding (HEVC), namely H.265/HEVC, and the second encoding mode includes Advanced Video Coding (Advanced Video Coding, AVC), namely H.264/AVC, the third encoding mode includes H.266/VVC.
- HEVC High Efficiency Video Coding
- AVC Advanced Video Coding
- H.266/VVC Advanced Video Coding
- the decoding capability of the terminal device is that the terminal device only supports H.264/AVC and H.265/HEVC, adjust the encoding mode of the encoder of the mobile platform to H.264/AVC or H.265/ HEVC, and adjust the video specification of the encoder for the mobile platform to either Fullsize or 2xbinning.
- the encoding mode and video specification of the encoder of the mobile platform can be adjusted adaptively, which can improve the universality of wireless image transmission.
- the encoding mode of the encoder of the mobile platform can be adjusted adaptively, which can take into account the reliability and image quality requirements of wireless image transmission.
- the encoder of the movable platform is The encoding mode of the mobile platform is adjusted to the first encoding mode (H.265/HEVC), and the video specification of the encoder of the mobile platform is adjusted to the first video specification (Fullsize).
- the encoding mode of the encoder of the mobile platform can be adjusted adaptively, which can take into account the reliability of wireless image transmission, image quality requirements and the battery life of the mobile platform. .
- the encoder of the movable platform is adjusted to the first encoding mode (H.265/HEVC), and the video specification of the encoder of the mobile platform is adjusted to the first video specification (Fullsize).
- the channel bandwidth of the mobile platform is greater than or equal to the preset channel bandwidth, and the current system power consumption of the mobile platform is greater than or equal to the preset power consumption, adjust the encoding mode of the encoder of the mobile platform to the second encoding mode (H.264/AVC ), and adjust the video specification of the encoder of the mobile platform to the second video specification (2xbinning).
- the encoding mode and video specification of the encoder of the mobile platform can be adjusted adaptively, which can take into account the reliability of wireless image transmission, image quality requirements and the battery life of the mobile platform. .
- the coding mode and video specification of the encoder of the movable platform can also be adaptively adjusted according to the complexity of the environment in which the movable platform is located, which can improve the universality of wireless image transmission;
- the system power consumption adaptively adjusts the encoding mode and video specification of the encoder of the mobile platform, which can improve the battery life of the mobile platform; it can also adaptively adjust the mobile platform according to the complexity and channel bandwidth of the environment where the mobile platform is located.
- the encoding mode and video specification of the encoder can be used to take into account the reliability, image quality requirements and usage scenarios of wireless image transmission; it can also be determined by the channel bandwidth, the current system power consumption of the mobile platform and the complexity of the environment in which the mobile platform is located.
- the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame are adjusted through the channel bandwidth of the wireless channel between the movable platform and the terminal device, then encoding the first to-be-encoded video frame in the initial video frame captured by the photographing device according to the adjusted first encoding and compression ratio to obtain the first video frame, and transmitting the first video frame to the terminal device, and Using the first video frame as a reference video frame, encode the second to-be-encoded video frame in the initial video frame according to the adjusted second encoding and compression ratio to obtain a second video frame, and finally transmit the second video frame to the terminal A device for the terminal device to use the first video frame as a reference video frame to decode the second video frame, so that the mobile platform can adaptively adjust the encoding and compression ratio based on the channel bandwidth to reduce or increase the data of the transmitted video frame.
- the mobile platform can adaptively adjust the encoding and compression ratio based on the channel bandwidth to reduce or increase
- FIG. 6 is a schematic structural block diagram of a video transmission apparatus provided by an embodiment of the present application.
- the video transmission device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected by a bus 303, such as an I2C (Inter-integrated Circuit) bus.
- the video transmission device 300 is applied to a movable platform.
- the movable platform includes a shooting device. After encoding, the initial video frame captured by the shooting device can be transmitted to the terminal device through a wireless channel between the movable platform and the terminal device.
- the processor 301 may be a micro-controller unit (Micro-controller Unit, MCU), a central processing unit (Central Processing Unit, CPU), or a digital signal processor (Digital Signal Processor, DSP) or the like.
- MCU Micro-controller Unit
- CPU Central Processing Unit
- DSP Digital Signal Processor
- the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) magnetic disk, an optical disk, a U disk, a mobile hard disk, and the like.
- ROM Read-Only Memory
- the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) magnetic disk, an optical disk, a U disk, a mobile hard disk, and the like.
- the processor 301 is used for running the computer program stored in the memory 302, and implements the following steps when executing the computer program:
- the second video frame is transmitted to the terminal device, so that the terminal device uses the first video frame as a reference video frame to decode the second video frame.
- the frame sequence number difference between the first to-be-encoded video frame and the second to-be-encoded video frame is less than or equal to a preset frame sequence number difference.
- the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel includes:
- the first encoding and compression ratio is lowered according to the channel bandwidth.
- the increasing the first coding compression ratio according to the channel bandwidth includes:
- the first encoding compression ratio is increased.
- the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel includes:
- the first coding compression ratio of the first type of video frame is adjusted.
- the complexity of the environment in which the movable platform is located is determined according to images or videos collected by the photographing device.
- the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth and the complexity of the wireless channel includes:
- the first encoding and compression ratio is lowered.
- the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel includes:
- the channel bandwidth of the wireless channel adjusting the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame;
- the said first video frame is used as a reference video frame, and the second to-be-encoded video frame in the initial video frame is encoded to obtain a second video frame, including:
- the amount of encoded data corresponding to the first type of video frame is greater than the amount of encoded data corresponding to the second type of video frame.
- the first type of video frames includes I-frames
- the second type of video frames includes P-frames
- the adjusting the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame according to the channel bandwidth of the wireless channel includes:
- the channel bandwidth is greater than or equal to a preset channel bandwidth
- the first encoding and compression ratio is greater than a preset encoding and compression ratio
- the first encoding and compression ratio is lowered, and the second encoding and compression ratio is increased.
- the adjusting the first encoding and compression ratio of the first type of video frame and the second encoding and compression ratio of the second type of video frame according to the channel bandwidth of the wireless channel includes:
- the first coding compression ratio and the second coding compression ratio are adjusted according to the channel bandwidth and the complexity of the wireless channel.
- the adjusting the first coding compression ratio and the second coding compression ratio according to the channel bandwidth and the complexity of the wireless channel includes:
- the first encoding and compression ratio is decreased, and the second encoding and compression ratio is increased.
- the processor is further configured to implement the following steps:
- the PID stream controller in the movable platform is controlled to adjust the encoding rate of the encoder to the target encoding rate Rate.
- the determining the target coding rate according to the channel bandwidth of the wireless channel includes:
- the target coding code rate is determined according to the mapping relationship table and the channel bandwidth of the wireless channel.
- the processor is further configured to implement the following steps:
- the encoding code rate of the encoder of the movable platform is reduced.
- the reducing the coding rate of the encoder of the movable platform includes:
- the code rate of the encoder of the movable platform is reduced.
- the estimating the accumulated data amount of the wireless channel according to the frame sequence number difference between the first frame sequence number and the second frame sequence number includes:
- the accumulated data volume of the wireless channel is estimated.
- the processor is further configured to implement the following steps:
- the coding impact parameters include the channel bandwidth, the current system power consumption of the mobile platform, the complexity of the environment where the mobile platform is located and/or the decoding capability of the terminal device;
- the encoding influence parameter the encoding mode and video specification of the encoder of the movable platform are adjusted.
- the encoding mode includes a first encoding mode and a second encoding mode, and the encoding efficiency of the first encoding mode is greater than the encoding efficiency of the second encoding mode.
- FIG. 7 is a schematic structural block diagram of a movable platform provided by an embodiment of the present application.
- the movable platform 400 includes a platform body 410 , a power system 420 , a photographing device 430 and a video transmission device 440 .
- the shooting device 430 is used for initial video frame
- the video transmission device 440 is used for encoding the initial video frame captured by the shooting device 430 and for transmitting the encoded initial video frame to the terminal.
- the video transmission device 440 is also used to control the movement of the movable platform.
- Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program includes program instructions, and the processor executes the program instructions to realize the provision of the above embodiments.
- the steps of the video transmission method are described in detail below.
- the computer-readable storage medium may be an internal storage unit of the removable platform described in any of the foregoing embodiments, such as a hard disk or a memory of the removable platform.
- the computer-readable storage medium can also be an external storage device of the removable platform, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the removable platform , SD) card, flash memory card (Flash Card), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
一种视频传输方法、装置、可移动平台及计算机可读存储介质,该方法包括:调整第一类视频帧的第一编码压缩比(S101);按照调整后的第一编码压缩比对第一待编码视频帧进行编码,得到第一视频帧(S102);基于第一视频帧对第二待编码视频帧进行编码,得到第二视频帧(S103);将第二视频帧传输至终端设备,以供终端设备基于第一视频帧对第二视频帧进行解码(S104)。本申请能够保证无线图传的可靠性。
Description
本申请涉及无线图传技术领域,尤其涉及一种视频传输方法、装置、可移动平台及计算机可读存储介质。
目前,可移动平台可以通过无线通信的方式将拍摄得到的视频传输至终端设备,由终端设备显示接收到的视频。在传输视频的过程中,可移动平台与终端设备之间的无线信道的信道质量会随着可移动平台与终端设备之间的距离的变化而发生变化,尤其是可移动平台与终端设备之间的距离较远时,无线信道的信道质量较差,会导致传输的视频画质下降或者传输卡顿的问题,无法保证无线图传的可靠性和视频画质,用户体验不好。
发明内容
基于此,本申请实施例提供了一种视频传输方法、装置、可移动平台及计算机可读存储介质,旨在解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
第一方面,本申请实施例提供了一种视频传输方法,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备,所述方法包括:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
第二方面,本申请实施例还提供了一种视频传输装置,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能 够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备;
所述视频传输装置包括存储器和处理器;
所述存储器用于存储计算机程序;
所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
第三方面,本申请实施例还提供了一种可移动平台,包括:
平台本体;
动力***,设于所述平台本体上,用于为所述可移动平台提供移动动力;
拍摄装置,设于所述平台本体上,用于拍摄初始视频帧;
如上所述的视频传输装置,设于所述平台本体内,用于对所述拍摄装置拍摄到的初始视频帧进行编码以及用于将编码后的初始视频帧传输至终端设备。
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上所述的视频传输方法的步骤。
本申请实施例提供了一种视频传输方法、装置、可移动平台及计算机可读存储介质,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的, 并不能限制本申请。
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是实施本申请实施例提供的视频传输方法的一场景示意图;
图2是本申请实施例提供的一种视频传输方法的步骤示意流程图;
图3是图2中的视频传输方法的子步骤示意流程图;
图4是本申请实施例提供的另一种视频传输方法的步骤示意流程图;
图5是图4中的视频传输方法的子步骤示意流程图;
图6是本申请实施例提供的一种视频传输装置的结构示意性框图;
图7是本申请实施例提供的一种可移动平台的结构示意性框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
目前,可移动平台可以通过无线通信的方式将拍摄得到的视频传输至终端设备,由终端设备显示接收到的视频。在传输视频的过程中,可移动平台与终端设备之间的无线信道的信道质量会随着可移动平台与终端设备之间的距离的变化而发生变化,尤其是可移动平台与终端设备之间的距离较远时,无线信道的信道质量较差,会导致传输的视频画质下降或者传输卡顿的问题,无法保证无线图传的可靠性和视频画质,用户体验不好。
为解决上述问题,本申请实施例提供了一种视频传输方法、装置、可移动 平台及计算机可读存储介质,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
请参阅图1,图1是实施本申请实施例提供的视频传输方法的一场景示意图,如图1所示,该场景包括可移动平台100和终端设备200,可移动平台100包括平台本体110、设于平台本体110上的动力***120、设于平台本体上的拍摄装置130和设于平台本体内的第一无线通信装置(图1中未示出),终端设备200包括显示装置210和第二无线通信装置(图1中未示出),通过无人机100内的第一无线通信装置可以与终端设备200内的第二无线通信装置通信,从而建立无人机100与终端设备200的之间的无线信道,使得拍摄装置130拍摄的初始视频帧经过编码后能够通过可移动平台100与终端设备200之间的无线信道传输至终端设备200。
其中,终端设备200通过显示装置210显示可移动平台100传输的编码后的视频帧,以供用户观看。需要说明的是,显示装置210包括设置在终端设备200上的显示屏或者独立于终端设备200的显示器,独立于终端设备200的显示器可以包括手机、平板电脑或者个人电脑等,或者也可以是带有显示屏的其他电子设备。其中,该显示屏包括LED显示屏、OLED显示屏、LCD显示屏等等。
在一实施例中,可移动平台100还可以包括设于平台本体110上的云台140,云台140用于搭载拍摄装置130,云台140包括三轴电机,分别为平移轴电机、俯仰轴电机和横滚轴电机,用于调整搭载于云台420上的拍摄装置130的平衡姿态,以便随时随地拍摄出高精度的稳定画面。
在一实施例中,可移动平台100还可以包括传感***,传感***可以包括一个或者多个传感器,以感测,可移动平台100的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)、角加速度、姿态、位置(绝对位置或者相对位置)等。所述一个或者多个传感器包括GPS传感器、运动传感器、 惯性传感器、近程传感器或者影像传感器。可选的,传感***还可以用于采集,可移动平台100所处的环境数据,如气候条件、要接近的潜在的障碍、地理特征的位置、人造结构的位置等。
其中,动力***120用于为可移动平台100提供移动动力,水平方向的动力***120中的一个或者多个可以顺时针方向旋转,而水平方向的动力***120中的其它一个或者多个可以逆时针方向旋转。例如,顺时针旋转的动力***120与逆时针旋转的动力***120的数量一样。每一个水平方向的动力***120的旋转速率可以独立变化,以实现每个动力***120导致的提升及/或推动操作,从而调整可移动平台100的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)。
在一实施例中,终端设备100包括遥控器、地面控制平台、手机、平板电脑、笔记本电脑和PC电脑等。可移动平台可以是手持移动设备,也可以是具备动力***,并依靠动力***提供的动力移动的设备。例如,可移动平台包括无人机、无人船和无人车等。因此,动力***120能够使无人机垂直地从地面起飞,或者垂直地降落在地面上,而不需要无人机任何水平运动(如不需要在跑道上滑行)。可选的,动力***120可以允许无人机在空中预设位置和/或方向盘旋。一个或者多个动力***120在受到控制时可以独立于其它的动力***120。可选的,一个或者多个动力***120可以同时受到控制。例如,无人机可以有多个水平方向的动力***120,以追踪目标的提升及/或推动。水平方向的动力***120可以被致动以提供无人机垂直起飞、垂直降落、盘旋的能力。
在一实施例中,可移动平台100还包括视频传输装置(图1中未示出),通过视频传输装置可以根据所述可移动平台100与终端设备200之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;按照调整后的第一编码压缩比对拍摄装置130拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备;以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;将第二视频帧传输至所述终端设备,以供终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码,使得可移动平台100能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
以下,将结合图1中的场景对本申请的实施例提供的视频传输方法进行详细介绍。需知,图1中的场景仅用于解释本申请实施例提供的视频传输方法, 但并不构成对本申请实施例提供的视频传输方法应用场景的限定。
请参阅图2,图2是本申请实施例提供的一种视频传输方法的步骤示意流程图。应用于可移动平台,用于解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
如图2所示,该视频传输方法包括步骤S101至步骤S104。
步骤S101、根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比。
其中,可移动平台包括拍摄装置,该拍摄装置可以搭载在可移动平台的云台上,也可以与可移动平台一体化设置,通过该拍摄装置可以对可移动平台所处环境进行拍摄,得到初始视频帧,该拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备,对初始视频帧进行编码,可以得到第一类视频帧或者第二类视频帧,第一类视频帧包括I帧,第二类视频帧包括P帧。其中,该初始视频帧可以为单个的视频帧,也可以为由多个视频帧组成的帧序列,本申请实施例对此不做具体限定。
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽时,根据可移动平台与终端设备之间的无线信道的信道带宽,调高第一类视频帧的第一编码压缩比;或者在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,根据可移动平台与终端设备之间的无线信道的信道带宽,调低第一类视频帧的第一编码压缩比。其中,预设信道带宽和预设编码压缩比可基于实际情况进行设置,本申请实施例对此不做具体限定。
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽时,通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,从而减少第一类视频帧对应的编码数据量,保证无线图传的可靠性。
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的 第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调高或调低第一类视频帧的第一编码压缩比的方式可以为:获取与该信道带宽对应的压缩比增益值;根据该压缩比增益值,调高或调低第一类视频帧的第一编码压缩比,即用第一编码压缩比加上该压缩比增益值,以调高第一编码压缩比,或者用第一编码压缩比减去该压缩比增益值,以调低第一编码压缩比。其中,可移动平台的存储器中存储有信道带宽与压缩比增益值之间的映射关系,通过该映射关系,可以准确的获取与该信道带宽对应的压缩比增益值,信道带宽与压缩比增益值之间的映射关系可基于实际情况进行设置,本申请实施例对此不做具体限定。
在一实施例中,如图3所示,步骤S101具体包括:子步骤S1011至S1012。
子步骤S1011、获取所述可移动平台所处环境的复杂度;
子步骤S1012、根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。
其中,可移动平台所处环境的复杂度是根据可移动平台的拍摄装置采集到的图像或视频确定的,可移动平台所处环境的复杂度可以为拍摄装置采集到的图像或视频的空间复杂度和/或时间复杂度,例如,获取拍摄装置拍摄到的初始视频帧,并对该初始视频帧进行Sobel滤波,然后计算滤波后的初始视频帧中的每个像素的标准差或方差,并根据滤波后的初始视频帧中的每个像素的标准差或方差,确定可移动平台所处环境的复杂度。
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽和可移动平台所处环境的复杂度,调整第一类视频帧的第一编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且可移动平台所处环境的复杂度小于预设复杂度时,调高第一编码压缩比;或者,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台所处环境的复杂度大于或等于预设复杂度时,调低第一编 码压缩比。其中,预设复杂度可基于实际情况进行设置,本申请实施例对此不做具体限定。
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽,且场景的复杂度小于预设复杂度时,可以通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,以减少第一类视频帧对应的编码数据量,由于对于场景的复杂度小于预设复杂度的情况,对终端设备解码出来的视频的画质要求较低,因此虽然减少了第一类视频帧对应的编码数据量,降低了终端设备解码出来的视频的画质,但能够满足当前场景的需求,也能够保证无线图传的可靠性,极大的提高了用户体验。
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,而对于场景的复杂度大于或等于预设复杂度的情况,对终端设备解码出来的视频的画质要求较高,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质,使得终端设备解码出来的视频的画质能够满足当前场景的画质需求。
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,虽然当前场景的画质要求较高,但由于信道带宽小于预设信道带宽,如果不减少第一类视频帧对应的编码数据量,会导致无线图传中断,因此,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,以减少第一类视频帧对应的编码数据量,保证无线图传的可靠性。
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,且场景的复杂度小于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。
步骤S102、按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备。
在终端设备无法通过可移动平台传输的视频帧来解码时,终端设备需要向可移动平台发送第一类视频帧的生成请求,而当可移动平台接收到终端设备发送的第一类视频帧的生成请求后,按照调整后的第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将该第一视频帧传输至终端设备。
其中,该第一类视频帧的生成请求携带有目标帧序号,该目标帧序号包括终端设备解码视频时需要参考的视频帧的帧序号或者终端设备当前解码的视频帧的帧序号,通过目标帧序号可以确定初始视频帧中的第一待编码视频帧,例如,若目标帧序号为终端设备解码视频时需要参考的视频帧的帧序号,则将与该目标帧序号对应的初始视频帧确定为第一待编码视频帧,而若目标帧序号为终端设备当前解码的视频帧的帧序号,则用目标帧序号减1,得到参考帧序号,并将与该参考帧序号对应的初始视频帧确定为第一待编码视频帧。
步骤S103、以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。
在将第一视频帧发送给终端设备后,以第一视频帧为参考视频帧,对初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。其中,第一待编码视频帧和第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值,第二待编码视频帧可以根据第一视频帧的帧序号确定,例如,用第一视频帧的帧序号加1,得到待编码帧序号,并将与该待编码帧序号对应的初始视频帧确定为第二待编码视频帧。预设帧序号差值可基于实际情况进行设置,本申请对此不做具体限定。
步骤S104、将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
在编码得到第二视频帧后,将第二视频帧传输至终端设备,终端设备接收 可移动平台传输的第二视频帧,由于之前已经接收到第一视频帧,且第二视频帧是以第一视频帧为参考进行编码得到的,因此,终端设备以接收到第一视频帧为参考视频帧对第二视频帧进行解码,从而使得终端设备能够显示图像。
上述实施例提供的视频传输方法,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
请参阅图4,图4是本申请实施例提供的另一种视频传输方法的步骤示意流程图。
如图4所示,该视频传输方法包括步骤S201至S204。
步骤S201、根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比。
其中,可移动平台包括拍摄装置,该拍摄装置可以搭载在可移动平台的云台上,也可以与可移动平台一体化设置,通过该拍摄装置可以对可移动平台所处环境进行拍摄,得到初始视频帧,该拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备。第一类视频帧对应的编码数据量大于第二类视频帧对应的编码数据量,第一类视频帧包括I帧,第二类视频帧包括P帧。
可以理解的是,根据无线信道的信道带宽,可以同时调低第一编码压缩比和第二编码压缩比,也可以同时调高第一编码压缩比和第二编码压缩比,也可以调高第一编码压缩比,而调低第二编码压缩比,还可以调低第一编码压缩比,而调高第二编码压缩比,本申请实施例对此不做具体限定。
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽时,调高第一类视频帧的第一编码压缩比,并调低第二类视频帧的第二编码压缩比;或者,在可移动平台与终端设备之间的无线信道的信道带宽大于或等 于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,调低第一类视频帧的第一编码压缩比,并调高第二类视频帧的第二编码压缩比。其中,预设信道带宽和预设编码压缩比可基于实际情况进行设置,本申请实施例对此不做具体限定。
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽时,通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,从而减少第一类视频帧对应的编码数据量,保证无线图传的可靠性,此外,通过调低第二类视频帧的第二编码压缩比,使得后续通过调低的第二编码压缩比编码生成第二类视频帧,从而增加第二类视频帧对应的编码数据量,可以快速的恢复终端设备解码出来的视频的画质。
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,此外,通过调高第二类视频帧的第二编码压缩比,使得后续通过调高的第二编码压缩比编码生成第二类视频帧,从而减少第二类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。
在一实施例中,如图5所示,步骤S201可以包括:子步骤S2011至S2012。
子步骤S2011、获取所述可移动平台所处环境的复杂度;
子步骤S2012、根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。
其中,可移动平台所处环境的复杂度是根据可移动平台的拍摄装置采集到的图像或视频确定的,可移动平台所处环境的复杂度可以为拍摄装置采集到的图像或视频的空间复杂度和/或时间复杂度。
可以理解的是,根据无线信道的信道带宽和复杂度,可以同时调低第一编码压缩比和第二编码压缩比,也可以同时调高第一编码压缩比和第二编码压缩比,也可以调高第一编码压缩比,而调低第二编码压缩比,还可以调低第一编码压缩比,而调高第二编码压缩比,本申请实施例对此不做具体限定。
在一实施例中,根据无线信道的信道带宽和可移动平台所处环境的复杂度,调整第一编码压缩比和第二编码压缩比的方式可以为:在无线信道的信道带宽小于预设信道带宽,且可移动平台所处环境的复杂度小于预设复杂度时,调高第一编码压缩比,并调低第二编码压缩比;或者在无线信道的信道带宽大于或等于预设信道带宽,且可移动平台所处环境的复杂度大于或等于预设复杂度时,调低第一编码压缩比,并调高第二编码压缩比。其中,预设复杂度可基于实际情况进行设置,本申请实施例对此不做具体限定。
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽,且场景的复杂度小于预设复杂度时,可以通过调高第一类视频帧的第一编码压缩比,以减少第一类视频帧对应的编码数据量,进而通过在短时间内牺牲终端设备解码出来的视频的画质的方式,保证关键信息的有效传输,同时调低第二类视频帧的第二编码压缩比,以增加第二类视频帧对应的编码数据量,从而可以快速的恢复终端设备解码出来的视频的画质,使得终端设备解码出来的视频的画质能够满足当前场景的需求,也能够保证无线图传的可靠性,极大的提高了用户体验。
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,而对于场景的复杂度大于或等于预设复杂度的情况,对终端设备解码出来的视频的画质要求较高,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,以使得第一类视频帧对应的编码数据量能够恢复初始状态,同时调高第二类视频帧的第二编码压缩比,可以在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质,使得终端 设备解码出来的视频的画质能够满足当前场景的画质需求。
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,虽然当前场景的画质要求较高,但由于信道带宽小于预设信道带宽,如果不减少或者提高第一类视频帧对应的编码数据量,会导致无线图传中断,因此,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,调高第一类视频帧的第一编码压缩比,以减少第一类视频帧对应的编码数据量,保证无线图传的可靠性,同时适当调高第二类视频帧的编码数据量,以减少第二类视频对应的编码数据量,可以在保证无线图传的可靠性的同时,使得终端设备解码出来的视频的画质能够满足当前场景的画质需求,提高用户体验。
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,且场景的复杂度小于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,以增加第一类视频帧对应的编码数据量,同时通过调低第二类视频的第二编码压缩比,以增加第二类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。
步骤S202、按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备。
在终端设备无法通过可移动平台传输的视频帧来解码时,终端设备需要向可移动平台发送第一类视频帧的生成请求,而当可移动平台接收到终端设备发送的第一类视频帧的生成请求后,按照调整后的第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将该第一视频帧传输至终端设备。
步骤S203、以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。
在调整第二编码压缩比和将第一视频帧发送给终端设备后,以第一视频帧为参考视频帧,按照调整后的第二编码压缩比对初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,以调整第二视频帧对应的编码数据量。其中,第一待编码视频帧和第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值,第二待编码视频帧可以根据第一视频帧的帧序号确定,例如,用第一视频帧的帧序号加1,得到待编码帧序号,并将与该待编码帧序号对应的初始 视频帧确定为第二待编码视频帧。预设帧序号差值可基于实际情况进行设置,本申请对此不做具体限定。
步骤S204、将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
在编码得到第二视频帧后,将第二视频帧传输至终端设备,终端设备接收可移动平台传输的第二视频帧,由于之前已经接收到第一视频帧,且第二视频帧是以第一视频帧为参考进行编码得到的,因此,终端设备以接收到第一视频帧为参考视频帧对第二视频帧进行解码,从而使得终端设备能够显示图像。
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,确定目标编码码率,并获取可移动平台的编码器的当前编码码率;基于目标编码码率与当前编码码率之间的差值,控制可移动平台中的PID码流控制器,将编码器的编码码率调整为目标编码码率。其中,PID码流控制器的码流控制系数包括比例控制系数(P系数)、积分控制系数(I系数)和微分控制系数(D系数)。通过PID码流控制器的比例控制系数(P系数)、积分控制系数(I系数)和微分控制系数(D系数)可以基于目标编码码率与当前编码码率之间的差值,快速平滑的将编码器的编码码率调整为目标编码码率,可以避免编码码率的突变和抖动给无线图传带来的影响。
在一实施例中,根据无线信道的信道带宽,确定目标编码码率的方式可以为:获取信道带宽与编码码率之间的映射关系表;根据该映射关系表和无线信道的信道带宽,确定目标编码码率。其中,信道带宽与编码码率之间的映射关系表可基于实际情况进行设置,本申请实施例对此不做具体限定。
在一实施例中,获取终端设备反馈的终端设备当前接收到的视频帧的第一帧序号,并获取可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;根据第一帧序号与所述第二帧序号之间的帧序号差值,估计无线信道的堆积数据量;在堆积数据量大于预设数据量时,降低可移动平台的编码器的编码码率,而在堆积数据量小于或等于预设数据量时,不做处理。其中,预设数据量可基于实际情况进行设置,本申请实施例对此不做具体限定。通过在无线信道的堆积数据量大于预设数据量时,降低可移动平台的编码器的编码码率,以减少编码得到的视频帧的编码数据量,降低无线信道的负荷。
在一实施例中,降低可移动平台的编码器的编码码率的方式可以为:根据堆积数据量,确定码率增益值;根据该码率增益值,降低可移动平台的编码器的编码码率,即用可移动平台的编码器的当前编码码率减去该码率增益值,以 降低可移动平台的编码器的编码码率。其中,可移动平台的存储器中存储有堆积数据量与码率增益值之间的映射关系,堆积数据量越大,则码率增益值越大,堆积数据量越小,则码率增益值越小,通过该映射关系和堆积数据量可以快速的确定码率增益值,堆积数据量与码率增益值之间的映射关系可基于实际情况进行设置,本申请实施例对此不做具体限定。
在一实施例中,也可以按照预设比例,降低可移动平台的编码器的编码码率。例如,预设比例为50%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-50%),又例如,预设比例为30%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-30%),再例如,预设比例为25%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-25%)。
在一实施例中,根据第一帧序号与第二帧序号之间的帧序号差值,估计无线信道的堆积数据量的方式可以为:根据编码器的当前编码码率,确定视频帧的单位数据量;根据单位数据量以及第一帧序号与第二帧序号之间的帧序号差值,估计无线信道的堆积数据量,即确定单位数据量与该帧序号差值的乘积,并将单位数据量与该帧序号差值的乘积确定为无线信道的堆积数据量。其中,可移动平台的存储器中存储有编码码率与单位数据量之间的映射关系,通过该映射关系和编码器的当前编码码率,可以确定视频帧的单位数据量。
在一实施例中,获取编码影响参数,其中,该编码影响参数包括无线信道的信道带宽、可移动平台的当前***功耗、可移动平台所处环境的复杂度和/或终端设备的解码能力;根据该编码影响参数,调整可移动平台的编码器的编码模式和视频规格。通过编码影响参数自适应调整可移动平台的编码器的编码模式和视频规格,提高可移动平台的续航能力、保证无线图传的传输可靠性和普适性。
其中,视频规格包括第一视频规格和第二视频规格,第一视频规格包括Fullsize,第二视频规格包括2xbinning,编码模式包括第一编码模式和第二编码模式,第一编码模式的编码效率大于第二编码模式的编码效率,编码模式还包括第三编码模式,第一编码模式包括高效率视频编码(High Efficiency Video Coding,HEVC),即H.265/HEVC,第二编码模式包括高级视频编码(Advanced Video Coding,AVC),即H.264/AVC,第三编码模式包括H.266/VVC。在保证同等画质下,H.265/HEVC相较于H.264/AVC的编码压缩比更高,编码数据量更少。
示例性的,若终端设备的解码能力为终端设备仅支持H.264/AVC、H.265/HEVC,则将可移动平台的编码器的编码模式调整为H.264/AVC或H.265/HEVC,并将可移动平台的编码器的视频规格调整为Fullsize和2xbinning中的任一项。通过终端设备的解码能力,自适应调整可移动平台的编码器的编码模式和视频规格,可以提高无线图传的普适性。
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning);若可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC)和第二编码模式(H.264/AVC)中的任一项,并将编码器的视频规格调整为第一视频规格(Fullsize)和第二视频规格(2xbinning)中的任一项。通过无线信道的信道带宽,自适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性和画质需求。
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,且可移动平台的当前***功耗小于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第一视频规格(Fullsize);若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,且可移动平台的当前***功耗大于或等于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning)。通过无线信道的信道带宽和可移动平台的***功耗,自适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性、画质需求和可移动平台的续航时间。
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台的当前***功耗小于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第一视频规格(Fullsize);若可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台的当前***功耗大于或等于预设功耗,将可移动平台的编码器的编码模式调整为第二编码模式(H.264/AVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning)。通过无线信道的信道带宽和可移动平台的***功耗,自 适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性、画质需求和可移动平台的续航时间。
可以理解的是,还可以通过可移动平台所处环境的复杂度自适应调整可移动平台的编码器的编码模式和视频规格,可以提高无线图传的普适性;还可以通过可移动平台当前***功耗自适应调整可移动平台的编码器的编码模式和视频规格,可以提高可移动平台的续航时间;还可以通过可移动平台所处环境的复杂度和信道带宽,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求和使用场景;还可以通过信道带宽、可移动平台的当前***功耗和可移动平台所处环境的复杂度,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求、使用场景和可移动平台的续航时间;还可以信道带宽、可移动平台的当前***功耗、可移动平台所处环境的复杂度和终端设备的解码能力,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求、使用场景和可移动平台的续航时间。
上述实施例提供的视频传输方法,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,按照调整后的第二编码压缩比对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。
请参阅图6,图6是本申请实施例提供的一种视频传输装置的结构示意性框图。
如图6所示,该视频传输装置300包括处理器301和存储器302,处理器301和存储器302通过总线303连接,该总线303比如为I2C(Inter-integrated Circuit)总线。视频传输装置300应用于可移动平台,可移动平台包括拍摄装置,拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备。
具体地,处理器301可以是微控制单元(Micro-controller Unit,MCU)、中 央处理单元(Central Processing Unit,CPU)或数字信号处理器(Digital Signal Processor,DSP)等。
具体地,存储器302可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。
其中,所述处理器301用于运行存储在存储器302中的计算机程序,并在执行所述计算机程序时实现如下步骤:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
在一实施例中,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:
在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;
或者
在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。
在一实施例中,所述根据所述信道带宽,调高所述第一编码压缩比,包括:
获取与所述信道带宽对应的压缩比增益值;
根据所述压缩比增益值,调高所述第一编码压缩比。
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:
获取所述可移动平台所处环境的复杂度;
根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。
在一实施例中,所述可移动平台所处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。
在一实施例中,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:
在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;
或者
在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;
所述以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,包括:
以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。
在一实施例中,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。
在一实施例中,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:
在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;
或者
在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:
获取所述可移动平台所处环境的复杂度;
根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。
在一实施例中,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:
在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;
或者
在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
在一实施例中,所述处理器还用于实现以下步骤:
根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;
基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。
在一实施例中,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:
获取信道带宽与编码码率之间的映射关系表;
根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。
在一实施例中,所述处理器还用于实现以下步骤:
获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;
根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;
在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。
在一实施例中,所述降低所述可移动平台的编码器的编码码率,包括:
根据所述堆积数据量,确定码率增益值;
根据所述码率增益值,降低所述可移动平台的编码器的编码码率。
在一实施例中,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:
根据所述编码器的当前编码码率,确定视频帧的单位数据量;
根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。
在一实施例中,所述处理器还用于实现以下步骤:
获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前***功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解 码能力;
根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。
在一实施例中,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二编码模式的编码效率。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的视频传输装置的具体工作过程,可以参考前述视频传输方法实施例中的对应过程,在此不再赘述。
请参阅图7,图7是本申请实施例提供的一种可移动平台的结构示意性框图。
如图7所示,可移动平台400包括平台本体410、动力***420、拍摄装置430和视频传输装置440,动力***420、拍摄装置430和视频传输装置440设于平台本体410,动力***420用于为可移动平台400提供移动动力,拍摄装置430用于初始视频帧,视频传输装置440用于对拍摄装置430拍摄到的初始视频帧进行编码以及用于将编码后的初始视频帧传输至终端设备,视频传输装置440还用于控制可移动平台移动。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的可移动平台的具体工作过程,可以参考前述视频传输方法实施例中的对应过程,在此不再赘述。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现上述实施例提供的视频传输方法的步骤。
其中,所述计算机可读存储介质可以是前述任一实施例所述的可移动平台的内部存储单元,例如所述可移动平台的硬盘或内存。所述计算机可读存储介质也可以是所述可移动平台的外部存储设备,例如所述可移动平台上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是 指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (42)
- 一种视频传输方法,其特征在于,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备,所述方法包括:根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
- 根据权利要求1所述的视频传输方法,其特征在于,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。
- 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。
- 根据权利要求3所述的视频传输方法,其特征在于,所述根据所述信道带宽,调高所述第一编码压缩比,包括:获取与所述信道带宽对应的压缩比增益值;根据所述压缩比增益值,调高所述第一编码压缩比。
- 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:获取所述可移动平台所处环境的复杂度;根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。
- 根据权利要求5所述的视频传输方法,其特征在于,所述可移动平台所 处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。
- 根据权利要求5所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。
- 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;所述以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,包括:以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。
- 根据权利要求8所述的视频传输方法,其特征在于,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。
- 根据权利要求8所述的视频传输方法,其特征在于,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。
- 根据权利要求8所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
- 根据权利要求8所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:获取所述可移动平台所处环境的复杂度;根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。
- 根据权利要求12所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
- 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。
- 根据权利要求14所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:获取信道带宽与编码码率之间的映射关系表;根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。
- 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。
- 根据权利要求16所述的视频传输方法,其特征在于,所述降低所述可移动平台的编码器的编码码率,包括:根据所述堆积数据量,确定码率增益值;根据所述码率增益值,降低所述可移动平台的编码器的编码码率。
- 根据权利要求16所述的视频传输方法,其特征在于,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:根据所述编码器的当前编码码率,确定视频帧的单位数据量;根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。
- 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前***功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解码能力;根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。
- 根据权利要求19所述的视频传输方法,其特征在于,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二编码模式的编码效率。
- 一种视频传输装置,其特征在于,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备;所述视频传输装置包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。
- 根据权利要求21所述的视频传输装置,其特征在于,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。
- 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。
- 根据权利要求23所述的视频传输装置,其特征在于,所述根据所述信道带宽,调高所述第一编码压缩比,包括:获取与所述信道带宽对应的压缩比增益值;根据所述压缩比增益值,调高所述第一编码压缩比。
- 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:获取所述可移动平台所处环境的复杂度;根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。
- 根据权利要求25所述的视频传输装置,其特征在于,所述可移动平台所处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。
- 根据权利要求25所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。
- 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;所述以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,包括:以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所 述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。
- 根据权利要求28所述的视频传输装置,其特征在于,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。
- 根据权利要求28所述的视频传输装置,其特征在于,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。
- 根据权利要求28所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
- 根据权利要求28所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:获取所述可移动平台所处环境的复杂度;根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。
- 根据权利要求32所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;或者在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。
- 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动 平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。
- 根据权利要求34所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:获取信道带宽与编码码率之间的映射关系表;根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。
- 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。
- 根据权利要求36所述的视频传输装置,其特征在于,所述降低所述可移动平台的编码器的编码码率,包括:根据所述堆积数据量,确定码率增益值;根据所述码率增益值,降低所述可移动平台的编码器的编码码率。
- 根据权利要求36所述的视频传输装置,其特征在于,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:根据所述编码器的当前编码码率,确定视频帧的单位数据量;根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。
- 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前***功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解码能力;根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。
- 根据权利要求39所述的视频传输装置,其特征在于,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二 编码模式的编码效率。
- 一种可移动平台,其特征在于,包括:平台本体;动力***,设于所述平台本体上,用于为所述可移动平台提供移动动力;拍摄装置,设于所述平台本体上,用于拍摄初始视频帧;如权利要求21-40中任一项所述的视频传输装置,设于所述平台本体内,用于对所述拍摄装置拍摄到的初始视频帧进行编码以及用于将编码后的初始视频帧传输至终端设备。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-20中任一项所述的视频传输方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/125999 WO2022088200A1 (zh) | 2020-11-02 | 2020-11-02 | 视频传输方法、装置、可移动平台及计算机可读存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/125999 WO2022088200A1 (zh) | 2020-11-02 | 2020-11-02 | 视频传输方法、装置、可移动平台及计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022088200A1 true WO2022088200A1 (zh) | 2022-05-05 |
Family
ID=81381704
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/125999 WO2022088200A1 (zh) | 2020-11-02 | 2020-11-02 | 视频传输方法、装置、可移动平台及计算机可读存储介质 |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2022088200A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115474077A (zh) * | 2022-09-06 | 2022-12-13 | 一汽解放汽车有限公司 | 视频传输方法、装置、车端控制器和存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6014694A (en) * | 1997-06-26 | 2000-01-11 | Citrix Systems, Inc. | System for adaptive video/audio transport over a network |
CN101076952A (zh) * | 2004-10-12 | 2007-11-21 | 液滴技术有限公司 | 移动成像应用、装置结构、和服务平台结构 |
CN104349142A (zh) * | 2014-11-03 | 2015-02-11 | 南京航空航天大学 | 一种基于分层表达的无人机视频自适应传输方法 |
CN105657433A (zh) * | 2015-12-30 | 2016-06-08 | 航天恒星科技有限公司 | 一种基于图像复杂度的信源实时编码方法及*** |
CN108012163A (zh) * | 2017-12-19 | 2018-05-08 | 希诺麦田技术(深圳)有限公司 | 视频编码的码率控制方法及装置 |
-
2020
- 2020-11-02 WO PCT/CN2020/125999 patent/WO2022088200A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6014694A (en) * | 1997-06-26 | 2000-01-11 | Citrix Systems, Inc. | System for adaptive video/audio transport over a network |
CN101076952A (zh) * | 2004-10-12 | 2007-11-21 | 液滴技术有限公司 | 移动成像应用、装置结构、和服务平台结构 |
CN104349142A (zh) * | 2014-11-03 | 2015-02-11 | 南京航空航天大学 | 一种基于分层表达的无人机视频自适应传输方法 |
CN105657433A (zh) * | 2015-12-30 | 2016-06-08 | 航天恒星科技有限公司 | 一种基于图像复杂度的信源实时编码方法及*** |
CN108012163A (zh) * | 2017-12-19 | 2018-05-08 | 希诺麦田技术(深圳)有限公司 | 视频编码的码率控制方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115474077A (zh) * | 2022-09-06 | 2022-12-13 | 一汽解放汽车有限公司 | 视频传输方法、装置、车端控制器和存储介质 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210329177A1 (en) | Systems and methods for video processing and display | |
US10827176B2 (en) | Systems and methods for spatially adaptive video encoding | |
US10212438B2 (en) | Apparatus and methods for video compression using multi-resolution scalable coding | |
US11132773B2 (en) | Temporal smoothing in image capture systems | |
US20200244970A1 (en) | Video processing method, device, aerial vehicle, system, and storage medium | |
US20170103577A1 (en) | Method and apparatus for optimizing video streaming for virtual reality | |
WO2019205831A1 (zh) | 视频编码方法、装置、存储介质及设备 | |
WO2020057609A1 (zh) | 图像传输方法、装置、图像发送端及飞行器图传*** | |
WO2018103034A1 (zh) | 用于传输图像的方法、设备和无人机 | |
KR20190055101A (ko) | 전방향성 비디오를 인코딩하고 디코딩하기 위한 방법 및 장치 | |
WO2018090258A1 (zh) | 一种图像处理方法、装置及*** | |
WO2022088200A1 (zh) | 视频传输方法、装置、可移动平台及计算机可读存储介质 | |
CN105163079A (zh) | 智能拍照***及其方法 | |
US20190191147A1 (en) | Distortion of video for seek in 360 degree video | |
KR20160068657A (ko) | 실시간 인코딩을 위한 방법 및 디바이스 | |
US10536715B1 (en) | Motion estimation through the use of on-camera sensor information | |
WO2022000350A1 (zh) | 视频传输方法、可移动平台、终端设备、***及存储介质 | |
WO2023273535A1 (zh) | 视频码流的处理方法、介质、程序产品和电子设备 | |
WO2021249562A1 (zh) | 一种信息传输方法、相关设备及*** | |
CN115668953A (zh) | 使用边缘计算服务的图像内容传输方法和设备 | |
WO2022217557A1 (zh) | 可移动平台的图像传输方法、可移动平台及可读存储介质 | |
WO2022141316A1 (zh) | 图像传输方法、可移动平台、设备、***及可读存储介质 | |
WO2022174431A1 (zh) | 图像传输方法、可移动平台、设备及计算机可读存储介质 | |
WO2022204997A1 (zh) | 无线通信方法、可移动平台、***及计算机可读存储介质 | |
US20240089436A1 (en) | Dynamic Quantization Parameter for Encoding a Video Frame |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20959360 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20959360 Country of ref document: EP Kind code of ref document: A1 |