|
2011-04-11
, 07:27
|
|
Posts: 1,103 |
Thanked: 368 times |
Joined on Oct 2010
@ india, indore
|
#22
|
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)
|
2011-07-11
, 21:14
|
Posts: 19 |
Thanked: 2 times |
Joined on Jul 2008
|
#23
|
|
2011-07-11
, 22:25
|
Posts: 1,378 |
Thanked: 1,604 times |
Joined on Jun 2010
@ Göteborg, Sweden
|
#24
|
|
2011-07-11
, 22:51
|
Posts: 4 |
Thanked: 0 times |
Joined on Oct 2010
@ NL
|
#25
|
|
2011-07-12
, 21:55
|
Posts: 1,378 |
Thanked: 1,604 times |
Joined on Jun 2010
@ Göteborg, Sweden
|
#26
|
I can highly reccomend motion. I have some experience with it. My suspicion is that it should not be too difficult to port.
|
2011-07-13
, 00:30
|
|
Moderator |
Posts: 3,718 |
Thanked: 7,419 times |
Joined on Dec 2009
@ Bize Her Yer Trabzon
|
#27
|
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)
|
2011-07-20
, 13:21
|
|
Posts: 1,103 |
Thanked: 368 times |
Joined on Oct 2010
@ india, indore
|
#28
|
Love to see this little script in the repos so everyone can enjoy their spycam
|
2011-10-27
, 02:55
|
|
Posts: 1,103 |
Thanked: 368 times |
Joined on Oct 2010
@ india, indore
|
#29
|
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)
|
2011-10-27
, 04:26
|
Posts: 84 |
Thanked: 76 times |
Joined on Aug 2011
|
#30
|
Tags |
bluetooth-pan, gstreamer, recording, spying, video |
Thread Tools | |
|
however you can keep it running in beckground.