0%

How to Capture Screenshot from FrameBuffer

How to Take Screenshot from Embedded Linux FrameBuffer?

  1. On the target device:

    1
    TARGET$ cat /dev/fb0 > myImage
  2. Copy the raw image, myImage, to the host and run the following command:

    1
    HOST$ avconv -vframes 1 -f rawvideo -pix_fmt rgb565le -s 800x480 -i myImage myImage.png

    Note that rgb565le is the pixel format used on my device. You can replace it to uyvy422 if UYVY 4:2:2 is used or rgb32 if RGB32 is used.

  3. [Updates on 2020/05/23] - Use ffmpeg instead:

    1
    HOST$ sudo apt install ffmpeg
    1
    HOST$ ffmpeg -f rawvideo -pixel_format rgb32 -video_size 800x480 -i myImage myImage.png

References