WO2022088200A1 - Video transmission method and apparatus, and mobile platform and computer-readable storage medium - Google Patents

Video transmission method and apparatus, and mobile platform and computer-readable storage medium Download PDF

Info

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
Application number
PCT/CN2020/125999
Other languages
French (fr)
Chinese (zh)
Inventor
王星
冯颖臻
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/125999 priority Critical patent/WO2022088200A1/en
Publication of WO2022088200A1 publication Critical patent/WO2022088200A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

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

A video transmission method and apparatus, and a mobile platform and a computer-readable storage medium. The method comprises: adjusting a first coding compression ratio of a first type of video frames (S101); performing, according to the adjusted first coding compression ratio, coding on a first video frame to be coded, so as to obtain a first video frame (S102); performing, on the basis of the first video frame, coding on a second video frame to be coded, so as to obtain a second video frame (S103); and transmitting the second video frame to a terminal device, such that the terminal device performs decoding on the second video frame on the basis of the first video frame (S104). The present application can ensure the reliability of wireless image transmission.

Description

视频传输方法、装置、可移动平台及计算机可读存储介质Video transmission method, device, removable platform, and computer-readable storage medium 技术领域technical field
本申请涉及无线图传技术领域,尤其涉及一种视频传输方法、装置、可移动平台及计算机可读存储介质。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.
背景技术Background technique
目前,可移动平台可以通过无线通信的方式将拍摄得到的视频传输至终端设备,由终端设备显示接收到的视频。在传输视频的过程中,可移动平台与终端设备之间的无线信道的信道质量会随着可移动平台与终端设备之间的距离的变化而发生变化,尤其是可移动平台与终端设备之间的距离较远时,无线信道的信道质量较差,会导致传输的视频画质下降或者传输卡顿的问题,无法保证无线图传的可靠性和视频画质,用户体验不好。At present, the movable platform can transmit the captured video to the terminal device through wireless communication, and the terminal device displays the received video. In the process of video transmission, 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. When the distance is long, 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.
发明内容SUMMARY OF THE INVENTION
基于此,本申请实施例提供了一种视频传输方法、装置、可移动平台及计算机可读存储介质,旨在解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。Based on this, 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.
第一方面,本申请实施例提供了一种视频传输方法,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备,所述方法包括:In the first aspect, 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:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;adjusting the first coding compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;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 device;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;Taking 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;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
第二方面,本申请实施例还提供了一种视频传输装置,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能 够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备;In a second aspect, 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:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;adjusting the first coding compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;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 device;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;Taking 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;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
第三方面,本申请实施例还提供了一种可移动平台,包括:In a third aspect, the embodiments of the present application also provide a movable platform, including:
平台本体;Platform ontology;
动力系统,设于所述平台本体上,用于为所述可移动平台提供移动动力;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.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上所述的视频传输方法的步骤。In a fourth aspect, 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 Taking the first video frame as a reference video frame, 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 video transmission are guaranteed.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的, 并不能限制本申请。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not limiting of the present application.
附图说明Description of drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. For those of ordinary skill, other drawings can also be obtained from these drawings without any creative effort.
图1是实施本申请实施例提供的视频传输方法的一场景示意图;FIG. 1 is a schematic diagram of a scene for implementing the video transmission method provided by the embodiment of the present application;
图2是本申请实施例提供的一种视频传输方法的步骤示意流程图;2 is a schematic flowchart of steps of a video transmission method provided by an embodiment of the present application;
图3是图2中的视频传输方法的子步骤示意流程图;Fig. 3 is the sub-step schematic flow chart of the video transmission method in Fig. 2;
图4是本申请实施例提供的另一种视频传输方法的步骤示意流程图;4 is a schematic flowchart of steps of another video transmission method provided by an embodiment of the present application;
图5是图4中的视频传输方法的子步骤示意流程图;Fig. 5 is the sub-step schematic flow chart of the video transmission method in Fig. 4;
图6是本申请实施例提供的一种视频传输装置的结构示意性框图;6 is a schematic block diagram of the structure of a video transmission apparatus provided by an embodiment of the present application;
图7是本申请实施例提供的一种可移动平台的结构示意性框图。FIG. 7 is a schematic structural block diagram of a movable platform provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the figures are for illustration only, and do not necessarily include all contents and operations/steps, nor do they have to be performed in the order described. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to the actual situation.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and features in the embodiments may be combined with each other without conflict.
目前,可移动平台可以通过无线通信的方式将拍摄得到的视频传输至终端设备,由终端设备显示接收到的视频。在传输视频的过程中,可移动平台与终端设备之间的无线信道的信道质量会随着可移动平台与终端设备之间的距离的变化而发生变化,尤其是可移动平台与终端设备之间的距离较远时,无线信道的信道质量较差,会导致传输的视频画质下降或者传输卡顿的问题,无法保证无线图传的可靠性和视频画质,用户体验不好。At present, the movable platform can transmit the captured video to the terminal device through wireless communication, and the terminal device displays the received video. In the process of video transmission, 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. When the distance is long, 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.
为解决上述问题,本申请实施例提供了一种视频传输方法、装置、可移动 平台及计算机可读存储介质,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。In order to solve the above problems, 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 quality is degraded or the transmission is stuck, and ensure the reliability and video quality of wireless image transmission.
请参阅图1,图1是实施本申请实施例提供的视频传输方法的一场景示意图,如图1所示,该场景包括可移动平台100和终端设备200,可移动平台100包括平台本体110、设于平台本体110上的动力系统120、设于平台本体上的拍摄装置130和设于平台本体内的第一无线通信装置(图1中未示出),终端设备200包括显示装置210和第二无线通信装置(图1中未示出),通过无人机100内的第一无线通信装置可以与终端设备200内的第二无线通信装置通信,从而建立无人机100与终端设备200的之间的无线信道,使得拍摄装置130拍摄的初始视频帧经过编码后能够通过可移动平台100与终端设备200之间的无线信道传输至终端设备200。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a scenario for implementing the video transmission method provided by the embodiment of the present application. As shown in FIG. 1, 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. 1 ), through which the first wireless communication device in the drone 100 can communicate with the second wireless communication device in the terminal device 200 , thereby establishing the communication between the drone 100 and the terminal device 200 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.
其中,终端设备200通过显示装置210显示可移动平台100传输的编码后的视频帧,以供用户观看。需要说明的是,显示装置210包括设置在终端设备200上的显示屏或者独立于终端设备200的显示器,独立于终端设备200的显示器可以包括手机、平板电脑或者个人电脑等,或者也可以是带有显示屏的其他电子设备。其中,该显示屏包括LED显示屏、OLED显示屏、LCD显示屏等等。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. It should be noted that 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. Among them, the display screen includes an LED display screen, an OLED display screen, an LCD display screen, and the like.
在一实施例中,可移动平台100还可以包括设于平台本体110上的云台140,云台140用于搭载拍摄装置130,云台140包括三轴电机,分别为平移轴电机、俯仰轴电机和横滚轴电机,用于调整搭载于云台420上的拍摄装置130的平衡姿态,以便随时随地拍摄出高精度的稳定画面。In one embodiment, 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.
在一实施例中,可移动平台100还可以包括传感系统,传感系统可以包括一个或者多个传感器,以感测,可移动平台100的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)、角加速度、姿态、位置(绝对位置或者相对位置)等。所述一个或者多个传感器包括GPS传感器、运动传感器、 惯性传感器、近程传感器或者影像传感器。可选的,传感系统还可以用于采集,可移动平台100所处的环境数据,如气候条件、要接近的潜在的障碍、地理特征的位置、人造结构的位置等。In one embodiment, 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. Optionally, 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.
其中,动力系统120用于为可移动平台100提供移动动力,水平方向的动力系统120中的一个或者多个可以顺时针方向旋转,而水平方向的动力系统120中的其它一个或者多个可以逆时针方向旋转。例如,顺时针旋转的动力系统120与逆时针旋转的动力系统120的数量一样。每一个水平方向的动力系统120的旋转速率可以独立变化,以实现每个动力系统120导致的提升及/或推动操作,从而调整可移动平台100的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)。Wherein, 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).
在一实施例中,终端设备100包括遥控器、地面控制平台、手机、平板电脑、笔记本电脑和PC电脑等。可移动平台可以是手持移动设备,也可以是具备动力系统,并依靠动力系统提供的动力移动的设备。例如,可移动平台包括无人机、无人船和无人车等。因此,动力系统120能够使无人机垂直地从地面起飞,或者垂直地降落在地面上,而不需要无人机任何水平运动(如不需要在跑道上滑行)。可选的,动力系统120可以允许无人机在空中预设位置和/或方向盘旋。一个或者多个动力系统120在受到控制时可以独立于其它的动力系统120。可选的,一个或者多个动力系统120可以同时受到控制。例如,无人机可以有多个水平方向的动力系统120,以追踪目标的提升及/或推动。水平方向的动力系统120可以被致动以提供无人机垂直起飞、垂直降落、盘旋的能力。In one embodiment, 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 . Alternatively, one or more power systems 120 may be controlled simultaneously. For example, 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.
在一实施例中,可移动平台100还包括视频传输装置(图1中未示出),通过视频传输装置可以根据所述可移动平台100与终端设备200之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;按照调整后的第一编码压缩比对拍摄装置130拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备;以第一视频帧为参考视频帧,对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;将第二视频帧传输至所述终端设备,以供终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码,使得可移动平台100能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。In one embodiment, 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 of the transmitted video quality or the transmission freeze, and to ensure the reliability and video quality of the wireless image transmission.
以下,将结合图1中的场景对本申请的实施例提供的视频传输方法进行详细介绍。需知,图1中的场景仅用于解释本申请实施例提供的视频传输方法, 但并不构成对本申请实施例提供的视频传输方法应用场景的限定。Hereinafter, 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 . It should be noted that 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.
请参阅图2,图2是本申请实施例提供的一种视频传输方法的步骤示意流程图。应用于可移动平台,用于解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。Please refer to FIG. 2. 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.
如图2所示,该视频传输方法包括步骤S101至步骤S104。As shown in FIG. 2, the video transmission method includes steps S101 to S104.
步骤S101、根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比。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.
其中,可移动平台包括拍摄装置,该拍摄装置可以搭载在可移动平台的云台上,也可以与可移动平台一体化设置,通过该拍摄装置可以对可移动平台所处环境进行拍摄,得到初始视频帧,该拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备,对初始视频帧进行编码,可以得到第一类视频帧或者第二类视频帧,第一类视频帧包括I帧,第二类视频帧包括P帧。其中,该初始视频帧可以为单个的视频帧,也可以为由多个视频帧组成的帧序列,本申请实施例对此不做具体限定。Wherein, 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. 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. For video frames, the first type of video frames includes I frames, and 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.
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽时,根据可移动平台与终端设备之间的无线信道的信道带宽,调高第一类视频帧的第一编码压缩比;或者在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,根据可移动平台与终端设备之间的无线信道的信道带宽,调低第一类视频帧的第一编码压缩比。其中,预设信道带宽和预设编码压缩比可基于实际情况进行设置,本申请实施例对此不做具体限定。In an embodiment, according to the channel bandwidth of the wireless channel between the movable platform and the terminal device, 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.
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽时,通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,从而减少第一类视频帧对应的编码数据量,保证无线图传的可靠性。When the distance between the mobile platform and the terminal device is long, 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. When 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.
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的 第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。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. 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 first encoding and compression ratio is greater than the preset encoding and compression ratio, 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.
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调高或调低第一类视频帧的第一编码压缩比的方式可以为:获取与该信道带宽对应的压缩比增益值;根据该压缩比增益值,调高或调低第一类视频帧的第一编码压缩比,即用第一编码压缩比加上该压缩比增益值,以调高第一编码压缩比,或者用第一编码压缩比减去该压缩比增益值,以调低第一编码压缩比。其中,可移动平台的存储器中存储有信道带宽与压缩比增益值之间的映射关系,通过该映射关系,可以准确的获取与该信道带宽对应的压缩比增益值,信道带宽与压缩比增益值之间的映射关系可基于实际情况进行设置,本申请实施例对此不做具体限定。In an embodiment, according to the channel bandwidth of the wireless channel between the mobile platform and the terminal device, 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. Among them, 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.
在一实施例中,如图3所示,步骤S101具体包括:子步骤S1011至S1012。In an embodiment, as shown in FIG. 3 , step S101 specifically includes: sub-steps S1011 to S1012.
子步骤S1011、获取所述可移动平台所处环境的复杂度;Sub-step S1011, obtaining the complexity of the environment where the movable platform is located;
子步骤S1012、根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。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.
其中,可移动平台所处环境的复杂度是根据可移动平台的拍摄装置采集到的图像或视频确定的,可移动平台所处环境的复杂度可以为拍摄装置采集到的图像或视频的空间复杂度和/或时间复杂度,例如,获取拍摄装置拍摄到的初始视频帧,并对该初始视频帧进行Sobel滤波,然后计算滤波后的初始视频帧中的每个像素的标准差或方差,并根据滤波后的初始视频帧中的每个像素的标准差或方差,确定可移动平台所处环境的复杂度。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.
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽和可移动平台所处环境的复杂度,调整第一类视频帧的第一编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且可移动平台所处环境的复杂度小于预设复杂度时,调高第一编码压缩比;或者,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台所处环境的复杂度大于或等于预设复杂度时,调低第一编 码压缩比。其中,预设复杂度可基于实际情况进行设置,本申请实施例对此不做具体限定。In an embodiment, according to the channel bandwidth of the wireless channel between the movable platform and the terminal device and the complexity of the environment where the movable platform is located, 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.
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽,且场景的复杂度小于预设复杂度时,可以通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,以减少第一类视频帧对应的编码数据量,由于对于场景的复杂度小于预设复杂度的情况,对终端设备解码出来的视频的画质要求较低,因此虽然减少了第一类视频帧对应的编码数据量,降低了终端设备解码出来的视频的画质,但能够满足当前场景的需求,也能够保证无线图传的可靠性,极大的提高了用户体验。When the distance between the mobile platform and the terminal device is long, 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. When 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. frame to reduce the amount of encoded data corresponding to the first type of video frame. Since the complexity of the scene is less than the preset complexity, the quality requirements of the video decoded by the terminal device are lower, so although the first type of video frame is reduced. 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.
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,而对于场景的复杂度大于或等于预设复杂度的情况,对终端设备解码出来的视频的画质要求较高,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质,使得终端设备解码出来的视频的画质能够满足当前场景的画质需求。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. When 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. And when 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 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.
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,虽然当前场景的画质要求较高,但由于信道带宽小于预设信道带宽,如果不减少第一类视频帧对应的编码数据量,会导致无线图传中断,因此,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,以减少第一类视频帧对应的编码数据量,保证无线图传的可靠性。In one embodiment, when 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.
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,且场景的复杂度小于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。In an embodiment, when the channel bandwidth of the wireless channel between the movable platform and the terminal device is greater than the preset channel bandwidth, and the complexity of the scene is less than the preset complexity, 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.
步骤S102、按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备。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.
在终端设备无法通过可移动平台传输的视频帧来解码时,终端设备需要向可移动平台发送第一类视频帧的生成请求,而当可移动平台接收到终端设备发送的第一类视频帧的生成请求后,按照调整后的第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将该第一视频帧传输至终端设备。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.
其中,该第一类视频帧的生成请求携带有目标帧序号,该目标帧序号包括终端设备解码视频时需要参考的视频帧的帧序号或者终端设备当前解码的视频帧的帧序号,通过目标帧序号可以确定初始视频帧中的第一待编码视频帧,例如,若目标帧序号为终端设备解码视频时需要参考的视频帧的帧序号,则将与该目标帧序号对应的初始视频帧确定为第一待编码视频帧,而若目标帧序号为终端设备当前解码的视频帧的帧序号,则用目标帧序号减1,得到参考帧序号,并将与该参考帧序号对应的初始视频帧确定为第一待编码视频帧。Wherein, the generation request of the first type of video frame carries the target frame sequence number, and 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. For example, if 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, then the initial video frame corresponding to the target frame sequence number is determined as The first video frame to be encoded, and if 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.
步骤S103、以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。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.
在将第一视频帧发送给终端设备后,以第一视频帧为参考视频帧,对初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。其中,第一待编码视频帧和第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值,第二待编码视频帧可以根据第一视频帧的帧序号确定,例如,用第一视频帧的帧序号加1,得到待编码帧序号,并将与该待编码帧序号对应的初始视频帧确定为第二待编码视频帧。预设帧序号差值可基于实际情况进行设置,本申请对此不做具体限定。After the first video frame is sent to the terminal device, 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. Wherein, 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, and 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.
步骤S104、将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
在编码得到第二视频帧后,将第二视频帧传输至终端设备,终端设备接收 可移动平台传输的第二视频帧,由于之前已经接收到第一视频帧,且第二视频帧是以第一视频帧为参考进行编码得到的,因此,终端设备以接收到第一视频帧为参考视频帧对第二视频帧进行解码,从而使得终端设备能够显示图像。After the second video frame is obtained by encoding, 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.
请参阅图4,图4是本申请实施例提供的另一种视频传输方法的步骤示意流程图。Please refer to FIG. 4. FIG. 4 is a schematic flowchart of steps of another video transmission method provided by an embodiment of the present application.
如图4所示,该视频传输方法包括步骤S201至S204。As shown in FIG. 4 , the video transmission method includes steps S201 to S204.
步骤S201、根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比。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.
其中,可移动平台包括拍摄装置,该拍摄装置可以搭载在可移动平台的云台上,也可以与可移动平台一体化设置,通过该拍摄装置可以对可移动平台所处环境进行拍摄,得到初始视频帧,该拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备。第一类视频帧对应的编码数据量大于第二类视频帧对应的编码数据量,第一类视频帧包括I帧,第二类视频帧包括P帧。Wherein, 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. 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, and the second type of video frame includes P frames.
可以理解的是,根据无线信道的信道带宽,可以同时调低第一编码压缩比和第二编码压缩比,也可以同时调高第一编码压缩比和第二编码压缩比,也可以调高第一编码压缩比,而调低第二编码压缩比,还可以调低第一编码压缩比,而调高第二编码压缩比,本申请实施例对此不做具体限定。It can be understood that, according to the channel bandwidth of the wireless channel, 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. One encoding compression ratio, and the second encoding compression ratio is lowered, the first encoding compression ratio may also be lowered, and the second encoding compression ratio is increased, which is not specifically limited in this embodiment of the present application.
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比的方式可以为:在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽时,调高第一类视频帧的第一编码压缩比,并调低第二类视频帧的第二编码压缩比;或者,在可移动平台与终端设备之间的无线信道的信道带宽大于或等 于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,调低第一类视频帧的第一编码压缩比,并调高第二类视频帧的第二编码压缩比。其中,预设信道带宽和预设编码压缩比可基于实际情况进行设置,本申请实施例对此不做具体限定。In one embodiment, according to the channel bandwidth of the wireless channel between the mobile platform and the terminal device, 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.
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽时,通过调高第一类视频帧的第一编码压缩比,使得后续通过调高的第一编码压缩比编码生成第一类视频帧,从而减少第一类视频帧对应的编码数据量,保证无线图传的可靠性,此外,通过调低第二类视频帧的第二编码压缩比,使得后续通过调低的第二编码压缩比编码生成第二类视频帧,从而增加第二类视频帧对应的编码数据量,可以快速的恢复终端设备解码出来的视频的画质。When the distance between the mobile platform and the terminal device is long, 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. When 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. In addition, by reducing the second encoding and compression ratio of the second type of video frame, 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.
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且第一编码压缩比大于预设编码压缩比时,通过调低第一类视频帧的第一编码压缩比,使得后续通过调低的第一编码压缩比编码生成第一类视频帧,从而增加第一类视频帧对应的编码数据量,此外,通过调高第二类视频帧的第二编码压缩比,使得后续通过调高的第二编码压缩比编码生成第二类视频帧,从而减少第二类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。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. 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 first encoding and compression ratio is greater than the preset encoding and compression ratio, 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. In addition, by increasing the second encoding and compression ratio of the second 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.
在一实施例中,如图5所示,步骤S201可以包括:子步骤S2011至S2012。In an embodiment, as shown in FIG. 5 , step S201 may include: sub-steps S2011 to S2012.
子步骤S2011、获取所述可移动平台所处环境的复杂度;Sub-step S2011, acquiring the complexity of the environment where the movable platform is located;
子步骤S2012、根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。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.
可以理解的是,根据无线信道的信道带宽和复杂度,可以同时调低第一编码压缩比和第二编码压缩比,也可以同时调高第一编码压缩比和第二编码压缩比,也可以调高第一编码压缩比,而调低第二编码压缩比,还可以调低第一编码压缩比,而调高第二编码压缩比,本申请实施例对此不做具体限定。It can be understood that, according to the channel bandwidth and complexity of the wireless channel, 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 When the first encoding compression ratio is increased and the second encoding compression ratio is decreased, 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.
在一实施例中,根据无线信道的信道带宽和可移动平台所处环境的复杂度,调整第一编码压缩比和第二编码压缩比的方式可以为:在无线信道的信道带宽小于预设信道带宽,且可移动平台所处环境的复杂度小于预设复杂度时,调高第一编码压缩比,并调低第二编码压缩比;或者在无线信道的信道带宽大于或等于预设信道带宽,且可移动平台所处环境的复杂度大于或等于预设复杂度时,调低第一编码压缩比,并调高第二编码压缩比。其中,预设复杂度可基于实际情况进行设置,本申请实施例对此不做具体限定。In one embodiment, according to the channel bandwidth of the wireless channel and the complexity of the environment in which the mobile platform is located, 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.
由于在可移动平台与终端设备之间的距离较远时,无线信道的信道带宽较少,会容易出现终端设备向可移动平台请求编码生成第一类视频帧的情况,而第一类视频帧对应的编码数据量较多,在信道带宽低于预设信道带宽的情况下,通过无线信道传输编码数据量较多的第一类视频帧容易导致无线图传中断,因此,在信道带宽低于预设信道带宽,且场景的复杂度小于预设复杂度时,可以通过调高第一类视频帧的第一编码压缩比,以减少第一类视频帧对应的编码数据量,进而通过在短时间内牺牲终端设备解码出来的视频的画质的方式,保证关键信息的有效传输,同时调低第二类视频帧的第二编码压缩比,以增加第二类视频帧对应的编码数据量,从而可以快速的恢复终端设备解码出来的视频的画质,使得终端设备解码出来的视频的画质能够满足当前场景的需求,也能够保证无线图传的可靠性,极大的提高了用户体验。When the distance between the mobile platform and the terminal device is long, 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. When 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 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 method of sacrificing the image quality of the video decoded by the terminal device in time to ensure the effective transmission of key information, while reducing the second encoding compression ratio of the second type of video frame to increase the amount of encoded data corresponding to the second type of video frame, In this way, the image quality of the video decoded by the terminal device can be quickly restored, so that the image quality of the video decoded by the terminal device can meet the needs of the current scene, and can also ensure the reliability of wireless image transmission, which greatly improves the user experience.
而在降低第一类视频帧的第一编码压缩比后,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽时,如果继续按照降低后的第一编码压缩比编码生成第一类视频帧,虽然可以保证无线图传的可靠性,但减少了第一类视频帧对应的编码数据量,会影响终端设备解码出来的视频的画质,而对于场景的复杂度大于或等于预设复杂度的情况,对终端设备解码出来的视频的画质要求较高,因此,在可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,以使得第一类视频帧对应的编码数据量能够恢复初始状态,同时调高第二类视频帧的第二编码压缩比,可以在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质,使得终端 设备解码出来的视频的画质能够满足当前场景的画质需求。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. When 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. And when 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 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.
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,虽然当前场景的画质要求较高,但由于信道带宽小于预设信道带宽,如果不减少或者提高第一类视频帧对应的编码数据量,会导致无线图传中断,因此,在可移动平台与终端设备之间的无线信道的信道带宽小于预设信道带宽,且场景的复杂度大于或等于预设复杂度时,调高第一类视频帧的第一编码压缩比,以减少第一类视频帧对应的编码数据量,保证无线图传的可靠性,同时适当调高第二类视频帧的编码数据量,以减少第二类视频对应的编码数据量,可以在保证无线图传的可靠性的同时,使得终端设备解码出来的视频的画质能够满足当前场景的画质需求,提高用户体验。In one embodiment, when 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. Therefore, 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.
在一实施例中,在可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,且场景的复杂度小于预设复杂度时,通过调低第一类视频帧的第一编码压缩比,以增加第一类视频帧对应的编码数据量,同时通过调低第二类视频的第二编码压缩比,以增加第二类视频帧对应的编码数据量,能够在保证无线图传的可靠性的同时,提高终端设备解码出来的视频的画质。In an embodiment, when the channel bandwidth of the wireless channel between the movable platform and the terminal device is greater than the preset channel bandwidth, and the complexity of the scene is less than the preset complexity, 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. At the same time, 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.
步骤S202、按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备。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.
在终端设备无法通过可移动平台传输的视频帧来解码时,终端设备需要向可移动平台发送第一类视频帧的生成请求,而当可移动平台接收到终端设备发送的第一类视频帧的生成请求后,按照调整后的第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将该第一视频帧传输至终端设备。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.
步骤S203、以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。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.
在调整第二编码压缩比和将第一视频帧发送给终端设备后,以第一视频帧为参考视频帧,按照调整后的第二编码压缩比对初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,以调整第二视频帧对应的编码数据量。其中,第一待编码视频帧和第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值,第二待编码视频帧可以根据第一视频帧的帧序号确定,例如,用第一视频帧的帧序号加1,得到待编码帧序号,并将与该待编码帧序号对应的初始 视频帧确定为第二待编码视频帧。预设帧序号差值可基于实际情况进行设置,本申请对此不做具体限定。After adjusting the second encoding and compression ratio and sending the first video frame to the terminal device, 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. Wherein, 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, and 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.
步骤S204、将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
在编码得到第二视频帧后,将第二视频帧传输至终端设备,终端设备接收可移动平台传输的第二视频帧,由于之前已经接收到第一视频帧,且第二视频帧是以第一视频帧为参考进行编码得到的,因此,终端设备以接收到第一视频帧为参考视频帧对第二视频帧进行解码,从而使得终端设备能够显示图像。After the second video frame is obtained by encoding, 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.
在一实施例中,根据可移动平台与终端设备之间的无线信道的信道带宽,确定目标编码码率,并获取可移动平台的编码器的当前编码码率;基于目标编码码率与当前编码码率之间的差值,控制可移动平台中的PID码流控制器,将编码器的编码码率调整为目标编码码率。其中,PID码流控制器的码流控制系数包括比例控制系数(P系数)、积分控制系数(I系数)和微分控制系数(D系数)。通过PID码流控制器的比例控制系数(P系数)、积分控制系数(I系数)和微分控制系数(D系数)可以基于目标编码码率与当前编码码率之间的差值,快速平滑的将编码器的编码码率调整为目标编码码率,可以避免编码码率的突变和抖动给无线图传带来的影响。In one embodiment, 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. Among them, 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). Through the proportional control coefficient (P coefficient), integral control coefficient (I coefficient) and differential control coefficient (D coefficient) of the PID code stream controller, based on the difference between the target coding rate and the current coding rate, 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.
在一实施例中,根据无线信道的信道带宽,确定目标编码码率的方式可以为:获取信道带宽与编码码率之间的映射关系表;根据该映射关系表和无线信道的信道带宽,确定目标编码码率。其中,信道带宽与编码码率之间的映射关系表可基于实际情况进行设置,本申请实施例对此不做具体限定。In one embodiment, according to the channel bandwidth of the wireless channel, 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.
在一实施例中,获取终端设备反馈的终端设备当前接收到的视频帧的第一帧序号,并获取可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;根据第一帧序号与所述第二帧序号之间的帧序号差值,估计无线信道的堆积数据量;在堆积数据量大于预设数据量时,降低可移动平台的编码器的编码码率,而在堆积数据量小于或等于预设数据量时,不做处理。其中,预设数据量可基于实际情况进行设置,本申请实施例对此不做具体限定。通过在无线信道的堆积数据量大于预设数据量时,降低可移动平台的编码器的编码码率,以减少编码得到的视频帧的编码数据量,降低无线信道的负荷。In one embodiment, obtain the first frame sequence number of the video frame currently received by the terminal device fed back by the terminal device, and obtain the second frame sequence number of the video frame encoded by the encoder of the movable platform at the current moment; 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.
在一实施例中,降低可移动平台的编码器的编码码率的方式可以为:根据堆积数据量,确定码率增益值;根据该码率增益值,降低可移动平台的编码器的编码码率,即用可移动平台的编码器的当前编码码率减去该码率增益值,以 降低可移动平台的编码器的编码码率。其中,可移动平台的存储器中存储有堆积数据量与码率增益值之间的映射关系,堆积数据量越大,则码率增益值越大,堆积数据量越小,则码率增益值越小,通过该映射关系和堆积数据量可以快速的确定码率增益值,堆积数据量与码率增益值之间的映射关系可基于实际情况进行设置,本申请实施例对此不做具体限定。In one embodiment, 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. Among them, 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.
在一实施例中,也可以按照预设比例,降低可移动平台的编码器的编码码率。例如,预设比例为50%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-50%),又例如,预设比例为30%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-30%),再例如,预设比例为25%,则将可移动平台的编码器的当前编码码率降低为当前编码码率的(100%-25%)。In an embodiment, 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.
在一实施例中,根据第一帧序号与第二帧序号之间的帧序号差值,估计无线信道的堆积数据量的方式可以为:根据编码器的当前编码码率,确定视频帧的单位数据量;根据单位数据量以及第一帧序号与第二帧序号之间的帧序号差值,估计无线信道的堆积数据量,即确定单位数据量与该帧序号差值的乘积,并将单位数据量与该帧序号差值的乘积确定为无线信道的堆积数据量。其中,可移动平台的存储器中存储有编码码率与单位数据量之间的映射关系,通过该映射关系和编码器的当前编码码率,可以确定视频帧的单位数据量。In one embodiment, according to the frame sequence number difference between the first frame sequence number and the second frame sequence number, 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.
在一实施例中,获取编码影响参数,其中,该编码影响参数包括无线信道的信道带宽、可移动平台的当前系统功耗、可移动平台所处环境的复杂度和/或终端设备的解码能力;根据该编码影响参数,调整可移动平台的编码器的编码模式和视频规格。通过编码影响参数自适应调整可移动平台的编码器的编码模式和视频规格,提高可移动平台的续航能力、保证无线图传的传输可靠性和普适性。In one embodiment, 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 ; According to 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.
其中,视频规格包括第一视频规格和第二视频规格,第一视频规格包括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的编码压缩比更高,编码数据量更少。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. Compared with H.264/AVC, H.265/HEVC has a higher encoding compression ratio and a smaller amount of encoded data under the same image quality.
示例性的,若终端设备的解码能力为终端设备仅支持H.264/AVC、H.265/HEVC,则将可移动平台的编码器的编码模式调整为H.264/AVC或H.265/HEVC,并将可移动平台的编码器的视频规格调整为Fullsize和2xbinning中的任一项。通过终端设备的解码能力,自适应调整可移动平台的编码器的编码模式和视频规格,可以提高无线图传的普适性。Exemplarily, if 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. Through the decoding capability of the terminal device, 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.
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning);若可移动平台与终端设备之间的无线信道的信道带宽大于预设信道带宽,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC)和第二编码模式(H.264/AVC)中的任一项,并将编码器的视频规格调整为第一视频规格(Fullsize)和第二视频规格(2xbinning)中的任一项。通过无线信道的信道带宽,自适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性和画质需求。Exemplarily, if the channel bandwidth of the wireless channel between the mobile platform and the terminal device is less than or equal to the preset channel bandwidth, adjust the encoding mode of the encoder of the mobile platform to the first encoding mode (H.265/HEVC). ), and adjust the video specification of the encoder of the movable platform to the second video specification (2xbinning); if the channel bandwidth of the wireless channel between the movable platform and the terminal device is greater than the preset channel bandwidth, the The encoding mode of the encoder is adjusted to any one of the first encoding mode (H.265/HEVC) and the second encoding mode (H.264/AVC), and the video specification of the encoder is adjusted to the first video specification ( Fullsize) and the second video specification (2xbinning). Through the channel bandwidth of the wireless channel, the encoding mode and video specification 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.
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,且可移动平台的当前系统功耗小于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第一视频规格(Fullsize);若可移动平台与终端设备之间的无线信道的信道带宽小于或等于预设信道带宽,且可移动平台的当前系统功耗大于或等于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning)。通过无线信道的信道带宽和可移动平台的系统功耗,自适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性、画质需求和可移动平台的续航时间。Exemplarily, if the channel bandwidth of the wireless channel between the movable platform and the terminal device is less than or equal to the preset channel bandwidth, and the current system power consumption of the movable platform is less than the preset power consumption, 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). If the wireless channel between the mobile platform and the terminal device The channel bandwidth of the mobile platform is less 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, then adjust the encoding mode of the encoder of the mobile platform to the first encoding mode (H.265/ HEVC), and adjust the video specification of the encoder of the mobile platform to the second video specification (2xbinning). According to the channel bandwidth of the wireless channel and the system power consumption of the mobile platform, 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. .
示例性的,若可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台的当前系统功耗小于预设功耗,则将可移动平台的编码器的编码模式调整为第一编码模式(H.265/HEVC),并将可移动平台的编码器的视频规格调整为第一视频规格(Fullsize);若可移动平台与终端设备之间的无线信道的信道带宽大于或等于预设信道带宽,且可移动平台的当前系统功耗大于或等于预设功耗,将可移动平台的编码器的编码模式调整为第二编码模式(H.264/AVC),并将可移动平台的编码器的视频规格调整为第二视频规格(2xbinning)。通过无线信道的信道带宽和可移动平台的系统功耗,自 适应调整可移动平台的编码器的编码模式和视频规格,可以兼顾无线图传的可靠性、画质需求和可移动平台的续航时间。Exemplarily, if 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 current system power consumption of the movable platform is less than the preset power consumption, the encoder of the movable platform 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). If the wireless channel between the mobile platform and the terminal device 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). According to the channel bandwidth of the wireless channel and the system power consumption of the mobile platform, 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. .
可以理解的是,还可以通过可移动平台所处环境的复杂度自适应调整可移动平台的编码器的编码模式和视频规格,可以提高无线图传的普适性;还可以通过可移动平台当前系统功耗自适应调整可移动平台的编码器的编码模式和视频规格,可以提高可移动平台的续航时间;还可以通过可移动平台所处环境的复杂度和信道带宽,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求和使用场景;还可以通过信道带宽、可移动平台的当前系统功耗和可移动平台所处环境的复杂度,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求、使用场景和可移动平台的续航时间;还可以信道带宽、可移动平台的当前系统功耗、可移动平台所处环境的复杂度和终端设备的解码能力,自适应调整可移动平台的编码器的编码模式和视频规格,以兼顾无线图传的可靠性、画质需求、使用场景和可移动平台的续航时间。It can be understood that 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. , adaptively adjust the encoding mode and video specifications of the encoder of the mobile platform to take into account the reliability of wireless image transmission, image quality requirements, usage scenarios and the battery life of the mobile platform; System power consumption, the complexity of the environment where the mobile platform is located, and the decoding capability of the terminal device, adaptively adjust the encoding mode and video specifications of the encoder of the mobile platform to take into account the reliability of wireless image transmission, image quality requirements, use Battery life of scenes and movable platforms.
上述实施例提供的视频传输方法,通过可移动平台与终端设备之间的无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,然后按照调整后的第一编码压缩比对拍摄装置拍摄到的初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将第一视频帧传输至所述终端设备,以及以第一视频帧为参考视频帧,按照调整后的第二编码压缩比对该初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧,最后将第二视频帧传输至终端设备,以供终端设备以第一视频帧为参考视频帧,对第二视频帧进行解码,使得可移动平台能够基于信道带宽自适应的调整编码压缩比,以降低或增加传输的视频帧的数据量,以解决传输的视频画质下降或者传输卡顿的问题,保证无线图传的可靠性和视频画质。In the video transmission method provided by the above embodiment, 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. In order to solve the problem of video quality degradation or transmission freeze, and ensure the reliability and video quality of wireless video transmission.
请参阅图6,图6是本申请实施例提供的一种视频传输装置的结构示意性框图。Please refer to FIG. 6. FIG. 6 is a schematic structural block diagram of a video transmission apparatus provided by an embodiment of the present application.
如图6所示,该视频传输装置300包括处理器301和存储器302,处理器301和存储器302通过总线303连接,该总线303比如为I2C(Inter-integrated Circuit)总线。视频传输装置300应用于可移动平台,可移动平台包括拍摄装置,拍摄装置拍摄的初始视频帧经过编码后能够通过可移动平台与终端设备之间的无线信道传输至终端设备。As shown in FIG. 6 , 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.
具体地,处理器301可以是微控制单元(Micro-controller Unit,MCU)、中 央处理单元(Central Processing Unit,CPU)或数字信号处理器(Digital Signal Processor,DSP)等。Specifically, 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.
具体地,存储器302可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。Specifically, 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.
其中,所述处理器301用于运行存储在存储器302中的计算机程序,并在执行所述计算机程序时实现如下步骤:Wherein, 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:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;adjusting the first coding compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel;
按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;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 device;
以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;Taking 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;
将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
在一实施例中,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。In an embodiment, 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.
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:In an embodiment, 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:
在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio according to the channel bandwidth;
或者or
在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the first encoding and compression ratio is greater than a preset encoding and compression ratio, the first encoding and compression ratio is lowered according to the channel bandwidth.
在一实施例中,所述根据所述信道带宽,调高所述第一编码压缩比,包括:In an embodiment, the increasing the first coding compression ratio according to the channel bandwidth includes:
获取与所述信道带宽对应的压缩比增益值;obtaining a compression ratio gain value corresponding to the channel bandwidth;
根据所述压缩比增益值,调高所述第一编码压缩比。According to the compression ratio gain value, the first encoding compression ratio is increased.
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:In an embodiment, 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:
获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。According to the channel bandwidth and the complexity of the wireless channel, the first coding compression ratio of the first type of video frame is adjusted.
在一实施例中,所述可移动平台所处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。In one embodiment, the complexity of the environment in which the movable platform is located is determined according to images or videos collected by the photographing device.
在一实施例中,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:In an embodiment, 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:
在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;When the channel bandwidth is less than a preset channel bandwidth, and the complexity is less than a preset complexity, increasing the first coding compression ratio;
或者or
在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is lowered.
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:In an embodiment, 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:
根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;According to 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:
以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。Taking the first video frame as a reference video frame, encoding 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.
在一实施例中,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。In one embodiment, 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.
在一实施例中,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。In one embodiment, the first type of video frames includes I-frames, and the second type of video frames includes P-frames.
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:In an embodiment, 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:
在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio and decreasing the second coding compression ratio;
或者or
在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and 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.
在一实施例中,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:In an embodiment, 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:
获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。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.
在一实施例中,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:In an embodiment, 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:
在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth and the complexity is smaller than the preset complexity, increasing the first coding compression ratio and decreasing the second coding compression ratio;
或者or
在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is decreased, and the second encoding and compression ratio is increased.
在一实施例中,所述处理器还用于实现以下步骤:In one embodiment, the processor is further configured to implement the following steps:
根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;Determine the target coding rate according to the channel bandwidth of the wireless channel, and obtain the current coding rate of the encoder of the movable platform;
基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。Based on the difference between the target encoding rate and the current encoding rate, the PID stream controller in the movable platform is controlled to adjust the encoding rate of the encoder to the target encoding rate Rate.
在一实施例中,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:In an embodiment, the determining the target coding rate according to the channel bandwidth of the wireless channel includes:
获取信道带宽与编码码率之间的映射关系表;Obtain the mapping table between channel bandwidth and coding rate;
根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。The target coding code rate is determined according to the mapping relationship table and the channel bandwidth of the wireless channel.
在一实施例中,所述处理器还用于实现以下步骤:In one embodiment, the processor is further configured to implement the following steps:
获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;Obtain the first frame sequence number of the video frame currently received by the terminal device fed back by the terminal device, and obtain the second frame sequence number of the video frame encoded by the encoder of the movable platform at the current moment;
根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;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;
在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。When the accumulated data amount is greater than the preset data amount, the encoding code rate of the encoder of the movable platform is reduced.
在一实施例中,所述降低所述可移动平台的编码器的编码码率,包括:In one embodiment, the reducing the coding rate of the encoder of the movable platform includes:
根据所述堆积数据量,确定码率增益值;According to the accumulated data amount, determine the code rate gain value;
根据所述码率增益值,降低所述可移动平台的编码器的编码码率。According to the code rate gain value, the code rate of the encoder of the movable platform is reduced.
在一实施例中,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:In an embodiment, 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:
根据所述编码器的当前编码码率,确定视频帧的单位数据量;According to the current encoding bit rate of the encoder, determine the unit data amount of the video frame;
根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。According to the unit data amount and the frame number difference between the first frame number and the second frame number, the accumulated data volume of the wireless channel is estimated.
在一实施例中,所述处理器还用于实现以下步骤:In one embodiment, the processor is further configured to implement the following steps:
获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前系统功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解 码能力;Acquiring coding impact parameters, 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;
根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。According to the encoding influence parameter, the encoding mode and video specification of the encoder of the movable platform are adjusted.
在一实施例中,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二编码模式的编码效率。In one embodiment, 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.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的视频传输装置的具体工作过程,可以参考前述视频传输方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of the description, for the specific working process of the video transmission device described above, reference may be made to the corresponding process in the foregoing video transmission method embodiment, which is not described here. Repeat.
请参阅图7,图7是本申请实施例提供的一种可移动平台的结构示意性框图。Please refer to FIG. 7. FIG. 7 is a schematic structural block diagram of a movable platform provided by an embodiment of the present application.
如图7所示,可移动平台400包括平台本体410、动力系统420、拍摄装置430和视频传输装置440,动力系统420、拍摄装置430和视频传输装置440设于平台本体410,动力系统420用于为可移动平台400提供移动动力,拍摄装置430用于初始视频帧,视频传输装置440用于对拍摄装置430拍摄到的初始视频帧进行编码以及用于将编码后的初始视频帧传输至终端设备,视频传输装置440还用于控制可移动平台移动。As shown in FIG. 7 , the movable platform 400 includes a platform body 410 , a power system 420 , a photographing device 430 and a video transmission device 440 . In order to provide moving power for the movable platform 400, the shooting device 430 is used for initial video frame, and 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. Equipment, the video transmission device 440 is also used to control the movement of the movable platform.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的可移动平台的具体工作过程,可以参考前述视频传输方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of the description, for the specific working process of the movable platform described above, reference may be made to the corresponding process in the foregoing video transmission method embodiment, which is not described here. Repeat.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所述程序指令,实现上述实施例提供的视频传输方法的步骤。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.
其中,所述计算机可读存储介质可以是前述任一实施例所述的可移动平台的内部存储单元,例如所述可移动平台的硬盘或内存。所述计算机可读存储介质也可以是所述可移动平台的外部存储设备,例如所述可移动平台上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。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.
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terms used in the specification of the present application herein are for the purpose of describing particular embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural unless the context clearly dictates otherwise.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是 指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in the present application. Modifications or substitutions shall be covered by the protection scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (42)

  1. 一种视频传输方法,其特征在于,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备,所述方法包括:A video transmission method, characterized in that it is applied to a movable platform, the movable platform includes a photographing device, and the initial video frame photographed by the photographing device can pass through the communication between the movable platform and the terminal device after being encoded. The wireless channel is transmitted to the terminal device, and the method includes:
    根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;adjusting the first coding compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel;
    按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;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 device;
    以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;Taking 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;
    将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
  2. 根据权利要求1所述的视频传输方法,其特征在于,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。The video transmission method according to claim 1, wherein the frame 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 number difference.
  3. 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission method according to claim 1, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio according to the channel bandwidth;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the first encoding and compression ratio is greater than a preset encoding and compression ratio, the first encoding and compression ratio is lowered according to the channel bandwidth.
  4. 根据权利要求3所述的视频传输方法,其特征在于,所述根据所述信道带宽,调高所述第一编码压缩比,包括:The video transmission method according to claim 3, wherein the increasing the first encoding and compression ratio according to the channel bandwidth comprises:
    获取与所述信道带宽对应的压缩比增益值;obtaining a compression ratio gain value corresponding to the channel bandwidth;
    根据所述压缩比增益值,调高所述第一编码压缩比。According to the compression ratio gain value, the first encoding compression ratio is increased.
  5. 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission method according to claim 1, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
    根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。According to the channel bandwidth and the complexity of the wireless channel, the first coding compression ratio of the first type of video frame is adjusted.
  6. 根据权利要求5所述的视频传输方法,其特征在于,所述可移动平台所 处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。The video transmission method according to claim 5, wherein the complexity of the environment where the movable platform is located is determined according to the images or videos collected by the photographing device.
  7. 根据权利要求5所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:The video transmission method according to claim 5, wherein 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 comprises:
    在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;When the channel bandwidth is less than a preset channel bandwidth, and the complexity is less than a preset complexity, increasing the first coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is lowered.
  8. 根据权利要求1所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission method according to claim 1, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;According to 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:
    以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。Taking the first video frame as a reference video frame, encoding 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.
  9. 根据权利要求8所述的视频传输方法,其特征在于,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。The video transmission method according to claim 8, wherein 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.
  10. 根据权利要求8所述的视频传输方法,其特征在于,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。The video transmission method according to claim 8, wherein the video frames of the first type include I frames, and the video frames of the second type include P frames.
  11. 根据权利要求8所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:The video transmission method according to claim 8, wherein the first coding and compression ratio of the first type of video frame and the second coding and compression ratio of the second type of video frame are adjusted according to the channel bandwidth of the wireless channel. ,include:
    在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio and decreasing the second coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and 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.
  12. 根据权利要求8所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:The video transmission method according to claim 8, wherein the first coding and compression ratio of the first type of video frame and the second coding and compression ratio of the second type of video frame are adjusted according to the channel bandwidth of the wireless channel. ,include:
    获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
    根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。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.
  13. 根据权利要求12所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:The video transmission method according to claim 12, wherein 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 comprises:
    在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth and the complexity is smaller than the preset complexity, increasing the first coding compression ratio and decreasing the second coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is decreased, and the second encoding and compression ratio is increased.
  14. 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:The video transmission method according to any one of claims 1-13, wherein the method further comprises:
    根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;Determine the target coding rate according to the channel bandwidth of the wireless channel, and obtain the current coding rate of the encoder of the movable platform;
    基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。Based on the difference between the target encoding rate and the current encoding rate, the PID stream controller in the movable platform is controlled to adjust the encoding rate of the encoder to the target encoding rate Rate.
  15. 根据权利要求14所述的视频传输方法,其特征在于,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:The video transmission method according to claim 14, wherein the determining the target coding rate according to the channel bandwidth of the wireless channel comprises:
    获取信道带宽与编码码率之间的映射关系表;Obtain the mapping table between channel bandwidth and coding rate;
    根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。The target coding code rate is determined according to the mapping relationship table and the channel bandwidth of the wireless channel.
  16. 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:The video transmission method according to any one of claims 1-13, wherein the method further comprises:
    获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;Obtain the first frame sequence number of the video frame currently received by the terminal device fed back by the terminal device, and obtain the second frame sequence number of the video frame encoded by the encoder of the movable platform at the current moment;
    根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;According to the frame sequence number difference between the first frame sequence number and the second frame sequence number, estimate the accumulated data amount of the wireless channel;
    在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。When the accumulated data amount is greater than the preset data amount, the encoding code rate of the encoder of the movable platform is reduced.
  17. 根据权利要求16所述的视频传输方法,其特征在于,所述降低所述可移动平台的编码器的编码码率,包括:The video transmission method according to claim 16, wherein the reducing the coding rate of the encoder of the movable platform comprises:
    根据所述堆积数据量,确定码率增益值;According to the accumulated data amount, determine the code rate gain value;
    根据所述码率增益值,降低所述可移动平台的编码器的编码码率。According to the code rate gain value, the code rate of the encoder of the movable platform is reduced.
  18. 根据权利要求16所述的视频传输方法,其特征在于,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:The video transmission method according to claim 16, wherein the estimating the accumulated data volume of the wireless channel according to the frame sequence number difference between the first frame sequence number and the second frame sequence number comprises the following steps: :
    根据所述编码器的当前编码码率,确定视频帧的单位数据量;According to the current encoding bit rate of the encoder, determine the unit data amount of the video frame;
    根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。According to the unit data amount and the frame number difference between the first frame number and the second frame number, the accumulated data volume of the wireless channel is estimated.
  19. 根据权利要求1-13中任一项所述的视频传输方法,其特征在于,所述方法还包括:The video transmission method according to any one of claims 1-13, wherein the method further comprises:
    获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前系统功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解码能力;Acquiring coding impact parameters, where the coding impact parameters include the channel bandwidth, the current system power consumption of the mobile platform, the complexity of the environment in which the mobile platform is located, and/or the decoding capability of the terminal device;
    根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。According to the encoding influence parameter, the encoding mode and video specification of the encoder of the movable platform are adjusted.
  20. 根据权利要求19所述的视频传输方法,其特征在于,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二编码模式的编码效率。The video transmission method according to claim 19, wherein 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.
  21. 一种视频传输装置,其特征在于,应用于可移动平台,所述可移动平台包括拍摄装置,所述拍摄装置拍摄的初始视频帧经过编码后能够通过所述可移动平台与终端设备之间的无线信道传输至所述终端设备;A video transmission device is characterized in that it is applied to a movable platform, the movable platform includes a shooting device, and the initial video frame captured by the shooting device can pass through the communication between the movable platform and the terminal device after being encoded. the wireless channel 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:
    根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比;According to the channel bandwidth of the wireless channel, adjust the first coding compression ratio of the first type of video frame;
    按照调整后的所述第一编码压缩比对所述初始视频帧中的第一待编码视频帧进行编码,得到第一视频帧,并将所述第一视频帧传输至所述终端设备;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 device;
    以所述第一视频帧为参考视频帧,对所述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧;Taking 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;
    将所述第二视频帧传输至所述终端设备,以供所述终端设备以所述第一视频帧为参考视频帧,对所述第二视频帧进行解码。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.
  22. 根据权利要求21所述的视频传输装置,其特征在于,所述第一待编码视频帧和所述第二待编码视频帧之间的帧序号差值小于或等于预设帧序号差值。The video transmission apparatus according to claim 21, wherein a frame 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 number difference.
  23. 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission device according to claim 21, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    在所述信道带宽小于预设信道带宽时,根据所述信道带宽,调高所述第一编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio according to the channel bandwidth;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,根据所述信道带宽,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the first encoding and compression ratio is greater than a preset encoding and compression ratio, the first encoding and compression ratio is lowered according to the channel bandwidth.
  24. 根据权利要求23所述的视频传输装置,其特征在于,所述根据所述信道带宽,调高所述第一编码压缩比,包括:The video transmission apparatus according to claim 23, wherein the increasing the first encoding and compression ratio according to the channel bandwidth comprises:
    获取与所述信道带宽对应的压缩比增益值;obtaining a compression ratio gain value corresponding to the channel bandwidth;
    根据所述压缩比增益值,调高所述第一编码压缩比。According to the compression ratio gain value, the first encoding compression ratio is increased.
  25. 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission apparatus according to claim 21, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
    根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比。According to the channel bandwidth and the complexity of the wireless channel, the first coding compression ratio of the first type of video frame is adjusted.
  26. 根据权利要求25所述的视频传输装置,其特征在于,所述可移动平台所处环境的复杂度是根据所述拍摄装置采集到的图像或视频确定的。The video transmission device according to claim 25, wherein the complexity of the environment where the movable platform is located is determined according to the images or videos collected by the photographing device.
  27. 根据权利要求25所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整第一类视频帧的第一编码压缩比,包括:The video transmission device according to claim 25, wherein 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 comprises:
    在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比;When the channel bandwidth is less than a preset channel bandwidth, and the complexity is less than a preset complexity, increasing the first coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is lowered.
  28. 根据权利要求21所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比,包括:The video transmission apparatus according to claim 21, wherein the adjusting the first coding and compression ratio of the first type of video frame according to the channel bandwidth of the wireless channel comprises:
    根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比;According to 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:
    以所述第一视频帧为参考视频帧,按照调整后的所述第二编码压缩比对所 述初始视频帧中的第二待编码视频帧进行编码,得到第二视频帧。Taking the first video frame as a reference video frame, encoding 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.
  29. 根据权利要求28所述的视频传输装置,其特征在于,所述第一类视频帧对应的编码数据量大于所述第二类视频帧对应的编码数据量。The video transmission apparatus according to claim 28, wherein 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.
  30. 根据权利要求28所述的视频传输装置,其特征在于,所述第一类视频帧包括I帧,所述第二类视频帧包括P帧。The video transmission apparatus according to claim 28, wherein the video frames of the first type include I frames, and the video frames of the second type include P frames.
  31. 根据权利要求28所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:The video transmission device according to claim 28, wherein the first coding and compression ratio of the first type of video frame and the second coding and compression ratio of the second type of video frame are adjusted according to the channel bandwidth of the wireless channel. ,include:
    在所述信道带宽小于预设信道带宽时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth, increasing the first coding compression ratio and decreasing the second coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述第一编码压缩比大于预设编码压缩比时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and 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.
  32. 根据权利要求28所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,调整第一类视频帧的第一编码压缩比和第二类视频帧的第二编码压缩比,包括:The video transmission device according to claim 28, wherein the first coding and compression ratio of the first type of video frame and the second coding and compression ratio of the second type of video frame are adjusted according to the channel bandwidth of the wireless channel. ,include:
    获取所述可移动平台所处环境的复杂度;obtaining the complexity of the environment in which the movable platform is located;
    根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比。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.
  33. 根据权利要求32所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽和所述复杂度,调整所述第一编码压缩比和所述第二编码压缩比,包括:The video transmission apparatus according to claim 32, wherein the adjusting the first coding and compression ratio and the second coding and compression ratio according to the channel bandwidth and the complexity of the wireless channel comprises:
    在所述信道带宽小于预设信道带宽,且所述复杂度小于预设复杂度时,调高所述第一编码压缩比,并调低所述第二编码压缩比;When the channel bandwidth is smaller than the preset channel bandwidth and the complexity is smaller than the preset complexity, increasing the first coding compression ratio and decreasing the second coding compression ratio;
    或者or
    在所述信道带宽大于或等于预设信道带宽,且所述复杂度大于或等于预设复杂度时,调低所述第一编码压缩比,并调高所述第二编码压缩比。When the channel bandwidth is greater than or equal to a preset channel bandwidth, and the complexity is greater than or equal to a preset complexity, the first encoding and compression ratio is decreased, and the second encoding and compression ratio is increased.
  34. 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:The video transmission device according to any one of claims 21-33, wherein the processor is further configured to implement the following steps:
    根据所述无线信道的信道带宽,确定目标编码码率,并获取所述可移动平台的编码器的当前编码码率;According to the channel bandwidth of the wireless channel, determine the target coding rate, and obtain the current coding rate of the encoder of the movable platform;
    基于所述目标编码码率与所述当前编码码率之间的差值,控制所述可移动 平台中的PID码流控制器,将所述编码器的编码码率调整为所述目标编码码率。Based on the difference between the target encoding rate and the current encoding rate, the PID stream controller in the movable platform is controlled to adjust the encoding rate of the encoder to the target encoding rate Rate.
  35. 根据权利要求34所述的视频传输装置,其特征在于,所述根据所述无线信道的信道带宽,确定目标编码码率,包括:The video transmission apparatus according to claim 34, wherein the determining the target coding rate according to the channel bandwidth of the wireless channel comprises:
    获取信道带宽与编码码率之间的映射关系表;Obtain the mapping table between channel bandwidth and coding rate;
    根据所述映射关系表和所述无线信道的信道带宽,确定目标编码码率。The target coding code rate is determined according to the mapping relationship table and the channel bandwidth of the wireless channel.
  36. 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:The video transmission device according to any one of claims 21-33, wherein the processor is further configured to implement the following steps:
    获取所述终端设备反馈的所述终端设备当前接收到的视频帧的第一帧序号,并获取所述可移动平台的编码器在当前时刻编码得到的视频帧的第二帧序号;Obtain the first frame sequence number of the video frame currently received by the terminal device fed back by the terminal device, and obtain the second frame sequence number of the video frame encoded by the encoder of the movable platform at the current moment;
    根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量;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;
    在所述堆积数据量大于预设数据量时,降低所述可移动平台的编码器的编码码率。When the accumulated data amount is greater than the preset data amount, the encoding code rate of the encoder of the movable platform is reduced.
  37. 根据权利要求36所述的视频传输装置,其特征在于,所述降低所述可移动平台的编码器的编码码率,包括:The video transmission device according to claim 36, wherein the reducing the coding rate of the encoder of the movable platform comprises:
    根据所述堆积数据量,确定码率增益值;According to the accumulated data amount, determine the code rate gain value;
    根据所述码率增益值,降低所述可移动平台的编码器的编码码率。According to the code rate gain value, the code rate of the encoder of the movable platform is reduced.
  38. 根据权利要求36所述的视频传输装置,其特征在于,所述根据所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量,包括:The video transmission apparatus according to claim 36, wherein 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 comprises the following steps: :
    根据所述编码器的当前编码码率,确定视频帧的单位数据量;According to the current encoding bit rate of the encoder, determine the unit data amount of the video frame;
    根据所述单位数据量以及所述第一帧序号与所述第二帧序号之间的帧序号差值,估计所述无线信道的堆积数据量。According to the unit data amount and the frame number difference between the first frame number and the second frame number, the accumulated data volume of the wireless channel is estimated.
  39. 根据权利要求21-33中任一项所述的视频传输装置,其特征在于,所述处理器还用于实现以下步骤:The video transmission device according to any one of claims 21-33, wherein the processor is further configured to implement the following steps:
    获取编码影响参数,所述编码影响参数包括所述信道带宽、所述可移动平台的当前系统功耗、所述可移动平台所处环境的复杂度和/或所述终端设备的解码能力;Acquiring coding impact parameters, where 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;
    根据所述编码影响参数,调整所述可移动平台的编码器的编码模式和视频规格。According to the encoding influence parameter, the encoding mode and video specification of the encoder of the movable platform are adjusted.
  40. 根据权利要求39所述的视频传输装置,其特征在于,所述编码模式包括第一编码模式和第二编码模式,所述第一编码模式的编码效率大于所述第二 编码模式的编码效率。The video transmission apparatus according to claim 39, wherein 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.
  41. 一种可移动平台,其特征在于,包括:A movable platform is characterized in that, comprising:
    平台本体;Platform ontology;
    动力系统,设于所述平台本体上,用于为所述可移动平台提供移动动力;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;
    如权利要求21-40中任一项所述的视频传输装置,设于所述平台本体内,用于对所述拍摄装置拍摄到的初始视频帧进行编码以及用于将编码后的初始视频帧传输至终端设备。The video transmission device according to any one of claims 21 to 40, provided in the platform body, for encoding the initial video frame captured by the photographing device and for encoding the encoded initial video frame transmitted to the terminal device.
  42. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-20中任一项所述的视频传输方法的步骤。A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method described in any one of claims 1-20. The steps of the video transmission method described above.
