You may have some old VHS tapes that you want to digitize to play on your computer or media player, or don’t feel like spending money on an HD recorder for your satellite or cable TV box, but still would like to record your favorite programs. It’s actually possible to do so for less than $7 thanks to USB video grabbers. Those USB capture cards are nothing new, but I did not know the price had come down that much. One of the cheapest capture card is Easycap DC60 (clone?) that sells for $6.80 on Aliexpress, and runs on Windows, and (if you are lucky) in Linux. The device provides stereo audio input, composite input and S-Video input. It is sold with a USB cable to connect it to your computer. CD is normally provided with Windows drivers and program. All you need is a Windows 2000/XP computer with a […]
How to do a framebuffer screenshot
I’ll explain how to do framebuffer screenshots on 16-bit and 32-bit framebuffer. For 16-bit this is fully based on http://docs.blackfin.uclinux.org/doku.php?id=framebuffer Capturing screenshots Whatever the bit-depth of your framebuffer, the first step is to capture the frambuffer raw data on the board:
1 |
cat /dev/fb0 > screen.raw |
Now the you need to take the raw image, and convert it to a standard image format. This step depends on what type of display is there Converting 16-bit Framebuffer screenshot (RGB565) into png To convert the raw rgb data extracted from /dev/fb0, use iraw2png perl script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#!/usr/bin/perl -w $w = shift || 240; $h = shift || 320; $pixels = $w * $h; open OUT, "|pnmtopng" or die "Can't pipe pnmtopng: $!\n"; printf OUT "P6%d %d\n255\n", $w, $h; while ((read STDIN, $raw, 2) and $pixels--) { $short = unpack('S', $raw); print OUT pack("C3", ($short & 0xf800) >> 8, ($short & 0x7e0) >> 3, ($short & 0x1f) << 3); } close OUT; |
To do the conversion, type the following command in the host:
1 |
./iraw2png 640 480 < screen.raw > screen.png |
where 640 and 480 are respectively the width and height of your framebuffer. This has been tried on a 16-bit framebuffer on EM8620 series. Converting 32-bit Framebuffer screenshot (ARGB, RGBA, BGRA…) into png The solution proposed here is not as neat as the blackfin’s solution for 16-bit framebuffer, […]