Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

(Solved)Keeping record of last two minute Audio/video recording?(python script added)

OP nicholes

29th May 2014, 06:24 PM   |  #1  
nicholes's Avatar
OP Senior Member
Flag indore
Thanks Meter: 28
195 posts
Join Date:Joined: Mar 2012
No one reply here in the community, so i searched and asked other forums and someone suggest told about "dash cam app" and it worked

i am amazed that even xda devloper could not answer

I want to use Note 2camera as a third empire video rec. of a cricket match. to do this somehow Note 2 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)
actually i have done this in my nokia N900 before this using this puthon script

#!/usr/bin/env python
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_property("filename", "current.mp4")
    #starts recording


    # stops recording
    except OSError:
        print "No two-minutes-old file exists yet."
        os.rename("oneminuteold.mp4", "twominutesold.mp4")
    except OSError:
        print "No one-minute-old file exists yet."
    os.rename("current.mp4", "oneminuteold.mp4")
Last edited by nicholes; 4th June 2014 at 12:03 PM.
4th June 2014, 12:04 PM   |  #2  
nicholes's Avatar
OP Senior Member
Flag indore
Thanks Meter: 28
195 posts
Join Date:Joined: Mar 2012
solved by myself see first post if someone wants the same thing
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes