[[gstreamer_video_compression]]

This is an old revision of the document!


Idea

To be able to efficiently send the image data over a wireless datalink, one option is to compress the video data using h264/h265 encoders. Those two are often implemented in a hardware-accelerated way on the onboard computers like RPI and Jetson Nano. We can use these encoders to compress the video data to about 1000kBit/s and keep some kind of acceptable quality in the images to be processed by the image analysis algorithms ( to be tested! ) on a basestation computer.

Tests

I conducted a first test using real images from a flight to check how well data could be compressed. I used gstreamer to compress a series of images to a videofile. Following settings choosen:

  • Imagesize 8MP - 3280×2464
  • Framerate 1Hz
  • Interframerate 1Hz / Didnt work with H265 so i choose 0.5Hz

H264

gst-launch-1.0 -e multifilesrc location=“%04d.jpg” caps=“image/jpeg,framerate=1/1” ! jpegdec ! x264enc bitrate=1000 speed-preset=2 key-int-max=2 ! avimux ! filesink location=“out264.avi”

H265

gst-launch-1.0 -e multifilesrc location=“%04d.jpg” caps=“image/jpeg,framerate=1/1” ! jpegdec ! x265enc bitrate=1000 speed-preset=2 key-int-max=2 ! h265parse ! filesink location=out265.h265

Results

Images are still looking okay for a human beeing. If the algorithms are also okay with that reduced quality need to be tested.

H264s filesize is in line with to the specified bitrate. H265 somehow is ~4x bigger that the specified bitrate, there is still some error to find.

  • gstreamer_video_compression.1586994630.txt.gz
  • Last modified: 2020/04/16 01:50
  • by wf68spef