maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Solved] Finally shortcut added. Use N900's camera as a spy cam (video recording while screen is locked) (https://talk.maemo.org/showthread.php?t=71326)

nicholes 2011-03-23 09:59

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by hathoda (Post 973667)
i hv checked nicolai mothode it has sound and good quality!!thanks!

but if you closed the window it will stop rec.
however you can keep it running in beckground.

nicholes 2011-04-11 07:27

Re: How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by nicolai (Post 973137)
Quick and dirty way to use the camera api from python:

import gst
bin = gst.element_factory_make("camerabin")
bin.set_property("videoenc", gst.element_factory_make("dspmp4venc"))
bin.set_property("videomux", gst.element_factory_make("hantromp4mux"))
bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc"))
bin.set_state(gst.STATE_PLAYING)
bin.set_property("filename", "test.mp4")
bin.set_property("mode",1)
#starts recording
bin.emit("user-start")

# wait some time

# stops recording
bin.emit("user-stop")
bin.set_state(gst.STATE_PAUSED)
bin.set_state(gst.STATE_NULL)

any way to make a shortcut for this (using shorcut maker)?

firstohit 2011-07-11 21:14

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
I havn't seen anything done with the N900 yet to this regard. Let me know if I am wrong.
I am interested in setting up my N900 as a professional anti-theft device. i.e. N900 has camera and mic. Can someone think if its possible to use the camera and some motion detection software to snap photos. i.e. motion/sound activated recording. Thank you.

handaxe 2011-07-11 22:25

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
search the forums- someone packaged the linux program "motion". Will do the detection and can trigger events. See also the program "phonestream".

jaybeeare 2011-07-11 22:51

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
I can highly reccomend motion. I have some experience with it. My suspicion is that it should not be too difficult to port.

handaxe 2011-07-12 21:55

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by jaybeeare (Post 1049196)
I can highly reccomend motion. I have some experience with it. My suspicion is that it should not be too difficult to port.

see
http://talk.maemo.org/showthread.php?t=61389

HtheB 2011-07-13 00:30

Re: How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by nicolai (Post 973137)
Quick and dirty way to use the camera api from python:

import gst
bin = gst.element_factory_make("camerabin")
bin.set_property("videoenc", gst.element_factory_make("dspmp4venc"))
bin.set_property("videomux", gst.element_factory_make("hantromp4mux"))
bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc"))
bin.set_state(gst.STATE_PLAYING)
bin.set_property("filename", "test.mp4")
bin.set_property("mode",1)
#starts recording
bin.emit("user-start")

# wait some time

# stops recording
bin.emit("user-stop")
bin.set_state(gst.STATE_PAUSED)
bin.set_state(gst.STATE_NULL)

Love to see this little script in the repos :) so everyone can enjoy their spycam :D

nicholes 2011-07-20 13:21

Re: How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by HtheB (Post 1049870)
Love to see this little script in the repos :) so everyone can enjoy their spycam :D

can anyone tell me if i can use QBW for this code?

or can i make a shortcut using SCM(shorcut maker)?

nicholes 2011-10-27 02:55

Re: How to make N900's camera a spycam(video recording while screen is locked)?
 
Quote:

Originally Posted by nicolai (Post 973137)
Quick and dirty way to use the camera api from python:

import gst
bin = gst.element_factory_make("camerabin")
bin.set_property("videoenc", gst.element_factory_make("dspmp4venc"))
bin.set_property("videomux", gst.element_factory_make("hantromp4mux"))
bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc"))
bin.set_state(gst.STATE_PLAYING)
bin.set_property("filename", "test.mp4")
bin.set_property("mode",1)
#starts recording
bin.emit("user-start")

# wait some time

# stops recording
bin.emit("user-stop")
bin.set_state(gst.STATE_PAUSED)
bin.set_state(gst.STATE_NULL)


1.every time when i use this code, my videos is saved in root folder i want to change its path and save video in MyDocs plz tell me how to do this?

2. also it replace the "test.mp4" video unless i change the name of the first video is resocrded can you plz make a change in this code and give name by time and date so that video does not replace every time?

LightRain 2011-10-27 04:26

Re: [Solved]How to make N900's camera a spycam(video recording while screen is locked)?
 
2 Attachment(s)
1. Download files from attachments.
2. Remove .txt from both files
3. Put "pycam" in /usr/bin
4. Type in xterm as root: "chmod +x /usr/bin/pycam"
5. Put "pycam.desktop" in usr/share/applications/hildon
6. If you want an icon, rename the icon to "pycam" and put it in "/usr/share/icons/[your icon packs]/64x64/apps" and apply with Theme Customizer.
7. Try your new app. Press enter to stop recording. File saved in MyDocs/.videos.

It's basically nicolai's code with the naming part taken from here.


All times are GMT. The time now is 23:04.

vBulletin® Version 3.8.8