maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   [Solved] [Maemo 5] Keeping record of last two minute Audio/video recording? (https://talk.maemo.org/showthread.php?t=82561)

skykooler 2012-02-27 18:20

Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
 
Code:

import gst
import time
import os

bin = gst.element_factory_make("camerabin")
bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc"))

while True:
    bin.set_state(gst.STATE_PLAYING)
    bin.set_property("filename", "current.aac")
    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.aac")
    except OSError:
        print "No two-minutes-old file exists yet."
    try:
        os.rename("oneminuteold.aac", "twominutesold.aac")
    except OSError:
        print "No one-minute-old file exists yet."
    os.rename("current.aac", "oneminuteold.aac")

I think this should work to record just audio.

nicholes 2012-02-28 04:24

Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
 
1 Attachment(s)
It does not work for me.

skykooler 2012-02-28 04:32

Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
 
Quote:

Originally Posted by nicholes (Post 1171152)
It does not work for me.

Hmm. Maybe change all instances of "aac" to "ogg" or "mp4"?

nicholes 2012-02-28 15:06

Re: [Solved] [Maemo 5] Keeping record of last two minute video recording?
 
Quote:

Originally Posted by skykooler (Post 1171156)
Hmm. Maybe change all instances of "aac" to "ogg" or "mp4"?

i tried mp4,ogg.aac

nothing worked. the error is same as above, and the error comes exactly after 60 seconds.

int_ua 2012-06-07 15:59

Re: [Solved] [Maemo 5] Keeping record of last two minute Audio/video recording?
 
Just noticed the Camdrive application for Harmattan:
http://talk.maemo.org/showthread.php?t=84606
Looks very nice. Maybe it'll work with MeeCoLay on N900:
http://talk.maemo.org/showthread.php?t=84482

nicholes 2012-06-07 16:53

Re: [Solved] [Maemo 5] Keeping record of last two minute Audio/video recording?
 
Quote:

Originally Posted by int_ua (Post 1218988)
Just noticed the Camdrive application for Harmattan:
http://talk.maemo.org/showthread.php?t=84606
Looks very nice. Maybe it'll work with MeeCoLay on N900:
http://talk.maemo.org/showthread.php?t=84482

Great! Thanks for the hard work.

will it running via MeeCoLay on n900
or you are going to prot it to maemo?

BTW the GUI look cool!


All times are GMT. The time now is 19:49.

vBulletin® Version 3.8.8