Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 3 of 3
  1. Thread Author  Thread Author    #1  
    nicholes444's Avatar

    Posts
    7 Posts
    Carrier
    Note 2 , Stock 4.3

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

    Hi,
    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

    Code:
    #!/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_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")
  2. #2  
    Patrick Schroedl's Avatar
    Retired Moderator

    Posts
    3,698 Posts
    Global Posts
    3,829 Global Posts

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

    You might consider looking in the Play Store for "dash cam" apps. They may be able to record the most recent few minutes and automatically remove older videos. As for the Python script, there are Python engines (also in the Play Store) that should theoretically let you use your existing script. One example is QPython.
    nicholes444 likes this.
  3. Thread Author  Thread Author    #3  
    nicholes444's Avatar

    Posts
    7 Posts
    Carrier
    Note 2 , Stock 4.3

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

    thats exatly what i want bro.

    Thnaks!

Similar Threads

  1. MapMyRun is updated as of today (for the phone)
    By 1812dave in forum Samsung Gear 2 & Gear 2 Neo
    Replies: 36
    Last Post: 05-22-2014, 09:10 PM
  2. Official Teaser Video
    By sabre1106 in forum LG G3
    Replies: 6
    Last Post: 05-14-2014, 12:08 AM
  3. How do I reply to the original sender of a group message?
    By splittooth in forum Samsung Galaxy S5
    Replies: 1
    Last Post: 05-13-2014, 10:05 PM
  4. Call/handling/screen experience of Z2?
    By mkchillin in forum Sony Xperia Z2
    Replies: 2
    Last Post: 05-13-2014, 06:07 PM

Posting Permissions