AusOcean Fluid-filled Pressure-compensating Underwater Camera (FPUC) Guide
Revised: 13/02/2023
Author(s):
Saxon Nelson-Milton <saxon@ausocean.org>
Trek Hopton <trek@ausocean.org>
Frank Cui <frank@ausocean.org>
Breeze del West <breeze@ausocean.org>
Copyright
Copyright © The Australian Ocean Laboratory Limited (AusOcean) 2020-2023.
The information contained herein is licensed under a Creative Commons Attribution 3.0 Australia License.
Notice
AusOcean is not liable for any losses, damages, costs and/or other consequences resulting directly or indirectly from using or relying on the information in this document.
Table of contents
2.0 Fabrication and Assembly 4
Initial Software Installation 5
Connecting your Pi to the Internet 13
2.6 (STANDARD SENSOR) Inner Camera Enclosure 38
2.6 (WIDE ANGLE SENSOR) Inner Camera Enclosure 45
2.7 (STANDARD) Camera Electronics 56
2.7 (SPUC CONNECTED) Camera Electronics 60
— If using an imaged SD card, assemble camera and start here – 70
3.1 Configuring Camera to VidGrind 76
4.1 Appendix A: SSH into Pi 82
4.2 Appendix B: Focusing the raspberry pi camera. 83
4.3 Appendix C: Using system images for the raspberry pi 85
Setting up SD card with an image 85
Writing an image file to an SD card 86
The AusOcean Underwater Camera is a low-cost IP video camera designed for continuous immersion up to depths of 20m. Unlike most consumer video cameras it is designed for continuous streaming of video data. It can be configured to stream to YouTube for viewing or to VidGrind (on App Engine) for storage and analysis.
The underwater camera is based on the Raspberry Pi Zero and the Raspberry Pi Camera and can be built for approximately A$250 in parts.
This version of the underwater camera adopts pressure compensation techniques to achieve water tightness. This entails a PVC housing filled with mineral oil and a pressure compensation membrane. This allows the inner pressure to be approximately equal to the outer pressure at depth, reducing the tendency for the liquid mediums to cross the seals.
The following section looks at the software setup for the Pi Zero. The Pi Zero will operate using an image of the linux OS design for raspberry pis, Raspbian. On this we run AusOcean’s RV software that will handle recording, packetisation and forwarding of video to a server.
| |
Monitor or TV (with HDMI cable) | |
USB Keyboard | |
Laptop or PC (With a Linux OS) |
1 | On your computer, download the Raspberry Pi Imager. This is a program that will help you install the operating system onto your SD card. Choose the right option for your operating system. |
2 | Also download this specific Raspberry Pi OS: Raspberry Pi OS Lite (Legacy), scroll down until you find it on the raspberry pi operating systems page. This is the specific version of the operating system you will need to use. |
3 | Insert the SD into your computer. Note: you may need to use an SD card adapter. |
4 | Open Raspberry Pi Imager and flash that OS onto the SD card. If installing for the first time you will need to run through the installation set-up. Once downloaded, select finish. |
5 | CHOOSE OS -> Note: Versions newer than Buster are not compatible with the rv software. Use Custom -> Select previously downloaded image file. CHOOSE STORAGE -> SDHS Card -> WRITE -> YES -> CONTINUE -> Remove the SD card from your laptop. |
1 | Insert the SD card into the Pi |
2 | Connect the Pi to a keyboard with a micro USB to USB adapter, and to a monitor with a mini HDMI to HDMI adapter. You can plug the other end of the micro USB cable into a USB wall charger. |
3 | Once the Pi is connected to power the green light will come on. If connected correctly the Raspberry Pi terminal window will appear. Log in with: username: pi password: raspberry |
4 | Use the following command to enter the configuration UI: sudo raspi-config |
5 | Use your keyboard arrows to navigate up and down, use the enter key to select the option. Go to localisation options -> Keyboard layout -> Generic 105-Key PC (intl.)-> You will then need to select a region. Select Other -> English (US) For the next two options, keep the defaults. |
6 | Now select System options -> Change User Password. Set the password to something of your choosing, you will need to input the password twice. Note: You must remember this password, so write it down for later. |
7 | Go to interface options -> Select camera and follow prompts to enable camera. YES -> OK-> |
8 | Again go to interface options -> SSH and follow prompts to enable SSH. This will allow you to login and control the pi from your computer later when it is connected to the network. |
9 | Select finish to reboot the Pi. |
10 | Use the following command to open the network configuration file: sudo nano /etc/dhcpcd.conf |
# It is possible to fall back to static IP if DHCP fails
define static profile
profile static_eth0
static ip_address=192.168.1.23/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
#fallback to static profile on eth0
interface eth0
fallback static_eth0
Note: In the AusOcean system that number is 1 so we change the number to any other single digit number e.g. 2. In your school system it may be a different number, change yours accordingly.
ON WINDOWS:
$ ipconfig
You should see a section that looks similar to this:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : lan
Link-local IPv6 Address . . . . . : fe80::1e29:ebb4:66ee:bd3b%18
IPv4 Address. . . . . . . . . . . : 192.168.1.222
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
The example gateway IP here is 192.168.1.1.
In this example the pi’s IP address is 192.168.1.175. Look for the (Realtek Semiconductor) label.
Hint: Pi IP address always starts with 00:E0:4C.
MSI (‘Windows Installer’)
64-bit x86: putty-64bit-0.78-installer.msi
Login as: pi
Enter your password from earlier.
Press enter.
Note: If you get the message “authenticity of host … can’t be established”, type “yes” and press enter.
ON LINUX:
$ ifconfig
You should see a section that looks similar to this:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.120 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7179:a11e:8efe:daac prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:53:44:58 txqueuelen 1000 (Ethernet)
RX packets 79 bytes 5922 (5.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 74 bytes 9068 (8.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The example IP address here is 192.168.1.120
$ nmap -sP <your IP>/24
(If not already installed, use the command:
$ sudo apt install nmap)
The pi’s address should be named “raspberrypi.lan” but may not be named.
<pi IP> is your pi’s ip address.
Note: If you get the message “authenticity of host … can’t be established”, type “yes” and press enter.
Windows continues here:
$ sudo apt update
$ sudo apt -y upgrade
Note: this may take 30 seconds.
$ sudo apt install git
$ git --version
$ cd ~
$ mkdir -p go/src/bitbucket.org/ausocean
$ cd go/src/bitbucket.org/ausocean
$ git clone https://bitbucket.org/ausocean/av
NOTE: STEPS 30 TO 32 DO NOT NEED TO BE COMPLETED IF MOTION DETECTION WILL NOT BE USED ON THE CAMERA.
$ sudo apt install ffmpeg
$ ffmpeg -version
On the raspberry pi 3:
$ nohup make install_raspi &
$ nohup make install_raspi_zero &
The command & is used for running the process in the background. This is necessary as the installation time is very long and we don’t want it to be stopped when terminating the ssh connection from the computer to the pi.
To view the standard out:
$ less nohup.out
or
$ tail -f nohup.out
If you make a mistake, remove opencv:
$ sudo rm -rf /tmp/opencv
—----------------- end motion detection steps—--------------------
$ cd ~/go/src/bitbucket.org/ausocean/av/init
To see makefile instructions and options view the makefile using cat,
$ cat Makefile
We’ll need to specify the desired mac and device corresponding to this mac after registration of the mac on netreceiver/vidgrind.
$ sudo make install_hard BUILD_TAG=nocv MA=<desired mac address> DK=<device key for registered mac on vidgrind>
Note: This may take several minutes.
$ sudo nano /etc/netsender.conf
Paste in the following text in the file:
ma <mac address>
dk <device key>
wi
ip V0,T0
op
mp 60
ap 60
tg
hw
sh vidgrind.appspot.com
Save changes by pressing ctrl+x then y then Enter.
The viewing window will allow the Raspberry Pi Camera to see out of the underwater housing. It is made by gluing an acrylic disk to a threaded PVC cap that has a hole on its surface.
90mm PVC Threaded Cap (with o-ring) |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
The rear cap of the camera housing provides two threaded sockets; one for the cable plug and the other for the pressure compensating membrane plug.
Multi Layer Disposable Glove (usually nitrile or chemical resistance) | |
| |
| |
| |
| |
| |
|
The housing body is composed of a small section of pipe and two threaded access couplings that the front and rear caps screw on to .
Item | Image |
RJ45 Connector |
| |
|
The cable plug pots the sheath opening of a cat-6 cable so that no water or mineral oil can enter. The plug then allows the cable to screw into the rear cap where it can connect to the corresponding electronics.
Item | Image |
2 part epoxy (with mixing nozzles preferably) |
| |
| |
| |
|
|
|
|
| |
| |
|
The following section details the process for preparing the inner camera enclosure with the standard sensor i.e. to achieve a standard field of view. If you intend to use a wide angle sensor, for a wider field of view, please see the next section titled “Inner Camera Enclosure (STANDARD SENSOR)”.
The camera sensor cannot be exposed to the mineral oil because it will distort the image, furthermore, the mineral oil makes it very difficult to focus the raspberry pi camera with the default lens, therefore, we must enclose the raspberry pi camera in an “oil tight” enclosure.
Selleys Araldite 5 minute epoxy | |
4.3mm thick transparent acrylic sheet | |
Both pieces of the 3D printed inner camera enclosure |
Carefully swap out the default ribbon cable for the pi zero cable. Note: gently push the sides of the black part of the ribbon cable port towards the cable to release the cable from the ports. Note: the black sided ends of the ribbon cable face away from the boards. Plug ribbon cable into a pi zero with HDMI to a monitor, keyboard and power. | |
Login to the pi with username and password. Note: default username is pi, default password is raspberry. Enter commands: sudo raspi-config Choose interfacing options, then enable the camera. sudo reboot Wait for the pi to reboot. sudo raspistill -t 0 You should see a picture of what the camera sees. | |
Set up objects with fine detail at 40cm and 3m. For example, use a box with 1cm high text. Adjust the camera’s focus by rotating the lens with the focusing wheel until both objects can be seen clearly with sharp edges. Your camera is now focused. Turn off the pi with: sudo shutdown now Unplug the ribbon cable from the pi. | |
Use a hacksaw to cut a rectangle of transparent acrylic 25 x 24mm. Remove the protective film and wipe off any debris from the cutting process with a soft cloth. | |
Note: this step uses epoxy glue so ensure you are wearing protective gloves and working on a surface that can tolerate any spillage. Some cardboard works well. Click the inner wall into place on the camera board. Feed the ribbon cable through the slot in the enclosure so that the camera can fit facing up in the enclosure, lightly place it on the pegs to ensure that the holes line up, then bend the cable away so you can see the base of the enclosure. Using 5 minute epoxy, fill the base of the enclosure so that the whole surface is covered. Don’t go over the height of the ribbon cable. | |
Pull the ribbon cable through the slot until the camera can fit securely on the pegs. Carefully surround the inner wall’s top surface with a small amount of epoxy, use the nozzle to spread it thinly across the surface. Gently push the acrylic rectangle onto the epoxy, ensure the epoxy does not cover the area in front of the lens. | |
Fill around the outside of the inner wall with epoxy making sure to fill under the ribbon cable. Fill up to the sides of the acrylic but do not fill over the acrylic. Note: be careful, the epoxy’s chemical reaction will produce heat so don’t touch the enclosure for 5 minutes while it cures. You have now finished assembling the inner camera enclosure. |
The following section details the process for preparing the inner camera enclosure with the standard sensor i.e. to achieve a standard field of view. If you intend to use a wide angle sensor, for a wider field of view, please see the next section titled “Inner Camera Enclosure (STANDARD SENSOR)”.
The camera sensor cannot be exposed to the mineral oil because it will distort the image, furthermore, the mineral oil makes it very difficult to focus the raspberry pi camera with the default lens, therefore, we must enclose the raspberry pi camera in an “oil tight” enclosure.
Using some tweezers, carefully disconnect the camera ribbon cable from the board. | |
The existing camera sensor is held in place by double sided tape. Carefully pry the camera sensor away using some tweezers, then remove the double sided tape. | |
Align the new wide angle sensor and lens with the connector and carefully push into place. Please ensure the connector is well aligned otherwise damage may occur. | |
Expose the double sided tape on the wide camera sensor and lens, and then carefully apply some pressure to stick it down. | |
Turn the camera board over and open the ribbon cable clasp. | |
Insert the ribbon cable into the port with the contact facing up. | |
With the ribbon cable inserted, close the clasp. | |
Carefully swap out the default ribbon cable for the pi zero cable. Note: gently push the sides of the black part of the ribbon cable port towards the cable to release the cable from the ports. Note: the black sided ends of the ribbon cable face away from the boards. Plug ribbon cable into a pi zero with HDMI to a monitor, keyboard and power. | |
Plug a HDMI cable into the pi zero and a monitor Plug a keyboard into the USB port of the pi zero And connect the pi to power with a micro USB cable | |
Login to the pi with username and password. Note: default username is pi, default password is raspberry. Enter commands: sudo raspi-config Choose interfacing options, then enable the camera. sudo reboot Wait for the pi to reboot. sudo raspistill -t 0 You should see a picture of what the camera sees. | |
Exit the program with Ctrl C Turn off the pi with: sudo shutdown now Unplug the ribbon cable from the pi. | |
Use a hacksaw to cut a rectangle of transparent acrylic 31 x 31mm. Remove the protective film and wipe off any debris from the cutting process with a soft cloth. | |
Note: this step uses epoxy glue so ensure you are wearing protective gloves and working on a surface that can tolerate any spillage. Some cardboard works well. Click the inner wall into place on the camera board. Feed the ribbon cable through the slot in the enclosure so that the camera can fit facing up in the enclosure, lightly place it on the pegs to ensure that the holes line up, then bend the cable away so you can see the base of the enclosure. Using 5 minute epoxy, fill the base of the enclosure so that the whole surface is covered. Don’t go over the height of the ribbon cable. | |
Pull the ribbon cable through the slot until the camera can fit securely on the pegs. Carefully surround the inner wall’s top surface with a small amount of epoxy, use the nozzle to spread it thinly across the surface. Gently push the acrylic rectangle onto the epoxy, ensure the epoxy does not cover the area in front of the lens. | |
Fill around the outside of the inner wall with epoxy making sure to fill under the ribbon cable. Fill up to the sides of the acrylic but do not fill over the acrylic. Note: be careful, the epoxy’s chemical reaction will produce heat so don’t touch the enclosure for 5 minutes while it cures. You have now finished assembling the inner camera enclosure. NOTE: for the wide angle camera to be mounted onto the 3D printed camera tray, new holes will have to be drilled to accommodate the wider enclosure. Shave the face down to a flat edge first, and then mark out 19mm from either edge. Drill the holes using a 3mm drill bit. |
This version of the “Camera Electronics” section assumes we are employing a standard PoE setup, i.e. no self passivating underwater connectors (SPUC) are in use. If you wish to use SPUC then see the following section “2.7 (SPUC CONNECTED) Camera Electronics” to see adapted camera electronics instructions.
The camera electronics are the insides of the camera, composed of the camera enclosure, voltage regulator and raspberry pi zero, along with a piece of acrylic to hold it all together.
Prepared raspberry pi zero from section 3.1 | |
Prepared inner camera enclosure (See previous steps). | |
Micro USB Ethernet Adapter (used also for section 3.1) | |
3D printed camera tray | |
4x .12mm light duty cables (2x red, 2x black) 1 set (out) = 200mm, the other (in) = 300mm |
| |
Tip: solder both sides of the regulator ensuring a good connection. | |
| |
|
|
|
This version of the “Camera Electronics” section provides methodology for assembling electronics for a camera that will be connected via a self passivating underwater connector (SPUC). In this situation, the ethernet data connection is superimposed onto the power line using a modified TP-Link ethernet over power adapter.
Prepared raspberry pi zero from section 3.1 | |
Prepared inner camera enclosure (See previous steps). | |
Micro USB Ethernet Adapter (used also for section 3.1) | |
3D printed camera tray | |
Modified TP-Link AV600 Nano Powerline Adapter (converted from AC to DC) |
| |
The final assembly sections describe the process in which everything comes together to form the underwater camera. Particular care and attention needs to be taken to ensure the camera housing is water tight and does not fail. Our main aim here is to ensure there are no air bubbles in the housing once everything is sealed up. This ensures minimal deformation of the pressure compensating membrane and housing body, when reaching pressure equalisation. For cameras that only need to be water resistant (not being submerged, but might be subjected to rain or splashes) the mineral oil can be omitted.
Before this process, it is recommended that the camera hardware is tested. See the “3.0 Usage & Testing” section of this document for instructions on how to do this.
Viewing window (fabricated part) | |
Housing body (fabricated part) | |
Rear cap (with pressure compensator plug - fabricated parts) | |
Cable plug (fabricated part) | |
Camera electronics (fabricated part) | |
| |
| |
| |
| |
| |
| |
Note: Test in housing before filling with oil | |
| |
| |
| |
|
Note: confirm the camera is reporting an image first.
WARNING: before powering on the camera, please be sure the voltage step down is set to output 5V, otherwise there is risk of damaging the camera hardware.
Testing of the camera may be performed with the housing open and electronics exposed, or with the housing closed up. These instructions assume you do not know the mac as specified in the /etc/netsender.conf file, and/or you do not know if the camera has been registered with a netreceiver site.
NOTE: TO BE READY FOR DEPLOYMENT, JETTY CAMERAS MUST STREAM AT LEAST FOR 2 WHOLE DAYS ON A REPEAT BROADCAST, RIG CAMERAS MUST STREAM FOR AT LEAST 5 WHOLE DAYS.
Figure 3.1: Example setup to connect camera JSTs to ethernet and power lines.
$ ifconfig
You should get output similar to this:
enp4s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:2b:67:bf:8b:5d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 43337 bytes 15085428 (15.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 43337 bytes 15085428 (15.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.8.202 netmask 255.255.255.0 broadcast 192.168.8.255
inet6 fe80::f4ed:469:b9e9:af9a prefixlen 64 scopeid 0x20<link>
ether 8c:c6:81:6c:e1:98 txqueuelen 1000 (Ethernet)
RX packets 1004175 bytes 933848594 (933.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 529443 bytes 166901043 (166.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Each entry in this output refers to different network interfaces (enp4s0, lo, wlp0s10f3) some of which will and will not be connected to a network. Interfaces connected to a network will show an IP address, as in the highlighted interface above (192.168.8.202). We will need to remember the first 3 numbers, which correspond to the network we are on. The IP of the camera will be some number: 192.168.8.X, where x will be some unique number.
$ nmap -sP 192.168.8.0/24
This will show output similar to this:
Starting Nmap 7.80 ( https://nmap.org ) at 2022-06-28 14:09 ACST
Nmap scan report for StarlinkRouter.lan (192.168.1.1)
Host is up (0.0020s latency).
Nmap scan report for 192.168.1.35
Host is up (0.088s latency).
Nmap scan report for 192.168.1.62
Host is up (0.0069s latency).
Nmap scan report for Galaxy-S10.lan (192.168.1.158)
Host is up (0.0045s latency).
Nmap scan report for saxon-ThinkPad-E15.lan (192.168.1.202)
Host is up (0.00036s latency).
Nmap done: 256 IP addresses (5 hosts up) scanned in 2.46 seconds
One of these hosts should be the camera (if not, this indicates a network connectivity problem). The IP may or may not have a hostname like “raspberrypi.lan”. Some of the hosts will obviously not be the camera for example “StarlinkRouter.lan”.
If you can successfully ssh then you’ve found the camera (or another raspberry pi on the network, but please remove these to simplify the process).
$ cat /etc/netsender.conf
ID | CameraABCD |
MAC | AB:CD:EF:GH:IJ |
WIFI/SSID | |
Inputs | V0,T0 |
Output | |
Mon Period | 60 |
Act Period | 60 |
Type | pi |
Ver | |
Key |
NOTE: the key field will be generated after pressing the add button.
$ sudo nano /etc/netsender.conf
TIPS FOR DIAGNOSING PROBLEMS
$ sudo tail -f /var/log/netsender/netsender.log
To configure the camera to VidGrind, the pi will need to be registered with the variables detailed below:
To go to the broadcast UI go to vidgrind.ausocean.org. Select the site for which you would like to broadcast with. Now hit the “Broadcast” item on the menu on the left side of the page. You will get an unfilled form as shown in Figure 1. The meaning and options for these fields are shown are provided in Table 1.
TIP: Set up the camera to stream in front of an analogue clock for easier diagnosis of potential stream issues.
Figure 1: unfilled form on the broadcast configuraiton UI.
An example configuration is shown in Figure 2.
Table 1: fields of the broadcast configuration form and their descriptions and options.
FIELD | DESCRIPTION |
Select Broadcast | This drop down lists previously saved broadcast configurations labeled by the broadcast name. When either the “Start” or “Repeat” buttons are pressed for a configuration, the broadcast configuration will be saved and listed here for future usage/modification. Selecting an option in the Select Broadcast list will fill the form with saved information and will display an embedded youtube player below from which any previous stream can be watched. See Figure 2 for an example of how this might look. |
Broadcast Name | This is the name of the broadcast. This is what appears on youtube as the broadcast title under the video, and is also used for identification of a broadcast configuration in the datastore and therefore the “Select Broadcast” field above. AusOcean has a convention of using the site name at the start of a broadcast name for example. At stony point, we call the broadcast “Stony Point CuttleCam by AusOcean”. |
Description | This is the description that appears on youtube under the title of a view. |
Stream Name | The stream name identifies the name of the stream that will be connected to the broadcast. This name will not be revealed outside of this configuration and is purely for satisfying the youtube API. This can probably be named similarly to the Broadcast Name. |
Privacy | This controls who can see the broadcast. There are three options: Public, Unlisted and Private. |
Resolution | This describes the resolution of the broadcast. We normally set this to 1080p. |
On Actions | These are the actions that must be performed to turn on the streaming hardware. This is a CSV list of key value pairs. The keys are the device variables and values are the values that will be set to turn on the device. For example, imagine that we have a device called “Camera”. On a rig with ESP controller called “ESP_D7ED01”. We would have to power on the camera and make sure its mode is set to normal: |
Off Actions | These are actions that must be performed to turn off the streaming hardware. This also a CSV list of key value pairs. The keys are again the device variables and the values are the values that should be set for turning off. Imagine we have a “Camera” device and a controller esp called “ESP_D7ED01” an example of off actions could be: ESP_D7ED01.CamPower=false |
RTMP URL Variable | This is the variable that contains the destination RTMP URL i.e the destination the streaming hardware will send video data to. The broadcast software will automatically set the value of this to the appropriate value which is obtained from youave after creating the broadcast. If we have a camera called “Camera”, this would be: Camera.RTMPURL |
Start Date/Time | This is the date and time that the broadcast will be scheduled to start at. This should be set to at a minimum 2 mins from modifying and hitting start on the configuration. Between the broadcast being created and this start time. The broadcast will appear listed as an “upcoming” stream. This time is used to automatically perform the On Actions that were specified above. |
End Date/Time: | This is the date and time that the broadcast is scheduled to end at. This will be used to perform the off actions to turn of external streaming hardware. THe broadcast code will also use to set the status of the broadcast to complete through the youtube api. |
Repeat Schedule Time | This is the time at each day that the broadcast will be created (not the start time of the broadcast) if repeat is set up i.e. if the repeat button is pressed. NOTE: for a single broadcast event this field can be left blank. |
Start (button) | Press this button to do a one time scheduling of a broadcast. Once this button is pressed the page will refresh and an embedded youtube video will appear as shown in Figure 3 with a countdown to the scheduled live time. |
Stop (button) | The stop button can be used to stop a broadcast by transition the status to complete. To use this feature the broadcast that is currently live must be selected using the “Select Broadcast” field and then this button is pressed. |
Repeat (button) | This button automatically adds crons for the daily scheduling of a broadcast configuration. To use this feature the “Repeat Schedule Time” field must be filled. This will correspond to the specification of the cron that will call the appropriate repeat broadcast functionality. |
Generate Token (button) | This button is used to generate a new authentication token if necessary. This need only be used if for some reason an error is returned after attempted broadcast start stating that authentication failed. |
Figure 2: Example of the UI after a previous broadcast has been selected. The most recent stream is shown in the embedded player beneath the form.
Figure 3: Example of UI after pressing start button. The embedded player shows the AusOcean slate image and displays a countdown until the scheduled start time. Once the stream starts, it can be viewed here.
<INSERT HOW TO PLUG INTO RIG>
$ nmap -sP 192.168.1.0/24
$ ssh pi@<ip address of pi>
On windows use PuTTY.
The following steps assume that section 2.1 has been completed. Here we’ll configure the raspberry pi to stream RTP to a VLC session. This will allow us to adjust camera focus and see results quickly on a live stream.
$ ifconfig
The output should look similar to this:
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.11 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::1d1c:5d16:42e3:de8e prefixlen 64 scopeid 0x20<link>
inet6 2405:7f00:b80d:1900:1b7b:c0bd:86c0:84db prefixlen 64 scopeid 0x0<global>
inet6 2405:7f00:b80d:1900:b568:b8f1:aceb:6a7a prefixlen 64 scopeid 0x0<global>
ether 5c:ea:1d:45:30:2f txqueuelen 1000 (Ethernet)
RX packets 441631 bytes 318673295 (318.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 262631 bytes 62724134 (62.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The IP in this case is 192.168.0.11 this is where we’ll configure RVCL to stream to i.e. rtp://192.168.0.11:6970
$ cd /home/USER/go/src/bitbucket.org/ausocean/av/rvcl
$ go build
$ nano config.json
Copy the following JSON into the file, replacing the RTPADDRESS field with your IP and the RTP port e.g. if your IP is 192.168.1.30, you’d have the following config file:
{
“Bitrate”:”2000”,
“Output”:”RTP”,
“RTPAddress”:”192.168.1.30:6970”,
“FrameRate”:”25”,
“Input”:”Raspivid”,
“logging”:”Debug”
}
$ ./rvcl -config-file=config.json
$ tail -f /var/log/netsender/netsender.log
Please contact saxon@ausocean.org if you have any issues with the log file attached.
If you are going to be setting up a camera SD card multiple times, you may want to create an ‘image’ of an existing camera SD card. This essentially clones the contents of the card so you don’t have to set it up from scratch every time. Follow these steps if you would like to create an image or you already have an image, otherwise skip to the section “Setting up and SD card from scratch”.
NOTE: the following steps are to bring the pi up to date with the latest AusOcean software.
Navigate to the av repository and update using these commands:
$ cd ~/go/src/bitbucket.org/ausocean/av/cmd/rv
$ git checkout master
$ git pull
$ go build --tags circleci
(Do not include --tags circleci if using motion detection)
$ cd ~/go/src/bitbucket.org/ausocean/av/init
$ sudo make install_hard
$ ifconfig
A similar section should appear:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.120 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::dcd5:527:9b50:e817 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:53:44:58 txqueuelen 1000 (Ethernet)
RX packets 188550 bytes 242748244 (231.5 MiB)
RX errors 543 dropped 267 overruns 290 frame 944
TX packets 121628 bytes 10283604 (9.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
In this example the MAC address is 00:e0:4c:53:44:58
$ sudo nano /etc/netsender.conf
Copy the following text into the file replacing <MAC_address> with your MAC address:
ma <mac_address>
dk 0
wid
ip V0,T0
op
mp 60
ap 60
tg
hw
sh vidgrind.appspot.com
Save changes by pressing ctrl+s then ctrl+x.