{"id":1427,"date":"2013-11-03T18:33:19","date_gmt":"2013-11-03T18:33:19","guid":{"rendered":"http:\/\/www.daveakerman.com\/?p=1427"},"modified":"2013-11-03T18:37:59","modified_gmt":"2013-11-03T18:37:59","slug":"hab-o-cam-raspberry-pi-video-streaming-to-batc-tv","status":"publish","type":"post","link":"http:\/\/www.daveakerman.com\/?p=1427","title":{"rendered":"HAB-o-Cam &#8211; Raspberry Pi Video Streaming to batc.tv"},"content":{"rendered":"<p>I usually run a video stream from my launches, using webcam attached to a laptop or more recently with my <a href=\"http:\/\/www.daveakerman.com\/?p=1412\">Chase Car Pi<\/a>, so that people following the flight can see what&#8217;s going on. Following a suggestion by <a href=\"http:\/\/ava.upuaut.net\/\">Anthony Stirk<\/a>, I decided to set up a second streaming camera which I can strap to my chest for a close-up view of the launch preparations.<\/p>\n<p>For this to work, I needed to get the whole thing (Pi, WiFi, PiCam, battery pack) packaged up to survive the odd knock. This meant internal batteries and that in turn meant the use of rechargeables (so I don&#8217;t have to unscrew the case to replace them). I ran some tests and found that regular 4 AA NiMh cells would run the Pi\/WiFi\/camera for plenty enough time. I then tried to fit the batteries into a case and that only worked without a battery holder. Even so, I had to remove almost all the connectors from the Pi to make it all fit. I opted for a <a href=\"https:\/\/www.modmypi.com\/raspberry-pi-cases\/cyntech-black-raspberry-pi-case\">Cyntech Blackberry Raspberry Pi Case<\/a> as this had enough internal space and is of a soft enough plastic to work with (cutting holes and slots for the camera and power switch).<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080923.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-large wp-image-1432\" alt=\"P1080923\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080923-1024x682.jpg\" width=\"640\" height=\"426\" srcset=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080923-1024x682.jpg 1024w, http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080923-300x200.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Into the case went 4 2650mAh Ni-Mh cells, an MSP1825S regulator, 100uF cap, power switch and a Pi Cam:<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080924.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-large wp-image-1433\" alt=\"P1080924\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080924-682x1024.jpg\" width=\"640\" height=\"960\" srcset=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080924-682x1024.jpg 682w, http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080924-200x300.jpg 200w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>All a bit of a tight squeeze!  The back of the case I screwed to a GoPro mount, to fit to a GoPro chest strap:<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080925.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080925-1024x682.jpg\" alt=\"P1080925\" width=\"640\" height=\"426\" class=\"aligncenter size-large wp-image-1434\" srcset=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080925-1024x682.jpg 1024w, http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080925-300x200.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>The camera pokes through a small square hole cut in the front of the case.  Here you can also see the power switch and WiFi adapter:<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080920.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080920-1024x682.jpg\" alt=\"P1080920\" width=\"640\" height=\"426\" class=\"aligncenter size-large wp-image-1431\" srcset=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080920-1024x682.jpg 1024w, http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080920-300x200.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Operation of the device is very very simple:  switch it on.  It automatically starts a simple script that pipes the output of raspivid through ffmpeg and thence to the <a href=\"http:\/\/www.batc.tv\">batc<\/a> server.<\/p>\n<p>Finally, here I am modelling the entire setup:<\/p>\n<p><a href=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080929.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080929-682x1024.jpg\" alt=\"P1080929\" width=\"640\" height=\"960\" class=\"aligncenter size-large wp-image-1429\" srcset=\"http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080929-682x1024.jpg 682w, http:\/\/www.daveakerman.com\/wp-content\/uploads\/2013\/11\/P1080929-200x300.jpg 200w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I usually run a video stream from my launches, using webcam attached to a laptop or more recently with my Chase Car Pi, so that people following the flight can see what&#8217;s going on. Following a suggestion by Anthony Stirk, I decided to set up a second streaming camera which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1427"}],"collection":[{"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1427"}],"version-history":[{"count":2,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1427\/revisions"}],"predecessor-version":[{"id":1437,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1427\/revisions\/1437"}],"wp:attachment":[{"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1427"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.daveakerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}