How to Take Screenshot from Embedded Linux FrameBuffer?
On the target device:
1
TARGET$ cat /dev/fb0 > myImage
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 touyvy422
ifUYVY 4:2:2
is used orrgb32
ifRGB32
is used.[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
- vooya - https://www.offminor.de