I’ve got a Raspberry PI for a while already, but it hasn’t been very useful until today. I recently started setting up my own ATV (Amateur TeleVision) station. I needed a simple solution to generate a test pattern, something to broadcast when testing my ATV transmitter. Since the Raspberry PI has a composite video output, there must be a way to let the PI do the job.
I found several projects on the internet. However, they produce only HDMI output, no composite video. After browsing the web, I found a very easy solution using the Linux fbi command. This command allows you to load a picture in the frame buffer of the graphics adaptor.
Since the Raspberry PI will run Linux, some basic skills at the Linux command line will be helpful to get the thing running…
Step 1: Get yourself a Raspberry PI and a 4GB SD-card. You will also need a 5V power supply with a Micro-USB connector. Also consider buying a corresponding case (I don’t know how your shack is looking, but mine is always cluttered with solder drops, cut wires, metal tools, and all kind of other things that could create a short circuit at my Raspberry PI).
Step 2: While waiting for the Raspberry PI to arrive, you can create your favourite test pattern or whatever you like. Save it in JPEG format, name it test-pattern.jpg (all lowercase). Note that PAL 4:3 has a resolution of 768 x 576 pixels.
Step 4: Connect display, keyboard and network. Then login at the console using the default username ‘pi’ and the password ‘raspberry’.
Step 5: Get root:
pi@raspberrypi ~ $ sudo su - root@raspberrypi:~#
Step 6: Install fbi:
root@raspberrypi:~# apt-get install fbi
Step 7: Create a small script called /root/atv-generator.sh using nano:
# nano /root/atv-generator.sh
Enter this text EXACTLY, then use Ctrl-X to save and exit:
#!/bin/bash /usr/bin/fbi --noverbose -d /dev/fb0 -a /root/test-pattern.jpg
Step 8: Use nano to edit /etc/inittab. Find the line for tty1 and replace it as shown below. This will start the atv-generator.sh script automatically when booting the Raspberry PI.
... #1:2345:respawn:/sbin/getty --noclear 38400 tty1 1:2345:respawn:/bin/bash /root/atv-generator.sh 2:23:respawn:/sbin/getty --noclear 38400 tty2 3:23:respawn:/sbin/getty --noclear 38400 tty3 ...
Step 9: Put the image in the directory /root, be sure it’s named test-pattern.jpg. You may use SCP or SFTP to copy it over the network, or transfer it by USB-stick.
Step 10: Reboot your Raspberry PI and enjoy your test pattern!
Modify composite output settings
In the directory /boot you will find a file named config.txt. Using a text editor you can configure the composite video output. For example, you may configure PAL or NTSC output, aspect ratio and overscan settings. For more information on these settings please have a look here.
For digital ATV some movement is preferred, since a blocking signal results in a still too. Gil F5CAU directed me to this page, which includes some code to run a simple slideshow.
This article was also published in: