View Single Post
Posts: 84 | Thanked: 76 times | Joined on Aug 2011
#1
So I saw this thread: http://talk.maemo.org/showpost.php?p...7&postcount=12
I want to make a shortcut of it so I tried to put it in a python script like this (and later create a .desktop file):

Code:
#!/usr/bin/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")
And then chmod 755. But it doesn't work when I tried "python /path/to/script.py" in the terminal. The window did open but closed immediately. I know nothing about coding, just did it with some google searching. Can anyone help?

Last edited by LightRain; 2011-10-15 at 20:49.