Python S60 - Time-lapse Photography Using a Nokia N80

Python S60 - Time-lapse Photography Using a Nokia N80

Just threw this together as a learning project. This little python script will allow you to do time-lapse photography using a symbian device using Python S60 3rd Edition. The script asks you how many photos you wish to take and the delay between each picture. You can also choose different settings for the pictures.

Tested only on a Nokia N80, might need some tweaking for other phone.

Haven’t found anything to take a time-lapse photograph of yet, maybe I’ll get the girlfriend some flowers tomorrow ;) Enjoy

Update - Sorry there was an error in the script should have been import appuifw instead of from appuifw import *

Files

Python S60 - Time-lapse Photography Using a Nokia N80

Posted on January 21, 2007
Tags: Python, Python S60

Comments

1

merdax commented, on February 24, 2007 at 12:35 p.m.:

hello man,i dont know how to user this script….pleas say me exactly that where should i get this file to? and how can i use it?
it’ll be very nicer,if u answer my questions realtime!
thanx body!

2

adam commented, on February 24, 2007 at 12:35 p.m.:

Hi Merdax here is a good link to get you started:

http://www.mobilenin.com/pys60/menu.htm

3

handsome commented, on February 24, 2007 at 12:36 p.m.:

After I downloaded and install PythonForS60_1_3_17_3rdEd_selfsigned.SIS, I cant find the application. And I also still dunno how to use the script. can someone please teach me?

Thanks in advance

4

Ronen_C commented, on February 24, 2007 at 12:37 p.m.:

hi you have a few bugs in the softwere. I didn’t find an email to send the list (and make a few suggestions), so i leave my email here. and feel free to contact me.
This is a great patch, and thank you for it. But you can make it a thousand time better. *BTW asked some friends and they chcecked it on N73 and N93 and it works there

5

adam commented, on February 24, 2007 at 12:38 p.m.:

### Ronen C ###

Hi Ronen_C thanks for your comments…will send you my email.

As this was my first experiment with python s60 I am sure it is riddled with bugs. I might have a go in a few weeks to write a better version of the script.

### to Handsome ###

You neecd to install PythonScriptShell_1_3_17_3rdEd ….then copy the time-lapse script to your phone and run it.

6

SSJr commented, on February 24, 2007 at 12:39 p.m.:

Hi!
This script works great on the Nokia 3250.

The only problem is that I need to take pictures with a short interval.
But, I believe it’s a python issue, the script takes about 20 or 30 seconds
to save each picture!

Is there any solutions to this?
Any other application?
Thank you!

7

adam commented, on February 24, 2007 at 12:40 p.m.:

SSJr - You might wanna try reducing the resolution of the pic, maybe that way it’ll save faster, otherwise I know there are projects out there that let you do time-lapse with a real camera. Picture quality is really not so good on nokias by the way.

8

Georgije commented, on February 24, 2007 at 12:42 p.m.:

Wow, i was looking for such an application for such a looooong time, finally somebody made it :D .
it took me a bit of tinkering with the code (not too difficult considering i have never used a script language before :) )to make it work on my Nokia 6630, but all i had to do was just take out all of the advanced photo options and it works fine now

thank you very much, now i just have to figure out what to take pictures of :)

9

yinsee commented, on May 7, 2007 at 3:04 a.m.:

hi i need some help (i hope u still keep an eye on your blog) - i installed python (s60_3rd), then python script shell, on my N80. when i click the python icon in "My Own" the screen flash a bit and nothing happne (still in "My Own" folder). any clue ? TQIA.
pls send your help to yinsee at gmail dot com. ;)

10

basecore commented, on May 28, 2007 at 2:13 p.m.:

Hello, i wanna say that this script also works with a N70 series60 2nd of course after installing python and the script shell (and put a folder called python/timelapse on the card).

Only running this script with an imageresolution of 1280x960 doesnt work. And i havnt try this but i think the "red_eye_reduce" also doesnt work, 'cause my mobilecamera hasnt such of these functions.

I say thank you for that great script. Now i have the right task for my mobile ;-)

11

Mark Magiera commented, on May 29, 2007 at 8:46 p.m.:

Just to let you know I made a script like this over a year ago. Mine however has a few bugs and instead of taking a fixed/selected number of images, just keeps taking images till you tell it to stop.

However it also has a few nice things like previews of the images it's been taking, resolution options, etc.

It was made for a n70 but should work on newer phones too if someone wants to use it (though I recommend fixing the bugs first).

