|
2012-02-24
, 13:58
|
|
Posts: 676 |
Thanked: 1,067 times |
Joined on Jul 2010
@ Kyiv, Ukraine
|
#2
|
The Following User Says Thank You to int_ua For This Useful Post: | ||
|
2012-02-24
, 15:35
|
|
Posts: 1,103 |
Thanked: 368 times |
Joined on Oct 2010
@ india, indore
|
#4
|
Maybe leaky queue?..
|
2012-02-24
, 15:45
|
Posts: 482 |
Thanked: 550 times |
Joined on Oct 2010
|
#5
|
#!/bin/bash rm twominutesold.avi mv oneminuteold.avi twominutesold.avi mv current.avi oneminuteold.avi (crazy gstreamer stuff to record a minute of video to current.avi)
#!/bin/bash watch -n 60 ./update.sh
|
2012-02-24
, 15:53
|
|
Posts: 676 |
Thanked: 1,067 times |
Joined on Jul 2010
@ Kyiv, Ukraine
|
#7
|
|
2012-02-24
, 15:54
|
|
Posts: 1,103 |
Thanked: 368 times |
Joined on Oct 2010
@ india, indore
|
#8
|
The shell script idea seems pretty simple. Unfortunately I don't know enough of gstreamer to completely work it out. Here's my take (two scripts):
update.sh:
record.sh:Code:#!/bin/bash rm twominutesold.avi mv oneminuteold.avi twominutesold.avi mv current.avi oneminuteold.avi (crazy gstreamer stuff to record a minute of video to current.avi)
Record.sh is what you run; every minute it runs update.sh, which deletes the oldest recording and starts a new one. Control-c stops and leaves you with between 2 and 3 minutes of the most recent video.Code:#!/bin/bash watch -n 60 ./update.sh
Anyone want to figure out the gstreamer command?
The Following User Says Thank You to nicholes For This Useful Post: | ||
|
2012-02-24
, 16:07
|
Posts: 482 |
Thanked: 550 times |
Joined on Oct 2010
|
#9
|
can this help somehow?
chmod 755 record.py; ./record.py
import gst import time import os 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")) while True: bin.set_state(gst.STATE_PLAYING) bin.set_property("filename", "current.mp4") bin.set_property("mode",1) #starts recording bin.emit("user-start") time.sleep(60) # stops recording bin.emit("user-stop") bin.set_state(gst.STATE_PAUSED) bin.set_state(gst.STATE_NULL) try: os.remove("twominutesold.mp4") except OSError: print "No two-minutes-old file exists yet." try: os.rename("oneminuteold.mp4", "twominutesold.mp4") except OSError: print "No one-minute-old file exists yet." os.rename("current.mp4", "oneminuteold.mp4")
I want to use N900 as a third empire video rec. of a cricket match. to do this somehow N900 should keep video record of last two or three minute only .rest should be delete so thus whatever happens in the match recently (just two minute before) i can see reply of it. i hope i have present what i want in good words.(actually my English is not good)
video rec. SOLVED:- here is how to do this
you need rootsh and leafpad installed
open leafpad and paste the code
Thanks to skykooler and int_ua for their hard work
now open your camera shutter and close camera app.
go to xterminal and type sudo gainroot and go to directory where you saved record.py and type
N900 gave me a reason to live in this cruel world
get your smooth live wallpaper today
My YouTube videos
Last edited by nicholes; 2012-02-28 at 04:54.