PCT/CN2020/125999 2020-11-02 2020-11-02 Video transmission method and apparatus, and mobile platform and computer-readable storage medium WO2022088200A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/125999 WO2022088200A1 (en) 2020-11-02 2020-11-02 Video transmission method and apparatus, and mobile platform and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/125999 WO2022088200A1 (en) 2020-11-02 2020-11-02 Video transmission method and apparatus, and mobile platform and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2022088200A1 true WO2022088200A1 (en) 2022-05-05

Family

ID=81381704

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125999 WO2022088200A1 (en) 2020-11-02 2020-11-02 Video transmission method and apparatus, and mobile platform and computer-readable storage medium

Country Status (1)

Country Link
WO (1) WO2022088200A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115474077A (en) * 2022-09-06 2022-12-13 一汽解放汽车有限公司 Video transmission method and device, vehicle-end controller and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
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 (en) * 2004-10-12 2007-11-21 液滴技术有限公司 Compression rate control system and method with variable subband processing
CN104349142A (en) * 2014-11-03 2015-02-11 南京航空航天大学 Layered representation-based unmanned plane video adaptive transmission method
CN105657433A (en) * 2015-12-30 2016-06-08 航天恒星科技有限公司 Image complexity based signal source real-time coding method and system
CN108012163A (en) * 2017-12-19 2018-05-08 希诺麦田技术(深圳)有限公司 The bit rate control method and device of Video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
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 (en) * 2004-10-12 2007-11-21 液滴技术有限公司 Compression rate control system and method with variable subband processing
CN104349142A (en) * 2014-11-03 2015-02-11 南京航空航天大学 Layered representation-based unmanned plane video adaptive transmission method
CN105657433A (en) * 2015-12-30 2016-06-08 航天恒星科技有限公司 Image complexity based signal source real-time coding method and system
CN108012163A (en) * 2017-12-19 2018-05-08 希诺麦田技术(深圳)有限公司 The bit rate control method and device of Video coding

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115474077A (en) * 2022-09-06 2022-12-13 一汽解放汽车有限公司 Video transmission method and device, vehicle-end controller and storage medium

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
US20200084394A1 (en) Systems and methods for compressing video content
US20200244970A1 (en) Video processing method, device, aerial vehicle, system, and storage medium
WO2019205831A1 (en) Method and device for video encoding, storage medium, and equipment
US20170103577A1 (en) Method and apparatus for optimizing video streaming for virtual reality
WO2020057609A1 (en) Image transmission method and apparatus, image sending terminal, and aircraft image transmission system
KR20190055101A (en) Method and apparatus for encoding and decoding omnidirectional video
WO2018090258A1 (en) Image processing method, device, and system
CN105163079A (en) Smart shooting system and method thereof
US20190191147A1 (en) Distortion of video for seek in 360 degree video
KR20160068657A (en) Method and device for real-time encoding
WO2022088200A1 (en) Video transmission method and apparatus, and mobile platform and computer-readable storage medium
US10536715B1 (en) Motion estimation through the use of on-camera sensor information
WO2022000350A1 (en) Video transmission method, mobile platform, terminal device, video transmission system, and storage medium
WO2023273535A1 (en) Video bitstream processing method, medium, program product, and electronic device
WO2021249562A1 (en) Information transmission method, related device, and system
CN115668953A (en) Image content transmission method and apparatus using edge computing service
WO2022217557A1 (en) Image transmission method for movable platform, movable platform, and readable storage medium
WO2022141316A1 (en) Image transmission method, movable platform, device, system and readable storage medium
WO2022174431A1 (en) Image transmission method, mobile platform, device, and computer readable storage medium
WO2022204997A1 (en) Wireless communication method, movable platform, system, and computer readable storage medium
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