URL: http://users.hyow.eu.org/~mark/temp/p...

12

TM commented, on August 12, 2007 at 1:05 p.m.:

Hey there! Just wanted to say thanks for a wonderful script. Sadly, i couldn't get it to work on the N73...did some modifications and now it's working fine. I've included a link to your site at my blog. Hope that's ok with you :)

URL: http://series-sixty.blogspot.com/

13

p3r commented, on November 6, 2007 at 3:36 p.m.:

can u tell me wat modifications to make on the script so that it works on my n73......

14

Héctor commented, on July 26, 2008 at 2:07 p.m.:

the app work fine. I did some modifications. the first one, was add the line #import appuifw...the other one, turn tab character into two space in loop section. Thx for a great idea. I will use for mini stop motion movie...:P

15

Brandon commented, on September 10, 2008 at 7:04 a.m.:

Hey, I just wanted to let ya know how awesome this script was for getting me started in kite aerial photography. It really did what I wanted on the phone I wanted to do it on! thanks so much!

http://www.flickr.com/photos/sircorru...

16

schaffner commented, on December 29, 2008 at 1:25 a.m.:

Thanks works perfect on n73 s30 3rd, python 1.4.5 python and shell.

thanks!

17

tomh commented, on January 11, 2009 at 1:01 p.m.:

Any suggestions for how to make a similar app for a nokia S40 phone? I've got a Nokia 6300 that really wants to go up on a kite :)

18

Adam commented, on March 9, 2009 at 4:44 p.m.:

For a s40, you would probably have to take it apart and hook something like a 555 time circuit to the camera button.

19

Raut commented, on March 16, 2009 at 9:29 a.m.:

this is a slightly improved version and works on most phones iv tested..tested it on n93 n93i n73 n70 6600 ..thanx for giving me a base to build on..i was strugling with the options thing
---------------------------------------

import appuifw, e32

import time

import camera

import os

import graphics

imageSizesDisplay = [u'1280,960',u'800,600',u'640,480']
imageSizes = [(1280,960),(800,600),(640,480)]
flashModes = [u'auto', u'none', u'red_eye_reduce', u'forced']
exposureModes = [u'auto',u'center',u'backlight',u'night']
whiteBalance = [u'daylight',u'fluorescent',u'tungsten',u'auto',u'cloudy']

imageSizeSelect = appuifw.selection_list(choices=imageSizesDisplay)
flashModeSelect = appuifw.selection_list(choices=flashModes)
exposureModeSelect = appuifw.selection_list(choices=exposureModes)
whiteBalanceSelect = appuifw.selection_list(choices=whiteBalance)
i=0

starttime=time.time()
os.mkdir('E:\Images\%f'%(starttime))

appuifw.app.screen='full'

appuifw.app.body=canvas=appuifw.Canvas()

while True:

phototime=time.time()
##Images are captured with 640x480 resolution..If you change it, make sure your camera supports it. Night mode etc is not used.

Img=camera.take_photo(size=imageSizes[imageSizeSelect],flash=flashModes[flashModeSelect],exposure=exposureModes[exposureModeSelect],white_balance=whiteBalance[whiteBalanceSelect])
canvas.blit(Img.resize(canvas.size))

## print "captured %d"%(i)

Img.save("E:\Images\%f\%s.jpg"%(starttime,str(i).zfill(6)))

## print "saved %d"%(i)

savetime=time.time()

timediff=savetime-phototime

## print sleepcount-timediff
## change this to change the time between each pic
time.sleep(30)

i=i+1

20

Adam commented, on March 23, 2009 at 2:56 p.m.:

Cool, thanks Raut

21

viplove commented, on May 12, 2009 at 4:09 p.m.:

thanx. works well on my n73, gr8 script. For beginers, all i wan t to suggest is "just create two folders on your memory card :

=>create first folder and rename it to "python", under this you put "time_lapse.py"

=>create a sub folder under python folder, and rename it to "timelapse"., and all done...dont forget to install python interpreter and shell on your phone...

22

t3 commented, on August 12, 2009 at 10:53 a.m.:

doesn't work on my n95 :(
getting some error messages after running the script --> [Errno-12] ErrPathNotFound

23

Adam commented, on August 12, 2009 at 2:53 p.m.:

t3: You need to create the folder on your phone in which to store the pictures taken. The default is "e:\python\timelapse\"

24

jonn commented, on August 12, 2009 at 4:16 p.m.:

Raut´s script doesn´t work on my n95

25

