Active Topics

 



Notices


Reply
Thread Tools
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#21
Originally Posted by hathoda View Post
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's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#22
Originally Posted by nicolai View Post
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)?
 
Posts: 19 | Thanked: 2 times | Joined on Jul 2008
#23
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.
 
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#24
search the forums- someone packaged the linux program "motion". Will do the detection and can trigger events. See also the program "phonestream".
 
Posts: 4 | Thanked: 0 times | Joined on Oct 2010 @ NL
#25
I can highly reccomend motion. I have some experience with it. My suspicion is that it should not be too difficult to port.
 
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#26
Originally Posted by jaybeeare View Post
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's Avatar
Moderator | Posts: 3,718 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#27
Originally Posted by nicolai View Post
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
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#28
Originally Posted by HtheB View Post
Love to see this little script in the repos so everyone can enjoy their spycam
can anyone tell me if i can use QBW for this code?

or can i make a shortcut using SCM(shorcut maker)?
__________________
N900 gave me a reason to live in this cruel world

get your smooth live wallpaper today
My YouTube videos
 
nicholes's Avatar
Posts: 1,103 | Thanked: 368 times | Joined on Oct 2010 @ india, indore
#29
Originally Posted by nicolai View Post
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?
__________________
N900 gave me a reason to live in this cruel world

get your smooth live wallpaper today
My YouTube videos
 
Posts: 84 | Thanked: 76 times | Joined on Aug 2011
#30
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.
Attached Files
File Type: txt pycam.txt (829 Bytes, 936 views)
File Type: txt pycam.desktop.txt (179 Bytes, 772 views)
 

The Following 18 Users Say Thank You to LightRain For This Useful Post:
Reply

Tags
bluetooth-pan, gstreamer, recording, spying, video


 
Forum Jump


All times are GMT. The time now is 21:01.