Save the text below into a text file called "autoexec.ash", and place them onto the SD Card. Upon power up, the GoPro will start taking Long Exposure pictures in Time Lapse mode. Just push and hold the power button between exposures to stop the script and power it off.
-----------------------------------------
t app appmode photo
sleep 1
t ia2 -ae still_exp 100 55 55
sleep 1
t app button shutter PR
sleep 6
d:\autoexec.ash
REBOOT yes
------------------------------------------
The script above is a 6 Second Exposure at ISO100.
Explanation:
t app appmode photo sleep 1 t ia2 -ae still_exp P X Y sleep 1 t app button shutter PR sleep A d:\autoexec.ash REBOOT yes
Key:
P: ISO
X: Exposure time
Y: Iris (exposure time)
A: timelapse interval
Ref:
http://chernowii.com/gopro-longexp
Value (number to write in hack file)
Exposure Time (seconds)
1
8
23
7
55
6
85
5
120
4
180
3
255
2
400
1
I have made many scripts, so you can pick a prebuilt one, and copy that one script to the SD card. Here is the download link:
Based on a previous Time Lapse generating system, I wanted to build another version with a Raspberry Pi that would be put outside inside an enclosure. I had attempted Time lapse Photography with a Raspberry Pi and a Microsoft Webcam before, but had issues with stability past more than a day. The Raspberry would lockup. I think it had to do with the small power supply and the 3 long USB extension cords, but that's another issue entirely.
This is my current version of my WeatherCam that I use to make Time Lapse Videos. I purchased a Dome Enclosure and mounted it upside down onto a pole. I found a servo at the local toy shop, and mounted the servo to the tripod screw. I am using the Raspberry Pi Camera with the IR Filter, and the servo is being powered form the Raspberry Pi directly (Not optimal, but it works). I also added a RTC to this setup so I can use this camera when it is not on the Internet, and still get accurate timestamps on the images captured. After some testing, I determined a bigger power supply was needed to power the Raspberry and the Servo unit. I am using a 5v 2.1A USB charger for the power supply.
One of the big drives for this project, was wanting to make a Web Based interface so I could rebuild the unit I deployed for my Mom. This way, she won't have to know CLI to build Time Lapse videos. She already has a Raspberry Pi generating Time Lapse Videos automatically, but I wanted to give her more control over the process. I also have a chance of building one to Time Lapse of storms in Colorado, and I wanted to make it all easy to use. It has came a long way since I first started, but here is the interface.
Main Page showing Image Feed, updates every 60 seconds
Help page explains all sections and settings
Browse images/videos captured on system
Build a previous days images
into a Time Lapse, or process/upload todays
Upload a previously generated Time Lapse
Rotate the camera with the servo
Check System Temperature and free space
System Settings
Here is a video of the camera system automatically taking a panorama image set for post processing. The Panorama below is what I stitched together on my iPad from the images that were captured here.
9 Images captured from this system, and post processed into a Panorama on my iPad. What a view.
I setup a weather station with webcam to feed data to Wunderground. The station setup was an AirBridge with an AirCam. The only issue, was the uploading of a pic to Wunderground was not as reliable as I had hoped, and I couldn't save the time lapse videos offline for use later. So I added a Raspberry Pi to the network to download high quality images from the webcam and create the time lapse videos for uploading to YouTube.
The end result is an automated time lapse (from 4AM to 10 PM - 1 Image Per Minute - 1080 Images - Processed at 24FPS) uploaded to youtube that is 45 seconds long.
What is needed:
A Functional AirCam on the network, with a known IP and Allow Unauthenticated option turned on.
Raspberry Pi with a Raspian image on a least a 4GB card
A thumb drive inserted into the Raspberry Pi with a folder on it called "TimeLapse".
HDMI Cable from the Raspberry to your TV.
An Ethernat connection to the network.
Section 1 - Initial Setup:
Getting started, Update the Pi first:
sudo apt-get update
sudo apt-get upgrade
Use "ifconfig" to figure out the IP Address, then use Putty to SSH to the Raspberry Pi.
Section 2 - Building the Scripts
You can download the scripts with these, or paste them in manually.
sudo wget https://www.dropbox.com/s/glrjw1r0c0jp9ip/TimeLapse.sh -P /etc/
sudo wget https://www.dropbox.com/s/65e0hopek114uqc/TimeLapseExport.sh -P /etc/
sudo wget https://www.dropbox.com/s/rbdwkwma5lzrbin/TimeLapseCleanup.sh -P /etc/
*Skip to Section 3 if you downloaded them directly, after you edit TimeLapseExport.sh and change the username/password fields. Don't forget to update the YouTube Keywords and Description.
Run the following to create the script file,
sudo nano /etc/TimeLapse.sh
then paste the script below:
-------------------------------------------------------- #!/bin/sh #/etc/TimeLapse.sh export DATETIME=`date +%Y%m%d%H%M` export DATE=`date +%Y%m%d` export MONT=`date +%Y%m` FILE=/mnt/USB/TimeLapse CAMIP=192.168.1.20 if [ -d $FILE ] then echo "Thumb Drive Available @ $FILE" mkdir /mnt/USB/TimeLapse/$MONT mkdir /mnt/USB/TimeLapse/$MONT/$DATE ffmpeg -i rtsp://$CAMIP/live/ch00_0 -y -f image2 -sameq -t 0.001 /mnt/USB/TimeLapse/$MONT/$DATE/$DATETIME.jpeg else echo "Thumb Drive not Mounted @ $FILE" sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/USB sudo mount -o uid=pi,gid=pi /dev/sdb1 /mnt/USB fi
--------------------------------------------------------
Use CTRL+S to save, then CTRL+X to close.
Create another script file and paste the script text below (Edit the username, password and youtube data):
sudo nano /etc/TimeLapseExport.sh
Make your scripts executable by running the following:
sudo chmod u+x /etc/TimeLapse.sh
sudo chmod u+x /etc/TimeLapseExport.sh sudo chmod u+x /etc/TimeLapseCleanup.sh
Section 3 - Setup Youtube-upload
Now we need to get the scripts to upload to youtube. Run the following commands:
Section 5 (Optional) - Setup SMB to access files from remote computer
This will allow you to access the files on the thumb drive from a PC:
sudo apt-get install samba samba-common-bin
sudo nano /etc/samba/smb.conf
Add the following:
-----------------------------------------------------------
[pihome]
comment= Pi Home
path=/mnt/USB
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no
-----------------------------------------------------------
CTRL+S to save, and CTRL+X to exit
Set a password for SMB Access:
sudo smbpasswd -a pi
*Enter password twice
Section 6 - RAM Drive for Video Output
We don't want to beat up the Thumb Drive, so do the following:
sudo mkdir /var/TimeLapse
Save the file by pressing CTRL-X and select Y to save the changes.
Section 8 (Optional) - Setup Web Interface to view images
Install Apache:
sudo apt-get install apache2
Edit the Apache Web Config:
sudo nano /etc/apache2/sites-enabled/000-default
Edit the Document:
Root and the Directory fields to the following:
DocumentRoot /mnt/USB
<Directory /mnt/USB/>
Save the file by pressing CTRL-X and select Y to save the changes.
Reboot the web service to accept the changes:
sudo service apache2 restart
Test the web portal from your computer/device by putting the IP of the Raspberry in the browser
Section 9 - Reboot
reboot with the following:
sudo reboot
Section 10 - Aircam Tuneup
The Aircam has a few "wonderful" settings that you may want to change to get more picture clarity. Look at these images that were taken around the same time of day. One looks out of focus, but it wasn't.
You can telnet into the camera and use the default "ubnt" as the username and password.
View the current settings: cat /proc/isp0/ae/info
cat /proc/isp0/awb/info
Execute the following commands to cleanup the image quality during the day: