This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleep 1 | |
t app appmode photo | |
sleep 1 | |
t app button shutter PR | |
sleep 1 | |
t app button power PR | |
sleep 3 | |
t app button power PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GoProInterface(object): | |
""" | |
This is a sample API (written in Python) of how I envision | |
the calls to be made to the firmware. | |
Sample (Python) Usage: | |
>>> gpi = GoProInterface('~/gopro/videos/') | |
>>> gpi.start() | |
>>> gpi.stop() | |
/Users/sean/gopro/videos/0001.m4v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This program interfaces with the GoPro camera and records footage for a | |
set amount period of time defined by the optional `--seconds` arg. | |
""" | |
import argparse | |
import time | |
import serial | |
parser = argparse.ArgumentParser(description='Captures video from GoPro for set number of seconds.') | |
parser.add_argument( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@raspberrypi ~/public_html/gopro $ cat take_picture_and_send.sh | |
#!/bin/bash | |
## volume 100% | |
curl "http://10.5.5.9/camera/BS?t=goprohero&p=%02" | |
sleep 1 | |
## mode to photo | |
curl "http://10.5.5.9/camera/CM?t=goprohero&p=%01" | |
sleep 1 | |
## take picture | |
curl "http://10.5.5.9/bacpac/SH?t=goprohero&p=%01" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort pictures from GOPRO09* in img (symbolic links) | |
x=1;for i in GOPRO9*JPG; do counter=$(printf %04d $x); ln "$i" img_in_order/img"$counter".jpg; x=$(($x+1)); done | |
# Rotate pictures if needed | |
for file in *.jpg; do convert $file -rotate 180 rotated-$file; done | |
# Make a 24img/s movie | |
ffmpeg -i "img%04d.jpg" -r 24 -s hd720 -vcodec libx264 -b:v 4000k fflapse_hd720.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GoproClient | |
attr_reader :ip_address | |
attr_reader :password | |
attr_reader :delay | |
def initialize(ip_address, password, delay = 1.0) | |
@ip_address = ip_address | |
@password = password | |
@delay = delay | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
time.sleep(4) | |
urrlib2.urlopen("http://10.5.5.9/camera/PW?t=PASSWORD&t=%01") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<!GPBrowser, a html file that displays all the files shot in a gopro via wifi, and it autorefresh every X seconds.> | |
<head><!Replace X by the seconds the browser have to refresh the page.> | |
<meta http-equiv="refresh" content="X"> | |
</head> | |
<frameset ROWS="100%, *" frameborder="no" framespacing="0" border="0"> | |
<!Replace XXX by the number of the folder you want to browse> | |
<frame SRC="http://10.5.5.9:8080/videos/DCIM/XXXGOPRO" NAME="mainwindow" frameborder="no" framespacing="0" marginheight="0" marginwidth="0"> | |
</frameset> | |
<noframes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-Change password by the gopro wifi password!, and change X by the seconds the camera have to wait until it starts recording -> | |
<META HTTP-EQUIV="refresh" CONTENT="X; URL=http://10.5.5.9/bacpac/SH?t=password&p=%01"> | |
</head> | |
<body> | |
<p>gopro.html by Konrad Iturbe (github: @konradit)</p> | |
<div style="text-align:center"> | |
<button onclick="playPause()">Play/Pause</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import urlparse | |
import shutil | |
import re, os | |
base_url = "http://10.5.5.9:8080/videos/DCIM/XXXGOPRO/" #Where XXX, change it by the directory you want (for instance 100GOPRO) | |
content = urllib2.urlopen(base_url).read() |
OlderNewer