t3 commented, on August 12, 2009 at 5:45 p.m.:

created the folder and it's working fine now. thx for this neat little script :)

26

cubex commented, on October 2, 2009 at 5:21 a.m.:

Raut need help on my n93i

I get this error

Traceback (most recent call last):
File "(:\private\2000b1a5\default.py", line 81, in menu_action
f()
File "(:\private\2000b1a5\default.py", line 65, query_and_exec
execfile(script_list[index][1]encode('utf-8'), script_namespace.namespace)
IndentationError: expected an indented block (time_lapse.py, line 32)

27

pradeep herle commented, on October 17, 2009 at 8:06 p.m.:

has any one written a script for Nokia 5800 XM ? i tried this, but comes up with error as this was written for a old phone ...

28

Bo commented, on December 31, 2009 at 4:42 a.m.:

cubex-> you need 2 spaces in the beginning of that line.
But I still cant get Raut's script to run properly, it hangs after I choose the whiteBalance mode.
It does create a folder, but in unix time.
Any tips?

29

Adam commented, on January 18, 2010 at 1:41 p.m.:

Bo: unfortunately all of the formatting for Raut's script has been lost in hist post everything under "While True:" should be indented by 4 spaces.

30

Peter commented, on February 5, 2010 at 5:50 p.m.:

Hi adam,

the script works on my n95 8gb, but after roughly 15 pictures, it stops and i get this:

File "c:\resource\camera.py", line 101, in
take_photo
position))
SymbianError: [Errno -5] KErrNotSupported

any ideas?

Thanks, Peter

31

case13 commented, on March 28, 2010 at 3:40 a.m.:

please import this script on 5800, i tried playing with the script but with no luck :(

thanks
keeping my finger crossed

32

dtesa commented, on July 26, 2010 at 4:10 p.m.:

Hi,

I got this script running on a Nokia 5800. I dont remember what I changed, so I copy-paste here at he end. The settings I use are any-number-of-photos and 10-sec-delay. I got a 1280x960 sized picts. There's is a matter with placing horizontal or vertical the phone, sometimes scripts fails if you rotate once started.

The script
####################################

# Python s60 3rd Edition -- Time lapse Photography for Nokia N80
# Code by Anteater -- http://blog.foozia.com

from appuifw import *
import appuifw
#from graphics import *
import camera
#import e32
#from key_codes import *
from time import sleep
import audio

nameOfProject = appuifw.query(u"Nombre del proyecto:", "text")

numImages = appuifw.query(u"Numero de fotos:", "number")
delay = appuifw.query(u"Tiempo entre fotos:", "number")

# These will show the options available for your phone
#Couldn't use these selection list directly
# as it only accepts unicode strings
#camera.image_sizes()

imageSizesDisplay = [u'1280 x 960 pix',u'800 x 600 pix',u'640 x 480 pix']
imageSizes = [(1280,960),(800,600),(640,480)]

imageSizeSelect = appuifw.selection_list(choices=imageSizesDisplay)

x = 0
while x != numImages:
image = camera.take_photo(size=imageSizes[imageSizeSelect])
#### Change the path here to a folder on your phone
filename='e:\\timelapse\\'+nameOfProject+'_'+str(x)+'.jpg'
image.save(filename)
print "Imagen "+str(x+1)+"/"+str(numImages)+" guardada."
sleep(delay)
x +=1

print "Hecho!!"

####################################

33

Werner Hartnagel commented, on August 3, 2010 at 12:07 p.m.:

I did some changes/improvements, it should now easier run on differnt devices. I did test it with Nokia XM 5530 S60v5 / Python 2.0 Feedback welcome: http://www.dotmagic.de/blog/2010/07/3...

34

Scabby commented, on January 7, 2011 at 10:52 p.m.:

Wernel, damn Yours script is the best one i've ever had, it's firts which runs on my N80, God bless ya!
btw idea is briliant, thx for this blog too;)

35

Paulius commented, on February 8, 2011 at 12:53 p.m.:

Hi all. I have a Nokia 5230 and I wondering if it's possible to make a bigger rez photos? Like 1600 x 1200? And what should to change in the script?

Regards :)

36

jumpjack commented, on February 2, 2012 at 7:21 p.m.:

which file should I download to install python on a not-hacked 5800xm?

37

jumpjack commented, on February 5, 2012 at 6:52 p.m.:

How can I implement night mode?
It's not even present in this "extended script":
http://www.dotmagic.de/blog/2010/07/3...

Post a comment

Your name:

Comment: