{"id":248,"date":"2013-12-31T14:05:38","date_gmt":"2013-12-31T13:05:38","guid":{"rendered":"http:\/\/pa3hcm.utreg.net\/?p=248"},"modified":"2021-01-18T17:25:21","modified_gmt":"2021-01-18T16:25:21","slug":"atv-image-generator-using-the-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.pa3hcm.nl\/?p=248","title":{"rendered":"ATV image generator using the Raspberry PI"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignright\"><a href=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/20140101_145231.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" src=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/20140101_145231-300x225.jpg\" alt=\"20140101_145231\" class=\"wp-image-282\" srcset=\"https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/20140101_145231-300x225.jpg 300w, https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/20140101_145231-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>I&#8217;ve got a Raspberry PI for a while already, but it hasn&#8217;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.<\/p>\n\n\n\n<p>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 <i>fbi<\/i> command. This command allows you to load a picture in the frame buffer of the graphics adaptor.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">10 Steps<\/h2>\n\n\n\n<p>Since the Raspberry PI will run Linux, some basic skills at the Linux command line will be helpful to get the thing running&#8230;<\/p>\n\n\n\n<p>Step 1: Get yourself a <a href=\"http:\/\/www.raspberrypi.org\/\" target=\"_blank\" rel=\"noopener\">Raspberry PI<\/a> 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&#8217;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).<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright\"><a href=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/PA3HCM-ebu-testbeeld.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" src=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/PA3HCM-ebu-testbeeld-300x225.jpg\" alt=\"\" class=\"wp-image-253\" srcset=\"https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/PA3HCM-ebu-testbeeld-300x225.jpg 300w, https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/PA3HCM-ebu-testbeeld.jpg 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>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 <i>test-pattern.jpg<\/i> (all lowercase). Note that PAL 4:3 has a resolution of 768 x 576 pixels.<\/p>\n\n\n\n<p>Step 3: <a href=\"http:\/\/www.raspberrypi.org\/downloads\" target=\"_blank\" rel=\"noopener\">Install<\/a> RaspBian on your Raspberry PI.<br>Note: This project does not work with Raspbian Jessie yet. For now please use the <a href=\"https:\/\/downloads.raspberrypi.org\/raspbian\/images\/raspbian-2015-05-07\/\" target=\"_blank\" rel=\"noopener\">latest Raspbian Wheezy<\/a> release until I update the code&#8230; some day.<\/p>\n\n\n\n<p>Step 4: Connect display, keyboard and network. Then login at the console using the default username &#8216;pi&#8217; and the password &#8216;raspberry&#8217;.<\/p>\n\n\n\n<p>Step 5: Get root:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pi@raspberrypi ~ $ sudo su -\nroot@raspberrypi:~#<\/pre>\n\n\n\n<p>Step 6: Install <i>fbi<\/i>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@raspberrypi:~# apt-get install fbi<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright\"><a href=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/PA3HCM-philips-testbeeld.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" src=\"http:\/\/pa3hcm.utreg.net\/wp-content\/uploads\/2013\/12\/PA3HCM-philips-testbeeld-300x225.jpg\" alt=\"\" class=\"wp-image-254\" srcset=\"https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/PA3HCM-philips-testbeeld-300x225.jpg 300w, https:\/\/www.pa3hcm.nl\/wp-content\/uploads\/2013\/12\/PA3HCM-philips-testbeeld.jpg 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Step 7: Create a small script called \/root\/atv-generator.sh using <i>nano<\/i>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># nano \/root\/atv-generator.sh<\/pre>\n\n\n\n<p>Enter this text EXACTLY, then use Ctrl-X to save and exit:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash\n\/usr\/bin\/fbi --noverbose -d \/dev\/fb0 -a \/root\/test-pattern.jpg<\/pre>\n\n\n\n<p>Step 8: Use nano to edit <i>\/etc\/inittab<\/i>. 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.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n#1:2345:respawn:\/sbin\/getty --noclear 38400 tty1\n1:2345:respawn:\/bin\/bash \/root\/atv-generator.sh\n2:23:respawn:\/sbin\/getty --noclear 38400 tty2\n3:23:respawn:\/sbin\/getty --noclear 38400 tty3\n...<\/pre>\n\n\n\n<p>Step 9: Put the image in the directory <i>\/root<\/i>, be sure it&#8217;s named <i>test-pattern.jpg<\/i>. You may use SCP or SFTP to copy it over the network, or transfer it by USB-stick.<\/p>\n\n\n\n<p>Step 10: Reboot your Raspberry PI and enjoy your test pattern!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Modify composite output settings<\/h2>\n\n\n\n<p>In the directory <em>\/boot<\/em> you will find a file named <em>config.txt<\/em>. 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 <a href=\"https:\/\/www.raspberrypi.org\/documentation\/configuration\/config-txt\/video.md\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Slideshow<\/h2>\n\n\n\n<p>For digital ATV some movement is preferred, since a blocking signal results in a still too. Gil F5CAU directed me to <a href=\"http:\/\/www.techrepublic.com\/blog\/linux-and-open-source\/how-to-create-photo-slideshows-with-as-little-software-as-possible\/\" target=\"_blank\" rel=\"noopener\">this page<\/a>, which includes some code to run a simple slideshow.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>This article was also published in:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"http:\/\/www.agaf.de\/tva177.html\" target=\"_blank\" rel=\"noopener\">TV-AMATEUR, 2015 Q2<\/a><\/li><li><a href=\"http:\/\/www.cq-datv.mobi\/18.php\" target=\"_blank\" rel=\"noopener\">CQ-DATV, December 2014<\/a><\/li><li><a href=\"http:\/\/downloads.dkars.nl\/DKARS%20magazine%20201408.pdf\" target=\"_blank\" rel=\"noopener\">DKARS Magazine, August 2014<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a Raspberry PI for a while already, but it hasn&#8217;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, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[58,61,60],"class_list":["post-248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-atv","tag-atv-2","tag-linux","tag-raspberrypi"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=248"}],"version-history":[{"count":30,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":1857,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/posts\/248\/revisions\/1857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=\/wp\/v2\/media\/282"}],"wp:attachment":[{"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pa3hcm.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}